aboutsummaryrefslogtreecommitdiffstats
path: root/testing/php7-pecl-zstd/APKBUILD
blob: 182b32249577b0bf4d34ec1cf1697f975c64ba2d (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.9.0
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="5bef5a49de423911f0a3f13bb2a5cd70a1c1debd04c35f1ec5bc0f91194e9c4a05b260ff627cf07e0018898372c0c51a05c72da4c04769438d7956461dae743a  zstd-0.9.0.tgz"