# Contributor: Carlo Landmeter <clandmeter@gmail.com>
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=php7-apcu
_pkgreal=apcu
# release 5 is php7+
pkgver=5.1.8
pkgrel=1
pkgdesc="PHP extension APC User Cache"
url="http://pecl.php.net/package/$_pkgreal"
arch="all"
license="PHP"
depends=""
makedepends="pcre-dev php7-dev autoconf"
source="http://pecl.php.net/get/$_pkgreal-$pkgver.tgz"
builddir="$srcdir/$_pkgreal-$pkgver"

build() {
	cd "$builddir"

	phpize7 || return 1
	./configure --prefix=/usr --with-php-config=php-config7 || return 1
	make || return 1
}

package() {
	cd "$builddir"

	make INSTALL_ROOT="$pkgdir"/ install || return 1
	install -d "$pkgdir"/etc/php7/conf.d || return 1
	echo "extension=$_pkgreal.so" > "$pkgdir"/etc/php7/conf.d/$_pkgreal.ini
}

md5sums="0ef8be2ee8acb4dba5a66b247a254995  apcu-5.1.8.tgz"
sha256sums="01dfbf0245d8cc0f51ba16467a60b5fad08e30b28df7846e0dd213da1143ecce  apcu-5.1.8.tgz"
sha512sums="4f377389e713bcae5534c64ea28f72c20ab2176aa758188c4d956c1f2370be49bc33dd2a1db43941fff5344a164aaeebc4e73e6d579f62d17334bcc520171526  apcu-5.1.8.tgz"
