aboutsummaryrefslogtreecommitdiffstats
path: root/testing/php7-pecl-mongodb/APKBUILD
blob: 8463a1ac2dac3b970ca7d95c346cbd5e1df2e862 (plain)
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
# Contributor: Fabio Ribeiro <fabiorphp@gmail.com>
# Maintainer: Fabio Ribeiro <fabiorphp@gmail.com>
pkgname=php7-pecl-mongodb
_pkgreal=mongodb
pkgver=1.7.4
_pkgver=${pkgver/_rc/RC}
pkgrel=2
pkgdesc="PHP7 MongoDB driver"
url="https://pecl.php.net/package/mongodb"
arch="all"
license="Apache-2.0"
depends="php7-json"
makedepends="cyrus-sasl-dev icu-dev openssl-dev pcre-dev php7-dev re2c snappy-dev"
source="https://pecl.php.net/get/$_pkgreal-$_pkgver.tgz"
builddir="$srcdir"/$_pkgreal-$_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="$builddir"/modules/$_pkgreal.so --ri $_pkgreal
}

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

	local confdir="$pkgdir/etc/php7/conf.d"
	install -d $confdir
	echo "extension=$_pkgreal.so" > $confdir/$_pkgreal.ini
}

sha512sums="6805ce1d0958e24e1edf3bc9698bc1f4a9d31c26250624fd35aebf7a7d310af30050e1974cd9571f989303fce4c5522e793a8cb41388397df66e8f5fe0a648f2  mongodb-1.7.4.tgz"