aboutsummaryrefslogtreecommitdiffstats
path: root/testing/php5-amqp/package_version.patch
blob: 65cfd568fe9f73e26505709e83978d3a29ae9d83 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
--- a/config.m4
+++ b/config.m4
@@ -104,27 +104,7 @@
 
 	PHP_ADD_LIBRARY_WITH_PATH($LIBNAME, $AMQP_DIR/$PHP_LIBDIR, AMQP_SHARED_LIBADD)
 	PHP_SUBST(AMQP_SHARED_LIBADD)
-
-	if test -z "$TRAVIS" ; then
-		type git &>/dev/null
-
-		if test $? -eq 0 ; then
-			git describe --abbrev=0 --tags &>/dev/null
-
-			if test $? -eq 0 ; then
-				AC_DEFINE_UNQUOTED([PHP_AMQP_VERSION], ["`git describe --abbrev=0 --tags`-`git rev-parse --abbrev-ref HEAD`-dev"], [git version])
-			fi
-
-			git rev-parse --short HEAD &>/dev/null
-
-			if test $? -eq 0 ; then
-				AC_DEFINE_UNQUOTED([PHP_AMQP_REVISION], ["`git rev-parse --short HEAD`"], [git revision])
-			fi
-		else
-			AC_MSG_NOTICE([git not installed. Cannot obtain php_amqp version tag. Install git.])
-		fi
-	fi
-
+	AC_DEFINE_UNQUOTED([PHP_AMQP_VERSION], ["`echo ${PWD##*/amqp-}`"], ["AMQP Module Version"])
 	AMQP_SOURCES="amqp.c amqp_exchange.c amqp_queue.c amqp_connection.c amqp_connection_resource.c amqp_channel.c amqp_envelope.c"
 
 	PHP_NEW_EXTENSION(amqp, $AMQP_SOURCES, $ext_shared)