dh-make-pm - build Debian packages (dh-make-perl on pbuilder+cowdancer steroids)
dh-make-pm --cpan Debian::Apt::PM --cpan which module to build --no-retry will skip packaging modules that already failed to package --dh-make-perl=s set different command to execute instead of dh-make-perl to create debian/ folder. --no-cpan-patches do not apply CPAN::Patches --tilde=s string that should apper after version~ (ex. 2.00~string) --debian-version set debian version string, default is 1 (ex. 2.00-1)
dh-make-pm is basically recursive dh-make-perl that will build the deb package from CPAN distribution and all it's dependencies properly indexing and creating repository.
# execute sudo apt-get install cowdancer cowbuilder --create --distribution sid echo "dh-make-pm" > /var/cache/pbuilder/base.cow/etc/debian_chroot # add to /etc/pbuilderrc MIRRORSITE=http://ftp.cz.debian.org/debian/ BINDMOUNTS="/var/cache/pbuilder/result" PDEBUILD_PBUILDER=cowbuilder mkdir /var/cache/pbuilder/result/unstable wget http://bratislava.pm.org/tutorial/debian-simple-repo/Makefile -O /var/cache/pbuilder/result/Makefile wget http://bratislava.pm.org/tutorial/debian-simple-repo/Release.conf -O /var/cache/pbuilder/result/Release.conf vim /var/cache/pbuilder/base.cow/etc/apt/sources.list # update to your taste echo "deb file:///var/cache/pbuilder/result/ unstable/" >> /var/cache/pbuilder/base.cow/etc/apt/sources.list echo "deb file:///var/cache/pbuilder/result/ unstable/" >> /etc/apt/sources.list # generate a key without passphrase gpg --gen-key gpg --export --armor $KEYID apt-key add - chroot /var/cache/pbuilder/base.cow/ apt-key add - exit cd /var/cache/pbuilder/result/ make cowbuilder --update --bindmounts /var/cache/pbuilder/result/ cpan -i Debian::Apt::PM # patch DhMakePerl.pm cd /usr/share/perl5/ patch -p1 < $DIST_ROOT/patch/DhMakePerl.pm.patch
dh-make-pm --cpan Debian::Apt::PM dh-make-pm --cpan Tatsumaki
I most cases when there is a missing or wrong dependency then the .deb build will fail.
cd $HOME/.dh-make-pm/build/$TAR_BALL_FOLDER/ vim debian/control # set correct dependencies pdebuild mv /var/cache/pbuilder/result/*-perl* /var/cache/pbuilder/result/unstable/ cd /var/cache/pbuilder/result make dh-make-pm --cpan $THE_MODULE_YOU_WANTED_TO_BUILD
* when source Debian package already exists, get the source and backport * build conflicts from the apt-file
To install Debian::Apt::PM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Debian::Apt::PM
CPAN shell
perl -MCPAN -e shell install Debian::Apt::PM
For more information on module installation, please visit the detailed CPAN module installation guide.