aboutsummaryrefslogtreecommitdiffstats
path: root/community/php7-pecl-memcached/APKBUILD
blob: d17ddf856b94b7ed4ae1c6f1ca404b0ea4d1a337 (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
40
41
42
43
44
45
# Contributor: Fabio Ribeiro <fabiorphp@gmail.com>
# Maintainer: Fabio Ribeiro <fabiorphp@gmail.com>
pkgname=php7-pecl-memcached
_pkgreal=memcached
pkgver=3.1.3
pkgrel=1
pkgdesc="PHP extension for interfacing with memcached via libmemcached library"
url="https://pecl.php.net/package/memcached"
arch="all"
license="PHP"
depends="php7-session php7-pecl-igbinary"
makedepends="php7-dev autoconf zlib-dev libmemcached-dev cyrus-sasl-dev re2c"
source="$pkgname-$pkgver.tgz::https://pecl.php.net/get/$_pkgreal-$pkgver.tgz"
builddir="$srcdir/$_pkgreal-$pkgver"
provides="php7-memcached=$pkgver-r$pkgrel" # for backward compatibility
replaces="php7-memcached" # for backward compatibility

build() {
	cd "$builddir"

	phpize7
	./configure \
		--prefix=/usr \
		--with-php-config=php-config7 \
		--enable-memcached-igbinary \
		--disable-memcached-sasl
	make
}

check() {
	# Tests require memcached server, basic check
	php7 -d extension="$builddir"/modules/$_pkgreal.so --ri $_pkgreal
}

package() {
	local confdir="$pkgdir/etc/php7/conf.d"
	cd "$builddir"

	make INSTALL_ROOT="$pkgdir" install

	mkdir -p "$confdir"
	echo "extension=$_pkgreal.so" > "$confdir"/20_$_pkgreal.ini
}

sha512sums="9c09648c26011c5e749bee1a556c976e6e5e648dc65580e7caa296dab79e3764edf1408f96edcaca5efb0229320c86fcfa0422e55d486beb6466892f7e08c4a3  php7-pecl-memcached-3.1.3.tgz"