4 # $PYTHON and $ARCH must be set
6 if [ -z "$PYTHON" ]; then
9 if [ -z "$ARCH" ]; then
10 echo "must set ARCH= before running this script"
14 NAME=$($PYTHON setup.py --name)
15 VERSION=$($PYTHON setup.py --version)
17 # actually, it's the debchange using a different author than the
18 # debian/control Maintainer: entry that makes lintian think this is an NMU.
19 # Put "local package" on the first line of the changelog entry to supress
21 TARBALL=${NAME}-${VERSION}.tar.gz
22 DEBTARBALL=${NAME}_${VERSION}.orig.tar.gz
23 DEBDIR=build/debian/${NAME}-${VERSION}
24 $PYTHON setup.py sdist --formats=gztar
27 cp dist/$TARBALL build/debian/$DEBTARBALL
28 (cd build/debian && tar xf $DEBTARBALL)
29 zcat misc/debian/$ARCH.diff.gz | (cd $DEBDIR && patch -p1)
30 chmod +x $DEBDIR/debian/rules
31 # We put "local package" on the first line of the changelog entry to suppress
32 # the lintian NMU warnings (since debchange's new entry's "author" will
33 # probably be different than the what the debian/control Maintainer: field
35 echo "updating version to $VERSION-1"
36 (cd $DEBDIR && debchange --newversion $VERSION-1 "local package: 'make deb' build")
37 (cd $DEBDIR && debuild -uc -us)