From 176a7bf199e31c02cbb96d0fb5c8be6ffad70aa9 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Sat, 28 Feb 2015 18:24:43 +0100 Subject: [PATCH] debian: include the number of git patches in the version * configure.ac, debian/changelog.in: Adjust. * debian/source/format: Distribute this. * Makefile.am (deb): New target. --- Makefile.am | 24 +++++++++++++++++++----- configure.ac | 6 +++++- debian/changelog.in | 2 +- debian/source/format | 1 + 4 files changed, 26 insertions(+), 7 deletions(-) create mode 100644 debian/source/format diff --git a/Makefile.am b/Makefile.am index f31e2219a..153eef29d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -32,10 +32,14 @@ SUBDIRS = buddy lib src wrap ltdl iface doc $(NEVER_BENCH) UTF8 = utf8/doc/ReleaseNotes utf8/doc/utf8cpp.html utf8/utf8.h \ utf8/utf8/checked.h utf8/utf8/core.h utf8/utf8/unchecked.h -DEBIAN = debian/changelog.in debian/compat debian/control \ - debian/copyright debian/docs debian/rules debian/spot-doc.docs \ - debian/spot-doc.install debian/spot-doc.doc-base \ - debian/spot.install debian/libspot-dev.install +DEBIAN = debian/changelog debian/changelog.in debian/compat \ + debian/control debian/copyright debian/docs debian/rules \ + debian/source/format debian/spot-doc.docs debian/spot-doc.install \ + debian/spot-doc.doc-base debian/spot.install \ + debian/libspot-dev.install + +debian/changelog: configure.ac + $(top_builddir)/config.status --file debian/changelog ACLOCAL_AMFLAGS = -I m4 EXTRA_DIST = HACKING ChangeLog.1 tools/gitlog-to-changelog \ @@ -45,7 +49,7 @@ EXTRA_DIST = HACKING ChangeLog.1 tools/gitlog-to-changelog \ dist-hook: gen-ChangeLog gen_start = 2012-03-10 -.PHONY: gen-ChangeLog +.PHONY: gen-ChangeLog deb gen-ChangeLog: if test -d .git; then \ ## Generate all commits in the form "SHA1 subject" @@ -62,3 +66,13 @@ gen-ChangeLog: rm -f $(distdir)/ChangeLog; \ mv $(distdir)/cl-t $(distdir)/ChangeLog; \ fi + +# Build Debian packages. +# Run it with: make DEBUILDFLAGS=-j8 deb -j8 +deb: dist + rm -rf spot-$(VERSION) spot-$(VERSION)$(GITPATCH) + tar zxvf spot-$(VERSION).tar.gz + mv spot-$(VERSION) spot-$(VERSION)$(GITPATCH) + tar Jcvf spot_$(VERSION)$(GITPATCH).orig.tar.xz \ + spot-$(VERSION)$(GITPATCH) + cd spot-$(VERSION)$(GITPATCH) && debuild $(DEBUILDFLAGS) -us -uc diff --git a/configure.ac b/configure.ac index 788e2bb31..111f7f009 100644 --- a/configure.ac +++ b/configure.ac @@ -160,6 +160,11 @@ AC_CHECK_PROGS([SWIG], [swig3.0 swig], [swig]) AC_SUBST([CROSS_COMPILING], [$cross_compiling]) +AC_SUBST([GITPATCH], [$(if (git rev-parse) >/dev/null 2>&1; then + echo -n . + git rev-list $(git rev-list --tags --no-walk --max-count=1)..HEAD --count +fi)]) + AC_CONFIG_FILES([ Makefile bench/Makefile @@ -173,7 +178,6 @@ AC_CONFIG_FILES([ bench/spin13/Makefile bench/wdba/Makefile bench/stutter/Makefile - debian/changelog doc/Doxyfile doc/Makefile doc/tl/Makefile diff --git a/debian/changelog.in b/debian/changelog.in index 937610b8f..e444452ca 100644 --- a/debian/changelog.in +++ b/debian/changelog.in @@ -1,4 +1,4 @@ -spot (@VERSION@-1) unstable; urgency=low +spot (@VERSION@@GITPATCH@-1) unstable; urgency=low * Initial release diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt)