Here is *my* howto for packaging PHP PEAR modules in pkg-php SVN.

First use of pkg-php SVN

Check-out SVN sources:

$ cd ~/SVN
$ svn co svn+ssh://

Note: With keyboard-interactive authentification, I need enter twice your password, because the first receives a SIGTERM. I don't know why...

Debian Packaging


First commit

Build locally your package and use svn-buildpackage to inject it:

svn-inject php-PEARLIBRARYNAME*.dsc svn+ssh://

You will have /svn/pkg-php/pear/php-PEARLIBRARYNAME/{branches,tags,trunk} Upstream sources are in branches/upstream/{x.y.z,x.y.z',current} (current contains last sources) and source package is in trunk.

New upstream release

$ cd trunk
$ ./debian/rules get-orig-source
$ mv *.orig.tar.gz ..
$ svn-upgrade ../*.orig.tar.gz
$ svn commit

Now, your files in trunk are up-to-date and you have new sources in branches/upstream.


$ vim debian/rules
$ dch
$ svn commit

Note : when you close a bug in changelog, commiting tags it "pending".

Build package

$ cd /tmp/random
$ svn co file:///tmp/svn/pkg-php/pear/php-PEARLIBRARYNAME/
$ ./debian/rules get-orig-source
$ mkdir ../tarballs
$ mv *.orig.tar.gz ../tarballs
$ svn-buildpackage -rfakeroot
MODULE/trunk/.svn/deb-layout not found, importing settings via Subversion properties...
Autodetecting remaining properties...

After final release, you should tag it:

$ svn-buildpackage --svn-tag-only