Hi!

The patch I submitted earlier removed the timestamp from the build
system. After checking the new build I noticed that the man pages where
not correct (the package version appeared where the date was supposed to
appear). I've made an improvement on the patch. In this case no
timestamp is removed: the build date in the man page can now be set
externally, and specifically it is set to the last debian/changelog entry.

-- 
Dhole
diff -Nru 0xffff-0.6.1/debian/changelog 0xffff-0.6.1/debian/changelog
--- 0xffff-0.6.1/debian/changelog       2015-05-27 17:45:22.000000000 +0200
+++ 0xffff-0.6.1/debian/changelog       2015-06-15 12:56:24.000000000 +0200
@@ -1,3 +1,12 @@
+0xffff (0.6.1-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Patch build system to allow the build date in the man entry to be set 
+    externally, and set it to the latest debian/changelog entry for
+    reproducibility.
+
+ -- Dhole <dh...@openmailbox.org>  Mon, 15 Jun 2015 12:56:06 +0200
+
 0xffff (0.6.1-2) unstable; urgency=medium
 
   * Upload to unstable
diff -Nru 0xffff-0.6.1/debian/patches/fix_build_date 
0xffff-0.6.1/debian/patches/fix_build_date
--- 0xffff-0.6.1/debian/patches/fix_build_date  1970-01-01 01:00:00.000000000 
+0100
+++ 0xffff-0.6.1/debian/patches/fix_build_date  2015-06-15 12:56:56.000000000 
+0200
@@ -0,0 +1,51 @@
+Description: Set build date externally
+ .
+ 0xffff (0.6.1-2.1) UNRELEASED; urgency=medium
+ .
+   * Non-maintainer upload.
+   * Patch build system to allow the build date in the man entry to be set
+     externally, and set it to the latest debian/changelog entry for
+     reproducibility.
+Author: Dhole <dh...@openmailbox.org>
+
+---
+
+--- 0xffff-0.6.1.orig/src/Makefile
++++ 0xffff-0.6.1/src/Makefile
+@@ -3,11 +3,13 @@ include ../config.mk
+ PREFIX ?= /usr/local
+ INSTALL ?= install
+ 
++BUILD_DATE ?= $(shell date '+%b %e %Y')
++
+ CC = gcc
+ CROSS_CC = $(CROSS_COMPILE)$(CC)
+ HOST_CC = $(HOST_COMPILE)$(CC)
+ 
+-CPPFLAGS += -DVERSION=\"$(VERSION)\" -D_GNU_SOURCE
++CPPFLAGS += -DVERSION=\"$(VERSION)\" -DBUILD_DATE="\"$(BUILD_DATE)\"" 
-D_GNU_SOURCE
+ CFLAGS += -W -Wall -O2 -pedantic -std=c99
+ LIBS += -lusb
+ 
+--- 0xffff-0.6.1.orig/src/mangen.c
++++ 0xffff-0.6.1/src/mangen.c
+@@ -25,6 +25,10 @@
+ #define INFO NAME " \\- Open Free Fiasco Firmware Flasher, version " VERSION
+ #define DESCRIPTION "0xFFFF is Open Free Fiasco Firmware Flasher for Maemo 
devices. It support generating and unpacking FIASCO images on local computer. 
Useful for editing Maemo firmware package for future flash. It support via USB 
flashing any image type to Maemo device and also \"cold\" flashing which means 
flashing dead device with erased bootloader. There is support for booting 
kernel via USB without flashing to NAND and also changing configuration of 
Maemo device (enable/disable R&D mode, changing HW revision strings, 
...).\n\n0xFFFF is alternative tool to proprietary Nokia flasher-3.5 and 
fiasco-gen. 0xFFFF generate compatible FIASCO images and also accept FIASCO 
images generated by Nokia fiasco-gen."
+ 
++#ifndef BUILD_DATE
++#define BUILD_DATE __DATE__
++#endif
++
+ int main() {
+ 
+       FILE * pipe;
+@@ -34,7 +38,7 @@ int main() {
+       if ( ! pipe )
+               return 1;
+ 
+-      puts(".TH " NAME " 1 \"" __DATE__ "\" \"" NAME " " VERSION "\"");
++      puts(".TH " NAME " 1 \"" BUILD_DATE "\" \"" NAME " " VERSION "\"");
+       puts("");
+ 
+       puts(".SH NAME");
diff -Nru 0xffff-0.6.1/debian/patches/series 0xffff-0.6.1/debian/patches/series
--- 0xffff-0.6.1/debian/patches/series  1970-01-01 01:00:00.000000000 +0100
+++ 0xffff-0.6.1/debian/patches/series  2015-06-15 12:56:39.000000000 +0200
@@ -0,0 +1 @@
+fix_build_date
diff -Nru 0xffff-0.6.1/debian/rules 0xffff-0.6.1/debian/rules
--- 0xffff-0.6.1/debian/rules   2015-05-27 17:45:22.000000000 +0200
+++ 0xffff-0.6.1/debian/rules   2015-06-15 12:55:33.000000000 +0200
@@ -1,5 +1,7 @@
 #!/usr/bin/make -f
 
+export BUILD_DATE = $(shell LC_ALL=C date -u --date="`dpkg-parsechangelog 
-SDate`" +'%b %e %Y')
+
 %:
        dh $@
 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to