clean:
rm -rf build _trial_temp _test_memory .checked-deps .built
- rm -f debian
rm -f `find src/allmydata -name '*.so' -or -name '*.pyc'`
rm -rf src/allmydata_tahoe.egg-info
rm -rf support dist
$(MAKE) increment-deb-version
fakeroot debian/rules binary
+# new experimental debian-packaging-building target
+.PHONY: EXPERIMENTAL-deb
+EXPERIMENTAL-deb: is-known-debian-arch
+ misc/build-deb.sh
+
# These targets provide for windows native builds
.PHONY: windows-exe windows-installer windows-installer-upload
--- /dev/null
+#!/bin/bash
+set -e
+
+# $PYTHON and $ARCH must be set
+
+if [ -z "$PYTHON" ]; then
+ PYTHON=python
+fi
+if [ -z "$ARCH" ]; then
+ echo "must set ARCH= before running this script"
+ exit 1
+fi
+
+NAME=$($PYTHON setup.py --name)
+VERSION=$($PYTHON setup.py --version)
+
+# actually, it's the debchange using a different author than the
+# debian/control Maintainer: entry that makes lintian think this is an NMU.
+# Put "local package" on the first line of the changelog entry to supress
+# this warning.
+TARBALL=${NAME}-${VERSION}.tar.gz
+DEBTARBALL=${NAME}_${VERSION}.orig.tar.gz
+DEBDIR=build/debian/${NAME}-${VERSION}
+$PYTHON setup.py sdist --formats=gztar
+rm -rf build/debian
+mkdir -p build/debian
+cp dist/$TARBALL build/debian/$DEBTARBALL
+(cd build/debian && tar xf $DEBTARBALL)
+zcat misc/debian/$ARCH.diff.gz | (cd $DEBDIR && patch -p1)
+chmod +x $DEBDIR/debian/rules
+# We put "local package" on the first line of the changelog entry to suppress
+# the lintian NMU warnings (since debchange's new entry's "author" will
+# probably be different than the what the debian/control Maintainer: field
+# says)
+echo "updating version to $VERSION-1"
+(cd $DEBDIR && debchange --newversion $VERSION-1 "local package: 'make deb' build")
+(cd $DEBDIR && debuild -uc -us)
+