dev/debian-build/dbuild
author Paul Crowley <paul@lshift.net>
Wed, 07 Sep 2011 11:44:31 +0100
changeset 331 aeafdd709c02
parent 328 311989e24f27
child 334 b7e56688dd14
permissions -rwxr-xr-x
Update NEWS and release checklists to reflect new way

#!/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')
BUILDDIR=$(pwd)/build/debian

echo PACKAGE $PACKAGE
echo DEBIAN_VERSION $DEBIAN_VERSION
echo UPSTREAM_VERSION $UPSTREAM_VERSION
echo BUILDDIR $BUILDDIR

rm -rf ${BUILDDIR}
mkdir -p ${BUILDDIR}
hg st -mac0n -X '.hg*' -X 'dev/**' -X 'debian/**' | \
    cpio -o -0 -H ustar | gzip --best > \
   ${BUILDDIR}/${PACKAGE}_${UPSTREAM_VERSION}.orig.tar.gz
hg st -mac0n -X '.hg*' -X 'dev/**' | 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