author | Paul Crowley <paul@lshift.net> |
Tue, 06 Sep 2011 11:47:44 +0100 | |
branch | debian |
changeset 318 | 5259bc023d36 |
parent 314 | c02eae7665af |
child 328 | 311989e24f27 |
permissions | -rwxr-xr-x |
280 | 1 |
#!/bin/sh |
2 |
||
3 |
set -e |
|
4 |
||
5 |
cd $(hg root) |
|
6 |
||
7 |
PACKAGE=$(dpkg-parsechangelog | sed -n 's/^Source: \(.*\)/\1/p') |
|
8 |
DEBIAN_VERSION=$(dpkg-parsechangelog | sed -n 's/^Version: \(.*\)/\1/p') |
|
9 |
# Lazy, but hey |
|
10 |
UPSTREAM_VERSION=$(dpkg-parsechangelog | sed -n 's/^Version: \(.*\)-[^-]*/\1/p') |
|
11 |
UPSTREAM=$(hg log --template '{node}' -r 'heads(ancestors(.) and branch(default))') |
|
12 |
BUILDDIR=$(pwd)/build/debian |
|
13 |
||
14 |
echo PACKAGE $PACKAGE |
|
15 |
echo DEBIAN_VERSION $DEBIAN_VERSION |
|
16 |
echo UPSTREAM_VERSION $UPSTREAM_VERSION |
|
17 |
echo UPSTREAM $UPSTREAM |
|
18 |
echo BUILDDIR $BUILDDIR |
|
19 |
||
20 |
rm -rf ${BUILDDIR} |
|
21 |
mkdir -p ${BUILDDIR} |
|
281
7d59a0f92c78
Don't include dev stuff in sources; don't call pbuilder usually
Paul Crowley <paul@lshift.net>
parents:
280
diff
changeset
|
22 |
hg archive -X '.hg*' -X 'dev/**' -t tgz -r ${UPSTREAM} \ |
280 | 23 |
${BUILDDIR}/${PACKAGE}_${UPSTREAM_VERSION}.orig.tar.gz |
281
7d59a0f92c78
Don't include dev stuff in sources; don't call pbuilder usually
Paul Crowley <paul@lshift.net>
parents:
280
diff
changeset
|
24 |
hg st -mac0n -X '.hg*' -X 'dev/**' | cpio -p -0 -d \ |
280 | 25 |
${BUILDDIR}/${PACKAGE}-${UPSTREAM_VERSION} |
26 |
||
27 |
cd ${BUILDDIR}/${PACKAGE}-${UPSTREAM_VERSION} |
|
28 |
#dpkg-buildpackage -kFD56DDC0 |
|
29 |
dpkg-buildpackage |
|
30 |
cd .. |
|
31 |
lintian -i --pedantic -IE ${PACKAGE}_${DEBIAN_VERSION}_*.changes |
|
314 | 32 |
#sudo pbuilder --build ${PACKAGE}_${DEBIAN_VERSION}.dsc |