author | Paul Crowley <paul@lshift.net> |
Thu, 08 Sep 2011 09:14:46 +0100 | |
changeset 334 | b7e56688dd14 |
parent 328 | 311989e24f27 |
child 335 | 0d15506351db |
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 |
BUILDDIR=$(pwd)/build/debian |
|
12 |
||
13 |
echo PACKAGE $PACKAGE |
|
14 |
echo DEBIAN_VERSION $DEBIAN_VERSION |
|
15 |
echo UPSTREAM_VERSION $UPSTREAM_VERSION |
|
16 |
echo BUILDDIR $BUILDDIR |
|
17 |
||
18 |
rm -rf ${BUILDDIR} |
|
19 |
mkdir -p ${BUILDDIR} |
|
334
b7e56688dd14
Common dir for all files in orig.tar.gz
Paul Crowley <paul@lshift.net>
parents:
328
diff
changeset
|
20 |
hg st -mac0n -X '.hg*' -X 'dev/**' -X 'debian/**' | cpio -p -0 -d \ |
b7e56688dd14
Common dir for all files in orig.tar.gz
Paul Crowley <paul@lshift.net>
parents:
328
diff
changeset
|
21 |
${BUILDDIR}/${PACKAGE}-${UPSTREAM_VERSION} |
b7e56688dd14
Common dir for all files in orig.tar.gz
Paul Crowley <paul@lshift.net>
parents:
328
diff
changeset
|
22 |
(cd ${BUILDDIR} ; tar cvzf \ |
b7e56688dd14
Common dir for all files in orig.tar.gz
Paul Crowley <paul@lshift.net>
parents:
328
diff
changeset
|
23 |
${PACKAGE}_${UPSTREAM_VERSION}.orig.tar.gz \ |
b7e56688dd14
Common dir for all files in orig.tar.gz
Paul Crowley <paul@lshift.net>
parents:
328
diff
changeset
|
24 |
${PACKAGE}-${UPSTREAM_VERSION} ) |
b7e56688dd14
Common dir for all files in orig.tar.gz
Paul Crowley <paul@lshift.net>
parents:
328
diff
changeset
|
25 |
hg st -mac0n -I 'debian/**' | cpio -p -0 -d \ |
280 | 26 |
${BUILDDIR}/${PACKAGE}-${UPSTREAM_VERSION} |
27 |
||
28 |
cd ${BUILDDIR}/${PACKAGE}-${UPSTREAM_VERSION} |
|
29 |
#dpkg-buildpackage -kFD56DDC0 |
|
30 |
dpkg-buildpackage |
|
31 |
cd .. |
|
32 |
lintian -i --pedantic -IE ${PACKAGE}_${DEBIAN_VERSION}_*.changes |
|
314 | 33 |
#sudo pbuilder --build ${PACKAGE}_${DEBIAN_VERSION}.dsc |