Subject: [alpine-aports] [PATCH 2/4] testing/php7-amqp: redesigned with new pecl template

From: Valery Kartel <[email-masked]>
Date: Tue, 29 Nov 2016 00:56:12 +0200

---
 testing/php7-amqp/APKBUILD | 28 +++++++++++++---------------
 1 file changed, 13 insertions(+), 15 deletions(-)

diff --git a/testing/php7-amqp/APKBUILD b/testing/php7-amqp/APKBUILD
index 8c7e93e..ce725f6 100644
--- a/testing/php7-amqp/APKBUILD
+++ b/testing/php7-amqp/APKBUILD
@@ -1,34 +1,32 @@
 # Contributor: Fabio Ribeiro <[email-masked]>
 # Maintainer: Fabio Ribeiro <[email-masked]>
 pkgname=php7-amqp
-_pkgreal=amqp
 pkgver=1.7.1
-pkgrel=0
+pkgrel=1
+_pkgver=${pkgver/_rc/RC}
+_pkgname=${pkgname#*-}
 pkgdesc="Communicate with any AMQP compliant server"
-url="http://pecl.php.net/package/$_pkgreal"
+url="http://pecl.php.net/package/$_pkgname"
 arch="all"
 license="PHP"
-depends=
-pecldepends="php7-dev autoconf rabbitmq-c-dev"
-makedepends="$pecldepends"
-install=""
-subpackages=""
-source="http://pecl.php.net/get/$_pkgreal-$pkgver.tgz"
-
-builddir="$srcdir"/$_pkgreal-$pkgver
+depends=""
+makedepends="${pkgname%%-*}-dev autoconf rabbitmq-c-dev"
+source="http://pecl.php.net/get/$_pkgname-$_pkgver.tgz"
+builddir="$srcdir"/$_pkgname-$_pkgver
 
 build() {
 	cd "$builddir"
-	phpize7 || return 1
-	./configure --prefix=/usr --with-php-config=php-config7 || return 1
+	phpize || return 1
+	./configure --prefix=/usr || return 1
 	make || return 1
 }
 
 package() {
 	cd "$builddir"
 	make INSTALL_ROOT="$pkgdir"/ install || return 1
-	install -d "$pkgdir"/etc/php7/conf.d || return 1
-	echo "extension=$_pkgreal.so" > "$pkgdir"/etc/php7/conf.d/40_$_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="901befb3ba9c906e88ae810f83599baf  amqp-1.7.1.tgz"
-- 
2.10.2

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---