aboutsummaryrefslogtreecommitdiffstats
path: root/community/php8-pecl-mongodb/APKBUILD
blob: 21208605ab9583cc50abf591fbbfa0d14d1059a4 (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
37
38
39
40
# Contributor: Fabio Ribeiro <fabiorphp@gmail.com>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php8-pecl-mongodb
_extname=mongodb
pkgver=1.12.0
pkgrel=1
pkgdesc="PHP 8.0 MongoDB driver - PECL"
url="https://pecl.php.net/package/mongodb"
arch="all"
license="Apache-2.0"
depends="php8-common"
makedepends="cyrus-sasl-dev icu-dev openssl1.1-compat-dev php8-dev snappy-dev"
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz"
builddir="$srcdir"/$_extname-$pkgver
provides="php8-mongodb=$pkgver-r$pkgrel" # for backward compatibility
replaces="php8-mongodb" # for backward compatibility

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

check() {
	# tests requires additional dependencies (vagrant)
	php8 -d extension=modules/$_extname.so --ri $_extname
}

package() {
	make INSTALL_ROOT="$pkgdir" install

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

sha512sums="
77a552a69e8abf7b27cfe226e2af1a3674a32b04e1436023085b002b4d48e4e6f7e743c48f2db2cc44e59f83a8a8ca6180bdfb6df09b4d8e6b8e43fa538fc3a5  php-pecl-mongodb-1.12.0.tgz
"