[Twisted-Python] Debian Packaging

Moshe Zadka m at moshez.org
Thu Aug 9 05:05:17 EDT 2001


First of all, let me share with you a script I use to check
whether the current CVS will generate a correct Debian package.
Keep in mind that this is a test script, and is far from production
quality.

---------- cut here -----
#!/bin/sh
name=`dpkg-parsechangelog |grep Source | awk -F: '{print $2}'|tr -d ' '`
version=`dpkg-parsechangelog |grep Version | awk -F: '{print $2}'|awk -F- '{print $1}'|tr -d ' '`
build=../debian-build
dir=$build/$name-$version
mkdir $dir
cp -ar * $dir
cd $build
find . -name CVS | xargs rm -rf
tar czf ${name}_$version.orig.tar.gz $name-$version
cd $dir
dpkg-buildpackage -rfakeroot -uc -us
cd ..
rm -rf $name-$version
---------- cut here -----

Now, to have a well installed twisted.web server, just
use this script (run it when the current directory is the toplevel CVS
directory, and make sure there's a directory called "debian-build" as
a sister directory)

Now, go into ../debian-build
install the generated twisted_*.deb
Now, run /usr/bin/mktap web, or use your favourite tap file.
use /usr/bin/tap2deb -t file.tap -m 'Your Name <email at example.com>'
Go into .build, and install the generated .deb
This will start your web server, and make sure it gets restarted 
on reboots.
-- 
Moshe Zadka - http://moshez.geek
(if you're not cool, http://moshez.org is still working)





More information about the Twisted-Python mailing list