[Pkg-ocaml-maint-commits] [alt-ergo] 02/03: set build-date from debian/changelog entry
Ralf Treinen
treinen at moszumanska.debian.org
Tue May 26 19:09:48 UTC 2015
This is an automated email from the git hooks/post-receive script.
treinen pushed a commit to branch master
in repository alt-ergo.
commit 1c2ca6fa92ca642a900831dfe4f1692c1de00532
Author: Ralf Treinen <treinen at free.fr>
Date: Tue May 26 20:43:01 2015 +0200
set build-date from debian/changelog entry
---
debian/changelog | 11 +++++++++--
debian/patches/0003-allow-set-build-date | 24 ++++++++++++++++++++++++
debian/patches/series | 1 +
debian/rules | 5 ++++-
4 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 50a88d3..b5677e0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,8 +1,15 @@
alt-ergo (0.99.1+dfsg1-3) UNRELEASED; urgency=medium
* debian/control: fix domain name in Vcs fields
-
- -- Ralf Treinen <treinen at debian.org> Tue, 05 May 2015 18:12:05 +0200
+ * explicitly set the build date to the date of the last changelog entry
+ (closes: #786846):
+ - add patch 0003-allow-set-build-date to set the build date in the
+ Makefile in a variable
+ - debian/rules: pass the correct value of the build date to the Makefile
+ Thanks to Juan Picca <jumapico at gmail.com> and Jakub Wilk <jwilk at debian.org>
+ for the patch!
+
+ -- Ralf Treinen <treinen at debian.org> Tue, 26 May 2015 20:42:40 +0200
alt-ergo (0.99.1+dfsg1-2) unstable; urgency=low
diff --git a/debian/patches/0003-allow-set-build-date b/debian/patches/0003-allow-set-build-date
new file mode 100644
index 0000000..6a8de5c
--- /dev/null
+++ b/debian/patches/0003-allow-set-build-date
@@ -0,0 +1,24 @@
+Description: Allow set the build date
+ This patch moves the date command used for setting the build date to a
+ variable, allowing to set the build date externally.
+Author: Juan Picca <jumapico at gmail.com>,
+ updated by Jakub Wilk <jwilk at debian.org>
+Last-Update: 2015-05-25
+---
+--- a/Makefile.users
++++ b/Makefile.users
+@@ -1,4 +1,5 @@
+ ARCH = $(shell uname -m)
++BUILD_DATE ?= $(shell LANG=C date)
+
+ VERSION=0.99.1
+
+@@ -157,7 +158,7 @@ endif
+
+ src/util/version.ml: config.status
+ @echo "let version = \""$(VERSION)"\"" >> src/util/version.ml
+- @echo "let date = \""`LANG=en_US; date`"\"" >> src/util/version.ml
++ @echo "let date = \""$(BUILD_DATE)"\"" >> src/util/version.ml
+ @echo "let bindir = \""$(BINDIR)"\"" >> src/util/version.ml
+ @echo "let libdir = \""$(LIBDIR)"\"" >> src/util/version.ml
+ @echo "let pluginsdir = \""$(PLUGINSDIR)"\"" >> src/util/version.ml
diff --git a/debian/patches/series b/debian/patches/series
index 1d33aa5..4220390 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
0001-No-need-to-activate-debug-flag.patch
0002-non-free-dropped
+0003-allow-set-build-date
\ No newline at end of file
diff --git a/debian/rules b/debian/rules
index 8eea779..07b21ab 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,10 +3,13 @@
#export DH_VERBOSE=1
+LAST_CHANGE=$(shell dpkg-parsechangelog -S Date)
+BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
+
include /usr/share/ocaml/ocamlvars.mk
override_dh_auto_build:
- $(MAKE) all gui
+ $(MAKE) all gui BUILD_DATE="$(BUILD_DATE)"
override_dh_auto_install:
$(MAKE) DESTDIR=debian/tmp install install-gui
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/alt-ergo.git
More information about the Pkg-ocaml-maint-commits
mailing list