aboutsummaryrefslogtreecommitdiffstats
path: root/community/php7-pecl-msgpack/APKBUILD
blob: 775624a906f5117109e4e9fd8b8e7fb47be5a890 (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
# Contributor: Fabio Ribeiro <fabiorphp@gmail.com>
# Maintainer: Fabio Ribeiro <fabiorphp@gmail.com>
pkgname=php7-pecl-msgpack
_pkgreal=msgpack
pkgver=2.1.0
pkgrel=0
pkgdesc="PHP extension provides API for communicating with MessagePack serialization - PECL"
url="https://pecl.php.net/package/msgpack"
arch="all"
license="BSD-3-Clause"
depends="php7-session php7-sockets"
makedepends="php7-dev autoconf re2c"
source="https://pecl.php.net/get/$_pkgreal-$pkgver.tgz"
builddir="$srcdir"/$_pkgreal-$pkgver
provides="php7-msgpack=$pkgver-r$pkgrel" # for backward compatibility
replaces="php7-msgpack" # for backward compatibility

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

check() {
	rm -f tests/034.phpt # https://github.com/msgpack/msgpack-php/issues/136
	rm -f tests/035.phpt # may fail in a slow environment https://github.com/msgpack/msgpack-php/issues/123
	# Tests require session and sockets extensions which are not bundled
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test PHP_TEST_SHARED_EXTENSIONS="
		-d extension=/usr/lib/php7/modules/session.so \
		-d extension=/usr/lib/php7/modules/sockets.so \
		-d extension=modules/$_pkgreal.so"
}

package() {
	make INSTALL_ROOT="$pkgdir"/ install
	install -d "$pkgdir"/etc/php7/conf.d
	echo "extension=$_pkgreal.so" > "$pkgdir"/etc/php7/conf.d/50_$_pkgreal.ini
}

sha512sums="e024694076224796b2fb4dbd4473c5ac782951911437d0ee668231a1908f924a3a28dd616c0821929b425ee5ec06ef51f870f15b677171429049f4ae5f7befb7  msgpack-2.1.0.tgz"