Create *.deb package from PHP extension

New to Debian (Or Linux in general)? Ask your questions here!

Create *.deb package from PHP extension

Postby rm_czuga » 2017-04-26 15:41

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!
rm_czuga
 
Posts: 2
Joined: 2017-04-26 15:07

Re: Create *.deb package from PHP extension

Postby stevepusser » 2017-04-26 18:08

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)
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Krita 3.3.2.1, Pale Moon 27.6.0, Audacity 2.2.0, mpv 0.27.0, Corebird 1.7.1, Firefox 57.0, SMPlayer 17.11.2
User avatar
stevepusser
 
Posts: 8903
Joined: 2009-10-06 05:53

Re: Create *.deb package from PHP extension

Postby rm_czuga » 2017-04-27 06:09

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!
rm_czuga
 
Posts: 2
Joined: 2017-04-26 15:07


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 8 guests

fashionable