~alpine/aports

[alpine-aports] [PATCH 1/4] testing/php5-amqp: upgrade to 1.7.1, redesigned with new pecl template

Details
Message ID
<20161128225503.32529-1-valery.kartel@gmail.com>
Sender timestamp
1480373703
DKIM signature
missing
Download raw message
Patch: +14 -57
--
I made a new simple enough APKBUILD template for php extensions.
It suitable to create packages for 5 & 7 php branches with minimal modifications.

So this one for php5 and the 2nd patch would be
for 7th branch (php7 with no binaries suffix expected).

When the patch for php7 where I removed suffix from binaries would applied,
then there is no way to make combined APKBUILDS for both 5 & 7 branches
like a testing/php-couchbase.

So the third and fourth patches are new aports for couchbase php extension
created with this template.
---
 testing/php5-amqp/APKBUILD              | 40 ++++++++++++---------------------
 testing/php5-amqp/package_version.patch | 31 -------------------------
 2 files changed, 14 insertions(+), 57 deletions(-)
 delete mode 100644 testing/php5-amqp/package_version.patch

diff --git a/testing/php5-amqp/APKBUILD b/testing/php5-amqp/APKBUILD
index 250e394..a33dfb2 100644
--- a/testing/php5-amqp/APKBUILD
+++ b/testing/php5-amqp/APKBUILD
@@ -1,46 +1,34 @@
# Contributor: Nathan Johnson <nathan@nathanjohnson.info>
# Maintainer: Nathan Johnson <nathan@nathanjohnson.info>
pkgname=php5-amqp
_pkgreal=amqp
pkgver=1.7.0
pkgver=1.7.1
pkgrel=0
pkgdesc="PHP extension couchbase"
url="http://pecl.php.net/package/$_pkgreal"
_pkgver=${pkgver/_rc/RC}
_pkgname=${pkgname#*-}
pkgdesc="Communicate with any AMQP compliant server"
url="http://pecl.php.net/package/$_pkgname"
arch="all"
license="PHP"
depends=""
pecldepends="php5-dev autoconf"
makedepends="$pecldepends rabbitmq-c-dev"
source="http://pecl.php.net/get/$_pkgreal-$pkgver.tgz
	package_version.patch"
builddir="$srcdir/$_pkgreal-$pkgver"
makedepends="${pkgname%%-*}-dev autoconf rabbitmq-c-dev"
source="http://pecl.php.net/get/$_pkgname-$_pkgver.tgz"
builddir="$srcdir"/$_pkgname-$_pkgver

build() {
	cd "$builddir"

	[ -f ./package.xml ] || mv ../package.xml . || return 1
	phpize || return 1
	./configure --prefix=/usr || return 1
	make || return 1

	# In order to run the unit tests, you must have a rabbitmq server
	# available.  Run the tests locally to ensure everything works,
	# but probably not a useful thing to tax the build server with this.
	# I have tested this for version 1.7.0 -- nj
	# make test || return 1
}

package() {
	cd "$builddir"

	make INSTALL_ROOT="$pkgdir"/ install || return 1
	install -d "$pkgdir"/etc/php5/conf.d || return 1
	echo "extension=$_pkgreal.so" > "$pkgdir"/etc/php5/conf.d/$_pkgreal.ini
	echo "extension=$_pkgname.so" > $_pkgname.ini
	install -Dm644 $_pkgname.ini \
		"$pkgdir"$(php-config | xargs -n1 | grep config-file-scan-dir | cut -d= -f2)/$_pkgname.ini
}

md5sums="5a701987a5c9d1f1b70b359e14d5162e  amqp-1.7.0.tgz
e4e9757fb1ae53b9d627bf52b2a8f157  package_version.patch"
sha256sums="b9a642c0ae60cc5e049c169a017cc355bfc0f2478db588b20925eaa63d358e83  amqp-1.7.0.tgz
717f407b667e11aaa7528555e311dbf468518480a33d57319e8a94d8a7bf865d  package_version.patch"
sha512sums="7fb16c1f49814e8eb74635672e80023bbe8655536efb28f9899c55ef328574dd806d51b7a39f972777cc643105acc6918b10009af09e4106b395b246c3463116  amqp-1.7.0.tgz
dcc1fc97528c8b8a04c13d6e9249f1afc0c77bb4bb8ae504c4579a76665e71727b99e547a4fbd1601a72ac5f503854f7dddf1f7e267c90ab32f5d81f52b092d6  package_version.patch"
md5sums="901befb3ba9c906e88ae810f83599baf  amqp-1.7.1.tgz"
sha256sums="38a92eaef1aa863404170bcd15605f7f78140eeec1ff5be6af65c5b8081e2599  amqp-1.7.1.tgz"
sha512sums="3cd712410e6614c764b307670ad2398d374bf438c20d28aaa96dc61cabc63530883f87cb1669d0370691b7ca901604a1d93fe81c4ca7dada776f923a368c3b19  amqp-1.7.1.tgz"
diff --git a/testing/php5-amqp/package_version.patch b/testing/php5-amqp/package_version.patch
deleted file mode 100644
index 65cfd56..0000000
--- a/testing/php5-amqp/package_version.patch
@@ -1,31 +0,0 @@
--- 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)
-- 
2.10.2



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)