aboutsummaryrefslogtreecommitdiffstats
path: root/testing/php7-pecl-zstd/APKBUILD
blob: ab69d2aa39e190624fd0475652faae0c25659782 (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
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php7-pecl-zstd
_pkgreal=zstd
pkgver=0.8.1
pkgrel=0
pkgdesc="PECL Zstandard extension."
url="https://pecl.php.net/package/zstd"
arch="all !armhf" # tests fails on armhf
license="MIT"
depends="php7-common"
makedepends="php7-dev autoconf re2c zstd-dev"
checkdepends="php7-openssl"
source="https://pecl.php.net/get/$_pkgreal-$pkgver.tgz"
builddir="$srcdir/$_pkgreal-$pkgver"
provides="php7-zstd=$pkgver-r$pkgrel" # for backward compatibility
replaces="php7-zstd" # for backward compatibility

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

check() {
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test PHP_TEST_SHARED_EXTENSIONS=" \
		-d extension=/usr/lib/php7/modules/openssl.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/$_pkgreal.ini
}

sha512sums="ad18426bf09b9d15123dfa7e2ee7461e360df3784e98554e300a8719c5ef6b31466da239d6ac82bc2e24d79a6399017da26b59d4c067e24c6a58d6d9a1d678ce  zstd-0.8.1.tgz"