6 |
6 |
7 PACKAGE=$(dpkg-parsechangelog | sed -n 's/^Source: \(.*\)/\1/p') |
7 PACKAGE=$(dpkg-parsechangelog | sed -n 's/^Source: \(.*\)/\1/p') |
8 DEBIAN_VERSION=$(dpkg-parsechangelog | sed -n 's/^Version: \(.*\)/\1/p') |
8 DEBIAN_VERSION=$(dpkg-parsechangelog | sed -n 's/^Version: \(.*\)/\1/p') |
9 # Lazy, but hey |
9 # Lazy, but hey |
10 UPSTREAM_VERSION=$(dpkg-parsechangelog | sed -n 's/^Version: \(.*\)-[^-]*/\1/p') |
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 |
11 BUILDDIR=$(pwd)/build/debian |
13 |
12 |
14 echo PACKAGE $PACKAGE |
13 echo PACKAGE $PACKAGE |
15 echo DEBIAN_VERSION $DEBIAN_VERSION |
14 echo DEBIAN_VERSION $DEBIAN_VERSION |
16 echo UPSTREAM_VERSION $UPSTREAM_VERSION |
15 echo UPSTREAM_VERSION $UPSTREAM_VERSION |
17 echo UPSTREAM $UPSTREAM |
|
18 echo BUILDDIR $BUILDDIR |
16 echo BUILDDIR $BUILDDIR |
19 |
17 |
20 rm -rf ${BUILDDIR} |
18 rm -rf ${BUILDDIR} |
21 mkdir -p ${BUILDDIR} |
19 mkdir -p ${BUILDDIR} |
22 hg archive -X '.hg*' -X 'dev/**' -t tgz -r ${UPSTREAM} \ |
20 hg st -mac0n -X '.hg*' -X 'dev/**' -X 'debian/**' | \ |
|
21 cpio -o -0 -H ustar | gzip --best > \ |
23 ${BUILDDIR}/${PACKAGE}_${UPSTREAM_VERSION}.orig.tar.gz |
22 ${BUILDDIR}/${PACKAGE}_${UPSTREAM_VERSION}.orig.tar.gz |
24 hg st -mac0n -X '.hg*' -X 'dev/**' | cpio -p -0 -d \ |
23 hg st -mac0n -X '.hg*' -X 'dev/**' | cpio -p -0 -d \ |
25 ${BUILDDIR}/${PACKAGE}-${UPSTREAM_VERSION} |
24 ${BUILDDIR}/${PACKAGE}-${UPSTREAM_VERSION} |
26 |
25 |
27 cd ${BUILDDIR}/${PACKAGE}-${UPSTREAM_VERSION} |
26 cd ${BUILDDIR}/${PACKAGE}-${UPSTREAM_VERSION} |