diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-05-01 23:41:56 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-05-02 01:53:18 +0200 |
commit | d80b679a7d73b55df0f340da427f67f5c110061c (patch) | |
tree | d465669f036385df919a951d0ec2753f65d490c1 | |
parent | 314904db8f5b354126987cb8ecf015c7e65eab9d (diff) | |
download | aports-d80b679a7d73b55df0f340da427f67f5c110061c.tar.bz2 aports-d80b679a7d73b55df0f340da427f67f5c110061c.tar.xz |
testing/php7-couchbase: build only for php7, cleanup and improve abuild
-rw-r--r-- | testing/php-couchbase/APKBUILD | 62 | ||||
-rw-r--r-- | testing/php7-couchbase/APKBUILD | 37 |
2 files changed, 37 insertions, 62 deletions
diff --git a/testing/php-couchbase/APKBUILD b/testing/php-couchbase/APKBUILD deleted file mode 100644 index 4b1e93e384..0000000000 --- a/testing/php-couchbase/APKBUILD +++ /dev/null @@ -1,62 +0,0 @@ -# Contributor: Nathan Johnson <nathan@nathanjohnson.info> -# Maintainer: Nathan Johnson <nathan@nathanjohnson.info> -pkgname=php-couchbase -_pkgname=couchbase -pkgver=2.3.1 -pkgrel=0 -pkgdesc="PHP extension couchbase" -url="http://pecl.php.net/package/$_pkgname" -arch="all" -license="ASL-2.0" -depends="" -makedepends="autoconf libcouchbase-dev zlib-dev" -subpackages="" -source="http://pecl.php.net/get/$_pkgname-$pkgver.tgz" -builddir="$srcdir/$_pkgname-$pkgver" - -_phpversions="5 7" -for _v in $_phpversions; do - makedepends="$makedepends php$_v-dev" - subpackages="$subpackages php$_v-${pkgname#php-}:_subpackage" -done - -prepare() { - default_prepare || return 1 - - local ver; for ver in $_phpversions; do - cp -ar "$builddir" "$builddir-$ver" - done -} - -build() { - local ver; for ver in $_phpversions; do - cd "$builddir-$ver" - - phpize$ver || return 1 - ./configure --prefix=/usr \ - --with-php-config=/usr/bin/php-config$ver || return 1 - make || return 1 - make test || return 1 - done -} - -package() { - mkdir -p "$pkgdir" -} - -_subpackage() { - local ver="${subpkgname:3:1}" - pkgdesc="$pkgdesc (for PHP $ver)" - depends="$depends php$ver" - install_if="$pkgname=$pkgver-r$pkgrel php$ver" - [ "$ver" = 5 ] && replaces="$pkgname" - - make -C "$builddir-$ver" INSTALL_ROOT="$subpkgdir" install || return 1 - - install -d "$subpkgdir"/etc/php$ver/conf.d || return 1 - echo "extension=$_pkgname.so" > "$subpkgdir"/etc/php$ver/conf.d/$_pkgname.ini -} - -md5sums="47543b13afa0cbdd64142e0b5fefa443 couchbase-2.3.1.tgz" -sha256sums="d9c70bcf6f65626dfe7e51a0527fea35cde28145f74a0ddbf41a64d395f7a493 couchbase-2.3.1.tgz" -sha512sums="8a0003968d6ec7fec2961ea24c0677962c165cd0db4ebbcd3ec0d7ef50bd5e9788a4725ae4c18c5a558b30de44392c176d93d23980d489fd255546393a7a77f5 couchbase-2.3.1.tgz" diff --git a/testing/php7-couchbase/APKBUILD b/testing/php7-couchbase/APKBUILD new file mode 100644 index 0000000000..f1c7ec78e1 --- /dev/null +++ b/testing/php7-couchbase/APKBUILD @@ -0,0 +1,37 @@ +# Contributor: Nathan Johnson <nathan@nathanjohnson.info> +# Maintainer: Nathan Johnson <nathan@nathanjohnson.info> +pkgname=php7-couchbase +_pkgreal=couchbase +pkgver=2.3.1 +pkgrel=0 +_phpver=${pkgname#php} +_phpver=${_phpver%%-*} +pkgdesc="PHP$_phpver extension for Couchbase" +url="http://pecl.php.net/package/couchbase" +arch="all" +license="ASL-2.0" +depends="php$_phpver-common php$_phpver-json" +makedepends="php$_phpver-dev autoconf libcouchbase-dev zlib-dev" +source="$pkgname-$pkgver.tgz::http://pecl.php.net/get/$_pkgreal-$pkgver.tgz" +options="!check" +builddir="$srcdir/$_pkgreal-$pkgver" + +build() { + cd "$builddir" + + phpize$_phpver + ./configure --prefix=/usr --with-php-config=php-config$_phpver + make +} + +package() { + local confdir="$pkgdir/etc/php$_phpver/conf.d" + cd "$builddir" + + make INSTALL_ROOT="$pkgdir" install + + mkdir -p "$confdir" + echo "extension=$_pkgreal.so" > "$confdir"/$_pkgreal.ini +} + +sha512sums="8a0003968d6ec7fec2961ea24c0677962c165cd0db4ebbcd3ec0d7ef50bd5e9788a4725ae4c18c5a558b30de44392c176d93d23980d489fd255546393a7a77f5 php7-couchbase-2.3.1.tgz" |