aboutsummaryrefslogtreecommitdiffstats
path: root/community/php7-pecl-mongodb/APKBUILD
blob: 74d41700218c69d08550da182ee323dbed136d08 (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
# Contributor: Fabio Ribeiro <fabiorphp@gmail.com>
# Maintainer: Fabio Ribeiro <fabiorphp@gmail.com>
pkgname=php7-pecl-mongodb
_extname=mongodb
pkgver=1.9.1
pkgrel=0
pkgdesc="PHP 7 MongoDB driver - PECL"
url="https://pecl.php.net/package/mongodb"
arch="all"
license="Apache-2.0"
depends="php7-json"
makedepends="cyrus-sasl-dev icu-dev openssl-dev php7-dev snappy-dev"
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz"
builddir="$srcdir"/$_extname-$pkgver
provides="php7-mongodb=$pkgver-r$pkgrel" # for backward compatibility
replaces="php7-mongodb" # for backward compatibility

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

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

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

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

sha512sums="e1ff9fba2268020862e917a38946a7f5f4cc5caf22b38e9ccf60b491cdee20f55b9643e8904cd934de48d31ca69b1c26dd86454f74572ce977669f908d4ffe51  php-pecl-mongodb-1.9.1.tgz"