[PATCH] a small patchlet to maintain debian/changelog
Balazs Scheidler
bazsi at balabit.hu
Sun Jan 8 05:45:10 EST 2006
hi all,
First of all: ccontrol is cool, I've just upgraded my sarge to ubuntu
and it contains three different compilers, regularly changing my CC
environment variable sucks :)
Next: I've grabbed ccontrol 0.8.4, built a Debian package and it nicely
generated ccontrol_0.8.2-1_i386.deb. The version difference is caused by
the static version string in debian/changelog, the patch below adds some
lines to the configure script to check whether debian/changelog is
up-to-date and adds a template changelog entry if it is not.
I used the following template (to be stored in
debian/changelog.template.in):
ccontrol (@VERSION at -1) unstable; urgency=low
* New upstream release.
-- Michael Neuling <mikey at neuling.org> @DATE@
--- orig/configure
+++ mod/configure
@@ -81,6 +81,17 @@ else
echo $ASCIIDOC
fi
+DEBVERSION=`head -n1 debian/changelog | sed -e 's/^ccontrol (\([0-9.]\+\)-[0-9]\+) .*$/\1/'`
+
+if [ "$DEBVERSION" != "$VERSION" ]; then
+ echo "Fixing up debian/changelog as the version was changed."
+ # FIXME: -R is GNU date specific
+ DATE=`date -R`
+ cp debian/changelog debian/changelog.old
+ (sed -e "s/@VERSION@/$VERSION/" -e "s/@DATE@/$DATE/" debian/changelog.template.in ; cat debian/changelog.old) > debian/changelog
+ rm debian/changelog.old
+fi
+
echo sed -e \""s, at CC@,$CC,g\"" \
-e \""s, at BINDIR@,$BINDIR,g\"" \
-e \""s, at LIBDIR@,$LIBDIR,g\"" \
--
Bazsi
More information about the ccontrol
mailing list