Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Create *.deb package from PHP extension

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
rm_czuga
Posts: 2
Joined: 2017-04-26 15:07

Create *.deb package from PHP extension

#1 Post by rm_czuga »

Hi, I've trying to create php5-phalcon-134.deb package and put it into my local packages repository. Unfortunately in meantime of building package receive error:

Code: Select all

dpkg-source: error: unrepresentable changes to source
dpkg-buildpackage: error: dpkg-source -b phalcon-1.3.4 gave error exit status 2
All I do is:

Code: Select all

/> git clone -b 1.3.4 https://github.com/phalcon/cphalcon.git ; cd cphalcon
/> rm -rf .git*; cd ..
/> tar zcvf phalcon-1.3.4.tar.gz cphalcon
/> mv cphalcon phalcon-1.3.4; cd phalcon-1.3.4
/> dh_make -f ../phalcon-1.3.4.tar.gz -e my@mail.com
That's my debian/rules:

Code: Select all

#!/usr/bin/make -f
DH_VERBOSE = 1
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/default.mk

%:
        dh $@ 

override_dh_auto_configure:
        ./configure --enable-phalcon
That's my debian/control:

Code: Select all

Source: phalcon
Section: main
Priority: optional
Maintainer: mynamehere <mymail@here>
Build-Depends: debhelper (>=9)
Standards-Version: 3.9.5
Homepage: https://phalconphp.com
Vcs-Git: git://github.com/phalcon/cphalcon.git

Package: phalcon
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: shor one here
 Loger one here
I add line:

Code: Select all

* Binary builded by ...

in changelog file as well.

Inside build/install script I comment out last line after part where phpize create the extension. So, only what's left to do is run:

Code: Select all

/> ./configure --enable-phalcon
/> make
/> sudo make install
After run:

Code: Select all

/> dpkg-buildpackage -us -uc
inside phalcon-1.3.4/build directory - program crashes when looking for compressed phalcon directory (should be in ../phalcon-1.3.4.tar.gz but it isn't). After create simlink I've got error from first sentence.

What should I do?
Many thanks for help!

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Create *.deb package from PHP extension

#2 Post by stevepusser »

Doesn't it list what files it finds unacceptable as being changed in the source before that error message?

A sort of a cheat is to make it a "native" package in debian/source/format, that way it won't care about any changes in the source. A lot of stuff in Ubuntu PPAs are incorrectly packaged this way--it's more wrong for a public package than a private package like yours! This also means that there can't be any packaging revision in the version in debian/changelog, so would need to change (example)

foo (1.2.3-1)

to

foo (1.2.3)
MX Linux packager and developer

rm_czuga
Posts: 2
Joined: 2017-04-26 15:07

Re: Create *.deb package from PHP extension

#3 Post by rm_czuga »

Doesn't it list what files it finds unacceptable as being changed in the source before that error message?
It does not...

Ok, I'll try make a native-one package.
Thanks for reply!

Post Reply