aboutsummaryrefslogtreecommitdiffstats
path: root/testing/sslh/generate-version.patch
diff options
context:
space:
mode:
authortcely <tcely@users.noreply.github.com>2018-02-23 22:43:40 -0500
committerNatanael Copa <ncopa@alpinelinux.org>2018-03-05 23:03:16 +0000
commitb9375c7bb731f7e787cf7e0b3df59f70b6db3010 (patch)
treeaf6c5d04385aa851b92d831c058a2b1778edab35 /testing/sslh/generate-version.patch
parent5e316fce09fd7a8fc753744457088a248e6ef97a (diff)
downloadaports-b9375c7bb731f7e787cf7e0b3df59f70b6db3010.tar.bz2
aports-b9375c7bb731f7e787cf7e0b3df59f70b6db3010.tar.xz
testing/sslh: Upgrade to v1.19c
Diffstat (limited to 'testing/sslh/generate-version.patch')
-rw-r--r--testing/sslh/generate-version.patch72
1 files changed, 28 insertions, 44 deletions
diff --git a/testing/sslh/generate-version.patch b/testing/sslh/generate-version.patch
index 311c2d5712..f28bd0e8b8 100644
--- a/testing/sslh/generate-version.patch
+++ b/testing/sslh/generate-version.patch
@@ -1,35 +1,31 @@
-diff --git a/genver.sh b/genver.sh
-index 79fd0a0..3af41f7 100755
--- a/genver.sh
+++ b/genver.sh
-@@ -1,49 +1,6 @@
- #! /bin/sh
--
--if [ ${#} -eq 1 ] && [ "x$1" = "x-r" ]; then
-- # release text only
-- QUIET=1
--else
-- QUIET=0
--fi
--
+@@ -7,7 +7,20 @@
+ QUIET=0
+ fi
+
-if ! `(git status | grep -q "On branch") 2> /dev/null`; then
-- # If we don't have git, we can't work out what
-- # version this is. It must have been downloaded as a
-- # zip file.
--
-- # If downloaded from the release page, the directory
-- # has the version number.
-- release=`pwd | sed s/.*sslh-// | grep "[[:digit:]]"`
--
-- if [ "x$release" = "x" ]; then
-- # If downloaded from the head, Github creates the
-- # zip file with all files dated from the last
-- # change: use the Makefile's modification time as a
-- # release number
-- release=head-`perl -MPOSIX -e 'print strftime "%Y-%m-%d",localtime((stat "Makefile")[9])'`
-- fi
--fi
--
++if [ -d "$(realpath "$0" | sed -e 's,/[^/]*$,,')/.git" ]; then
++ if head=`git rev-parse --verify HEAD 2>/dev/null`; then
++ # generate the version info based on the tag
++ release=`(git describe --tags || git --describe || git describe --all --long) \
++ 2>/dev/null | tr -d '\n'`
++
++ # Are there uncommitted changes?
++ git update-index --refresh --unmerged > /dev/null
++ if git diff-index --name-only HEAD | grep -v "^scripts/package" \
++ | read dummy; then
++ release="$release-dirty"
++ fi
++ fi
++else
+ # If we don't have git, we can't work out what
+ # version this is. It must have been downloaded as a
+ # zip file.
+@@ -25,18 +38,6 @@
+ fi
+ fi
+
-if head=`git rev-parse --verify HEAD 2>/dev/null`; then
- # generate the version info based on the tag
- release=`(git describe --tags || git --describe || git describe --all --long) \
@@ -42,18 +38,6 @@ index 79fd0a0..3af41f7 100755
- release="$release-dirty"
- fi
-fi
--
--
--if [ $QUIET -ne 1 ]; then
-- printf "#ifndef VERSION_H \n"
-- printf "#define VERSION_H \n\n"
-- printf "#define VERSION \"$release\"\n"
-- printf "#endif\n"
--else
-- printf "$release\n"
--fi
-+release=$(cat ChangeLog | head -1 | cut -d: -f1 | tr -d [v])
-+printf "#ifndef VERSION_H \n"
-+printf "#define VERSION_H \n\n"
-+printf "#define VERSION \"$release\"\n"
-+printf "#endif\n"
+
+
+ if [ $QUIET -ne 1 ]; then