APKBUILD 1.15 KB
Newer Older
1 2
# Contributor: Fabio Ribeiro <fabiorphp@gmail.com>
# Maintainer: Fabio Ribeiro <fabiorphp@gmail.com>
3
pkgname=php7-pecl-mongodb
4
_pkgreal=mongodb
5
pkgver=1.8.1
6
_pkgver=${pkgver/_rc/RC}
7
pkgrel=0
8
pkgdesc="PHP7 MongoDB driver"
9
url="https://pecl.php.net/package/mongodb"
10
arch="all"
11
license="Apache-2.0"
12
depends="php7-json"
13
makedepends="cyrus-sasl-dev icu-dev openssl-dev pcre-dev php7-dev re2c snappy-dev"
14
source="https://pecl.php.net/get/$_pkgreal-$_pkgver.tgz"
15
builddir="$srcdir"/$_pkgreal-$_pkgver
16 17
provides="php7-mongodb=$pkgver-r$pkgrel" # for backward compatibility
replaces="php7-mongodb" # for backward compatibility
18 19

build() {
20
	phpize7
21
	./configure --prefix=/usr \
22 23
		--with-php-config=/usr/bin/php-config7
	make
24 25
}

26 27 28 29 30
check() {
	# tests requires additional dependencies (vagrant)
	php7 -d extension="$builddir"/modules/$_pkgreal.so --ri $_pkgreal
}

31
package() {
32
	make INSTALL_ROOT="$pkgdir/" install
33 34 35 36

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

39
sha512sums="a80682e3a90ead699a930185c3d10bc3a86b335b45891be6d41ef829fab6f2f2468adb5973735048fa98bb6aaa9c8568ba9f7df5709916d5b6f7676c77188d0c  mongodb-1.8.1.tgz"