# HG changeset patch # User Paul Crowley # Date 1292626912 0 # Node ID 9a171c093f61f457154180751f9962035ae346ef # Parent 4651aae7b330bca13b9565486b0514768d1b2054 Add crazy dbuild script diff -r 4651aae7b330 -r 9a171c093f61 dev/debian-build/dbuild --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/dev/debian-build/dbuild Fri Dec 17 23:01:52 2010 +0000 @@ -0,0 +1,33 @@ +#!/bin/sh + +set -e + +cd $(hg root) + +PACKAGE=$(dpkg-parsechangelog | sed -n 's/^Source: \(.*\)/\1/p') +DEBIAN_VERSION=$(dpkg-parsechangelog | sed -n 's/^Version: \(.*\)/\1/p') +# Lazy, but hey +UPSTREAM_VERSION=$(dpkg-parsechangelog | sed -n 's/^Version: \(.*\)-[^-]*/\1/p') +UPSTREAM=$(hg log --template '{node}' -r 'heads(ancestors(.) and branch(default))') +BUILDDIR=$(pwd)/build/debian + +echo PACKAGE $PACKAGE +echo DEBIAN_VERSION $DEBIAN_VERSION +echo UPSTREAM_VERSION $UPSTREAM_VERSION +echo UPSTREAM $UPSTREAM +echo BUILDDIR $BUILDDIR + +rm -rf ${BUILDDIR} +mkdir -p ${BUILDDIR} +hg archive -X '.hg*' -t tgz -r ${UPSTREAM} \ + ${BUILDDIR}/${PACKAGE}_${UPSTREAM_VERSION}.orig.tar.gz +hg st -mac0n -X '.hg*' | cpio -p -0 -d \ + ${BUILDDIR}/${PACKAGE}-${UPSTREAM_VERSION} + +cd ${BUILDDIR}/${PACKAGE}-${UPSTREAM_VERSION} +#dpkg-buildpackage -kFD56DDC0 +dpkg-buildpackage +cd .. +lintian -i --pedantic -IE ${PACKAGE}_${DEBIAN_VERSION}_*.changes +sudo pbuilder --build ${PACKAGE}_${DEBIAN_VERSION}.dsc +