aboutsummaryrefslogtreecommitdiffstats
path: root/community/php8-pecl-couchbase/APKBUILD
blob: 91a7d518d54aa8a1065370fa4eb6a7663f402106 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Contributor: Nathan Johnson <nathan@nathanjohnson.info>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php8-pecl-couchbase
_extname=couchbase
pkgver=3.1.1
pkgrel=0
pkgdesc="PHP 8 extension for Couchbase - PECL"
url="https://pecl.php.net/package/couchbase"
arch="all"
license="Apache-2.0"
depends="php8-pecl-igbinary"
makedepends="php8-dev libcouchbase-dev chrpath"
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz"
builddir="$srcdir/$_extname-$pkgver"

build() {
	phpize8
	./configure --prefix=/usr --with-php-config=php-config8
	make
}

check() {
	# require couchbase and phpunit
	php8 -d extension="$builddir"/modules/$_extname.so --ri $_extname
}

package() {
	make INSTALL_ROOT="$pkgdir" install
	chrpath -d "$pkgdir"/usr/lib/php8/modules/$_extname.so

	local _confdir="$pkgdir"/etc/php8/conf.d
	mkdir -p $_confdir
	echo "extension=$_extname" > $_confdir/$_extname.ini
}

sha512sums="9fb53f2190d1ca426355ed680f3a4b81f0bac7aeb1b0fe26056dbb8fd97ce75e75ba47624fd03ca3e0419125cce66ba27500dcd173a05edbe14fed132d436678  php-pecl-couchbase-3.1.1.tgz"