[med-svn] [scythe] 01/02: Really treat VERSION as string
Andreas Tille
tille at debian.org
Thu Mar 16 13:31:20 UTC 2017
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository scythe.
commit 0606fbe467b22517e516e22572e1fb58f11dcd64
Author: Andreas Tille <tille at debian.org>
Date: Thu Mar 16 14:21:38 2017 +0100
Really treat VERSION as string
---
debian/changelog | 8 ++++++
...-package-version-from-dpkg-parsechangelog.patch | 2 +-
.../patches/0004-Include-CPPFLAGS-in-CFLAGS.patch | 4 +--
debian/patches/0005-treat-VERSION-as-string.patch | 30 ++++++++++++++++++++++
debian/patches/series | 1 +
5 files changed, 41 insertions(+), 4 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 3c31f85..6579b7f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+scythe (0.994-4) UNRELEASED; urgency=medium
+
+ * Team upload.
+ * Really treat VERSION as string
+ Closes: #857900
+
+ -- Andreas Tille <tille at debian.org> Thu, 16 Mar 2017 14:19:14 +0100
+
scythe (0.994-3) unstable; urgency=medium
[ Kevin Murray ]
diff --git a/debian/patches/0003-Get-package-version-from-dpkg-parsechangelog.patch b/debian/patches/0003-Get-package-version-from-dpkg-parsechangelog.patch
index adecb79..cec7cb3 100644
--- a/debian/patches/0003-Get-package-version-from-dpkg-parsechangelog.patch
+++ b/debian/patches/0003-Get-package-version-from-dpkg-parsechangelog.patch
@@ -13,7 +13,7 @@ index 3cabbbd..1c98cce 100644
@@ -1,5 +1,5 @@
PROGRAM_NAME = scythe
-VERSION = 0.994
-+VERSION ="$(shell dpkg-parsechangelog | grep '^Version:' | cut -f 2 -d ' ')"
++VERSION ='"$(shell dpkg-parsechangelog | grep '^Version:' | cut -f 2 -d ' ')"'
CC = gcc
DEBUG ?= 0
ifeq ($(DEBUG), 1)
diff --git a/debian/patches/0004-Include-CPPFLAGS-in-CFLAGS.patch b/debian/patches/0004-Include-CPPFLAGS-in-CFLAGS.patch
index 800c5bc..f45abb7 100644
--- a/debian/patches/0004-Include-CPPFLAGS-in-CFLAGS.patch
+++ b/debian/patches/0004-Include-CPPFLAGS-in-CFLAGS.patch
@@ -6,13 +6,11 @@ Subject: Include CPPFLAGS in CFLAGS
Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
-diff --git a/Makefile b/Makefile
-index 1c98cce..547be78 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
PROGRAM_NAME = scythe
- VERSION ="$(shell dpkg-parsechangelog | grep '^Version:' | cut -f 2 -d ' ')"
+ VERSION ='"$(shell dpkg-parsechangelog | grep '^Version:' | cut -f 2 -d ' ')"'
-CC = gcc
+CC ?= gcc
DEBUG ?= 0
diff --git a/debian/patches/0005-treat-VERSION-as-string.patch b/debian/patches/0005-treat-VERSION-as-string.patch
new file mode 100644
index 0000000..327fb76
--- /dev/null
+++ b/debian/patches/0005-treat-VERSION-as-string.patch
@@ -0,0 +1,30 @@
+Author: Andreas Tille <tille at debian.org>
+Last-Update: Thu, 16 Mar 2017 14:19:14 +0100
+Bug-Debian: https://bugs.debian.org/857900
+Description: Make sure also C-code interprets VERSION as string
+
+--- a/src/scythe.c
++++ b/src/scythe.c
+@@ -30,7 +30,7 @@ static const float default_prior = 0.3;
+ #endif
+
+ #ifndef VERSION
+-#define VERSION 0.994
++#define VERSION "0.994"
+ #endif
+
+ /* Options drawn from GNU's coreutils/src/system.h */
+@@ -50,11 +50,11 @@ enum {
+ break;
+ #define case_GETOPT_VERSION_CHAR(Program_name, Version, Authors) \
+ case GETOPT_VERSION_CHAR: \
+- fprintf(stdout, "%s version %0.3f\nCopyright (c) 2011 The Regents " \
++ fprintf(stdout, "%s version %s\nCopyright (c) 2011 The Regents " \
+ "of University of California, Davis Campus.\n" \
+ "%s is free software and comes with ABSOLUTELY NO WARRANTY.\n" \
+ "Distributed under the MIT License.\n\nWritten by %s\n", \
+- Program_name, (double) Version, Program_name, Authors); \
++ Program_name, Version, Program_name, Authors); \
+ exit(EXIT_SUCCESS); \
+ break;
+ /* end code drawn from system.h */
diff --git a/debian/patches/series b/debian/patches/series
index 52103e2..e7d6445 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,3 +2,4 @@
0002-Fix-typos-in-binary.patch
0003-Get-package-version-from-dpkg-parsechangelog.patch
0004-Include-CPPFLAGS-in-CFLAGS.patch
+0005-treat-VERSION-as-string.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/scythe.git
More information about the debian-med-commit
mailing list