let the git commitid printing work

This commit is contained in:
sthen 2014-10-10 13:40:01 +00:00
parent 5c39e2b175
commit b62b315b68
2 changed files with 17 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.1.1.1 2014/10/10 13:32:05 sthen Exp $
# $OpenBSD: Makefile,v 1.2 2014/10/10 13:40:01 sthen Exp $
COMMENT= motion detection software for video
@ -6,6 +6,7 @@ GH_ACCOUNT= Mr-Dave
GH_PROJECT= motion
GH_COMMIT= 7cfdf13cd63378e45589650f7d20195cb7bf9936
DISTNAME= motion-0.20140910
REVISION= 0
CATEGORIES= multimedia
@ -54,5 +55,7 @@ NO_TEST= Yes
pre-configure:
perl -pi -e s,/usr/local/etc,${SYSCONFDIR},g \
${WRKSRC}/motion-dist.conf.in
perl -pi -e s,%GH_COMMIT%,${GH_COMMIT:C/[0-9a-f]{33}$//}, \
${WRKSRC}/version.sh
.include <bsd.port.mk>

View File

@ -0,0 +1,13 @@
$OpenBSD: patch-version_sh,v 1.1 2014/10/10 13:40:01 sthen Exp $
--- version.sh.orig Wed Sep 10 03:53:41 2014
+++ version.sh Fri Oct 10 14:30:19 2014
@@ -1,8 +1,4 @@
#!/bin/sh
-SNV_VERSION=`cd "$1" && LC_ALL=C svn info 2> /dev/null | grep Revision | cut -d' ' -f2`
-test $SNV_VERSION || SNV_VERSION=`cd "$1" && grep revision .svn/entries 2>/dev/null | cut -d '"' -f2`
-test $SNV_VERSION || SNV_VERSION=UNKNOWN
-SNV_VERSION=`git show -s --format=%h`
-echo -n "3.2.12-Git-$SNV_VERSION"
+echo -n "3.2.12-Git-%GH_COMMIT%"