APKBUILD 1.21 KB
Newer Older
1 2
# Contributor: Nathan Johnson <nathan@nathanjohnson.info>
# Maintainer: Nathan Johnson <nathan@nathanjohnson.info>
3
pkgname=php7-pecl-couchbase
4
_pkgreal=couchbase
5 6
pkgver=2.6.1
pkgrel=0
7
pkgdesc="PHP extension for Couchbase - PECL"
8
url="https://pecl.php.net/package/couchbase"
9
arch="all"
10
license="Apache-2.0"
11 12
depends="php7-common php7-json php7-pecl-igbinary"
makedepends="php7-dev autoconf libcouchbase-dev re2c zlib-dev"
13
source="$pkgname-$pkgver.tgz::https://pecl.php.net/get/$_pkgreal-$pkgver.tgz"
14
builddir="$srcdir/$_pkgreal-$pkgver"
15 16
provides="php7-couchbase=$pkgver-r$pkgrel" # for backward compatibility
replaces="php7-couchbase" # for backward compatibility
17 18 19 20

build() {
	cd "$builddir"

21 22
	phpize7
	./configure --prefix=/usr --with-php-config=php-config7
23 24 25
	make
}

26 27 28 29 30
check() {
	# require couchbase and phpunit
	php7 -d extension="$builddir"/modules/$_pkgreal.so --ri $_pkgreal
}

31
package() {
32
	local confdir="$pkgdir/etc/php7/conf.d"
33 34 35 36 37 38 39 40
	cd "$builddir"

	make INSTALL_ROOT="$pkgdir" install

	mkdir -p "$confdir"
	echo "extension=$_pkgreal.so" > "$confdir"/$_pkgreal.ini
}

41
sha512sums="8a1548f51b081d25e2d331f7de4ef8e35fe232feefb2681258aecc4b51ed79928bf472898aad326b61e40af0f113bfc349ddc3cf7f3f984a06da4cfd14206577  php7-pecl-couchbase-2.6.1.tgz"