aboutsummaryrefslogtreecommitdiffstats
path: root/community/php7-pecl-igbinary/APKBUILD
blob: ae4f2009eb3f5153bd0cf87914c247228b4795e1 (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
39
40
41
42
43
44
45
46
47
48
49
# Contributor: Andy Postnikov <apostnikov@gmail.com>
# Maintainer: Andy Postnikov <apostnikov@gmail.com>

pkgname=php7-pecl-igbinary
_extname=igbinary
pkgver=3.2.6
pkgrel=0
pkgdesc="Igbinary is a drop in replacement for the standard PHP 7 serializer - PECL"
url="https://pecl.php.net/package/igbinary"
arch="all"
license="BSD-3-Clause"
provides="php7-igbinary=$pkgver-r$pkgrel" # for backward compatibility
replaces="php7-igbinary" # for backward compatibility
depends="php7-common"
makedepends="php7-dev php7-pecl-apcu"
checkdepends="php7-json php7-session" # sessions needs work https://github.com/igbinary/igbinary/issues/116
source="php-pecl-$_extname-$pkgver.tgz::https://pecl.php.net/get/$_extname-$pkgver.tgz"
builddir="$srcdir/$_extname-$pkgver"

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

check() {
	local modules="/usr/lib/php7/modules"
	# Tests require extra extensions which are not bundled
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test \
		TESTS=--show-diff \
		PHP_TEST_SHARED_EXTENSIONS="
		-d extension=$modules/apcu.so \
		-d extension=$modules/json.so \
		-d extension=$modules/session.so \
		-d extension=modules/$_extname.so"
}

package() {
	make INSTALL_ROOT="$pkgdir" install
	local _confdir="$pkgdir"/etc/php7/conf.d
	install -d $_confdir
	echo "extension=$_extname" > $_confdir/10_$_extname.ini
}

sha512sums="
bb1a87f46b0ba2396a3d21b8cc2165498243a86182dc5814d85053bcac14fb099041ec9a67be975eb636e9fae411d2f2695848f0739ddb385c060d56c2f73f4a  php-pecl-igbinary-3.2.6.tgz
"