File: revision-number-as-deb-pkg.patch

package info (click to toggle)
xmds2 3.0.0+dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 51,956 kB
  • sloc: python: 64,216; cpp: 3,929; ansic: 1,463; makefile: 115; sh: 54
file content (19 lines) | stat: -rw-r--r-- 716 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Description: Insert Debian package version in subversionRevisionString 
Author: Rafael Laboissiere <rafael@debian.org>
Forwarded: not-needed
Last-Update: 2019-05-10

--- xmds2-2.1.4.orig/xpdeint/version.sh
+++ xmds2-2.1.4/xpdeint/version.sh
@@ -15,6 +15,11 @@ elif [ -f "Version.py" ]; then
   # File exists, let's not change the version
   exit
 fi
+if [ -f ../debian/changelog ] ; then
+    REVISION=$(head --lines=1 ../debian/changelog)
+    REVISION=${REVISION##*\(}
+    REVISION="\"Debian package ${REVISION%%\)*}\""
+fi
 echo "#!/usr/bin/env python3" > Version.py
 echo "# encoding: utf-8" >> Version.py
 echo "\"\"\"This is generated by the makefile via the shell program \'version.sh\'\"\"\"" >> Version.py