1
From: Guillaume Delacour <gui@iroqwa.org>
2
Subject: Fix binaries version
3
Last-Update: 2014-08-03
7
===================================================================
8
--- sslh.orig/genver.sh
14
-if ! `(git status | grep -q "On branch") 2> /dev/null`; then
15
- # If we don't have git, we can't work out what
16
- # version this is. It must have been downloaded as a
17
- # zip file. Github creates the zip file with all
18
- # files dated from the last change: use the
19
- # Makefile's modification time as a release number
20
- release=zip-`stat -c "%y" Makefile | sed 's/ .*//'`
23
-if head=`git rev-parse --verify HEAD 2>/dev/null`; then
24
- # generate the version info based on the tag
25
- release=`(git describe --tags || git --describe || git describe --all --long) \
26
- 2>/dev/null | tr -d '\n'`
28
- # Are there uncommitted changes?
29
- git update-index --refresh --unmerged > /dev/null
30
- if git diff-index --name-only HEAD | grep -v "^scripts/package" \
32
- release="$release-dirty"
36
+# Get the first changelog entry to fix the version
37
+release=$(head --lines 1 debian/changelog | sed "s/.*(\(.*\)).*/\\1/")
39
if [ $QUIET -ne 1 ]; then
40
printf "#ifndef _VERSION_H_ \n"