diff options
Diffstat (limited to 'testing')
-rw-r--r-- | testing/php-couchbase/APKBUILD | 63 | ||||
-rw-r--r-- | testing/php5-couchbase/APKBUILD | 36 | ||||
-rw-r--r-- | testing/php7-couchbase/APKBUILD | 34 |
3 files changed, 63 insertions, 70 deletions
diff --git a/testing/php-couchbase/APKBUILD b/testing/php-couchbase/APKBUILD new file mode 100644 index 0000000000..ffd3b7b8c4 --- /dev/null +++ b/testing/php-couchbase/APKBUILD @@ -0,0 +1,63 @@ +# Contributor: Nathan Johnson <nathan@nathanjohnson.info> +# Maintainer: Nathan Johnson <nathan@nathanjohnson.info> +pkgname=php-couchbase +_pkgname=couchbase +pkgver=2.2.3 +pkgrel=0 +pkgdesc="PHP extension couchbase" +url="http://pecl.php.net/package/$_pkgname" +arch="noarch" +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)" + arch="all" + 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="f58ee1596ade978832f033f2e1662579 couchbase-2.2.3.tgz" +sha256sums="5c998e9c98e51a783a5d74ec36aa6ac740a4a958dd8c206ed9e9d1580234907f couchbase-2.2.3.tgz" +sha512sums="d1feeb33a8ce450919731d17f84b170eaa68da104cedfe8ffa56f4e2e6062e250077d00babaca4872cc5bf271509daee2ca83e35cfb4b8ceef4b402cc20c1bf3 couchbase-2.2.3.tgz" diff --git a/testing/php5-couchbase/APKBUILD b/testing/php5-couchbase/APKBUILD deleted file mode 100644 index 7a168b9730..0000000000 --- a/testing/php5-couchbase/APKBUILD +++ /dev/null @@ -1,36 +0,0 @@ -# Contributor: Nathan Johnson <nathan@nathanjohnson.info> -# Maintainer: Nathan Johnson <nathan@nathanjohnson.info> -pkgname=php5-couchbase -_pkgreal=couchbase -replaces=php-couchbase -replaces_priority=1 -pkgver=2.2.3 -pkgrel=0 -pkgdesc="PHP extension couchbase" -url="http://pecl.php.net/package/$_pkgreal" -arch="all" -license="ASL 2.0" -depends="" -pecldepends="php5-dev autoconf" -makedepends="$pecldepends libcouchbase-dev zlib-dev" -source="http://pecl.php.net/get/$_pkgreal-$pkgver.tgz" -builddir="$srcdir/$_pkgreal-$pkgver" - -build() { - cd "$builddir" - phpize || return 1 - ./configure --prefix=/usr || return 1 - make || return 1 - 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 -} - -md5sums="f58ee1596ade978832f033f2e1662579 couchbase-2.2.3.tgz" -sha256sums="5c998e9c98e51a783a5d74ec36aa6ac740a4a958dd8c206ed9e9d1580234907f couchbase-2.2.3.tgz" -sha512sums="d1feeb33a8ce450919731d17f84b170eaa68da104cedfe8ffa56f4e2e6062e250077d00babaca4872cc5bf271509daee2ca83e35cfb4b8ceef4b402cc20c1bf3 couchbase-2.2.3.tgz" diff --git a/testing/php7-couchbase/APKBUILD b/testing/php7-couchbase/APKBUILD deleted file mode 100644 index d119a59152..0000000000 --- a/testing/php7-couchbase/APKBUILD +++ /dev/null @@ -1,34 +0,0 @@ -# Contributor: Nathan Johnson <nathan@nathanjohnson.info> -# Maintainer: Nathan Johnson <nathan@nathanjohnson.info> -pkgname=php7-couchbase -_pkgreal=couchbase -pkgver=2.2.3 -pkgrel=0 -pkgdesc="PHP extension couchbase" -url="http://pecl.php.net/package/$_pkgreal" -arch="all" -license="ASL 2.0" -depends="" -pecldepends="php7-dev autoconf" -makedepends="$pecldepends libcouchbase-dev zlib-dev" -source="${pkgname}-${pkgver}.tgz::http://pecl.php.net/get/$_pkgreal-$pkgver.tgz" -builddir="$srcdir/$_pkgreal-$pkgver" - -build() { - cd "$builddir" - phpize7 || return 1 - ./configure --prefix=/usr --with-php-config=/usr/bin/php-config7 || return 1 - make || return 1 - make test || 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/$_pkgreal.ini -} - -md5sums="f58ee1596ade978832f033f2e1662579 php7-couchbase-2.2.3.tgz" -sha256sums="5c998e9c98e51a783a5d74ec36aa6ac740a4a958dd8c206ed9e9d1580234907f php7-couchbase-2.2.3.tgz" -sha512sums="d1feeb33a8ce450919731d17f84b170eaa68da104cedfe8ffa56f4e2e6062e250077d00babaca4872cc5bf271509daee2ca83e35cfb4b8ceef4b402cc20c1bf3 php7-couchbase-2.2.3.tgz" |