Ubuntu packaging: add support for better changelog tracking

This now assumes that a running changelog is maintained in
src/debian.changelog, i.e., at the same level as the subsurface tree; the
organization now should look like this:

src/debian.changelog
src/subsurface                 # subsurface git checkout
src/subsurface/libdivecomputer # libdivecomputer git Subsurface-xx branch
src/subsurface/marble-source   # marble git Subsurface-xx branch
src/subsurface/libgit2         # libgit2 git checkout

Instead of running dh_make to create all new debian build files, we add the
necessary files in our script.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-12-15 08:24:51 -08:00
parent 51fdf86a2b
commit 5e9c491f19
4 changed files with 40 additions and 12 deletions

View file

@ -0,0 +1 @@
9

View file

@ -0,0 +1,7 @@
gpl-2.0.txt
README
Readme.testing
Readme.ubuntu
ReleaseNotes.txt
SupportedDivecomputers.txt
TODO.CCR

View file

@ -0,0 +1 @@
3.0 (quilt)

View file

@ -9,31 +9,50 @@ fi
GITVERSION=$(cd subsurface ; git describe | sed -e 's/-g.*$// ; s/^v//')
VERSION=$(echo $GITVERSION | sed -e 's/-/./')
LIBDCREVISION=$(cd subsurface/libdivecomputer ; git rev-parse --verify HEAD)
#
#
echo "building Subsurface" $VERSION "with libdivecomputer" $LIBDCREVISION
#
if [[ -d subsurface_$VERSION ]]; then
rm -rf subsurface_$VERSION.bak.prev
mv subsurface_$VERSION.bak subsurface_$VERSION.bak.prev
mv subsurface_$VERSION subsurface_$VERSION.bak
fi
mkdir subsurface_$VERSION
#
#
echo "copying sources"
#
(cd subsurface ; tar cf - . ) | (cd subsurface_$VERSION ; tar xf - )
cd subsurface_$VERSION
rm -rf .git libdivecomputer/.git libgit2/.git marble-source/.git
echo $GITVERSION > .gitversion
echo $LIBDCREVISION > libdivecomputer/revision
dh_make --email dirk@hohndel.org -c gpl2 --createorig --single --yes -p subsurface_$VERSION
rm debian/*.ex debian/*.EX debian/README.*
cp ../subsurface/packaging/ubuntu/debian/control debian/control
cp ../subsurface/packaging/ubuntu/debian/copyright debian/copyright
cp ../subsurface/packaging/ubuntu/debian/rules debian/rules
cp ../subsurface/packaging/ubuntu/debian/source.lintian-overrides debian/source.lintian-overrides
# dh_make --email dirk@hohndel.org -c gpl2 --createorig --single --yes -p subsurface_$VERSION
# rm debian/*.ex debian/*.EX debian/README.*
#
#
echo "creating source tar file"
#
tar cf - . | xz > ../subsurface_$VERSION.orig.tar.xz
#
#
echo "preparint the debian directory"
#
export DEBEMAIL=dirk@hohndel.org
mkdir -p debian
cp -a packaging/ubuntu/debian .
cp ../debian.changelog debian/changelog
# do something clever with changelog
mv debian/changelog debian/autocl
head -1 debian/autocl | sed -e 's/)/~trusty)/' -e 's/unstable/trusty/' > debian/changelog
cat ../subsurface/packaging/ubuntu/debian/changelog >> debian/changelog
tail -1 debian/autocl >> debian/changelog
rm -f debian/autocl
#mv debian/changelog debian/autocl
#head -1 debian/autocl | sed -e 's/)/~trusty)/' -e 's/unstable/trusty/' > debian/changelog
#cat ../subsurface/packaging/ubuntu/debian/changelog >> debian/changelog
#tail -1 debian/autocl >> debian/changelog
#rm -f debian/autocl
dch -i -D trusty -M
mv ~/src/debian.changelog ~/src/debian.changelog.previous
cp debian/changelog ~/src/debian.changelog
debuild -S