aboutsummaryrefslogtreecommitdiffstats
path: root/testing/php7-pecl-decimal/APKBUILD
blob: 440bdc2be1eac8ae4637cda5bdf354c6ecefb173 (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
# Maintainer: Andy Postnikov <apostnikov@gmail.com>
pkgname=php7-pecl-decimal
_pkgreal=decimal
pkgver=1.3.1
pkgrel=0
pkgdesc="Correctly-rounded arbitrary precision decimal floating-point arithmetic in PHP."
url="https://pecl.php.net/package/decimal"
arch="all"
license="MIT"
depends="php7-json"
makedepends="php7-dev re2c mpdecimal"
source="https://pecl.php.net/get/$_pkgreal-$pkgver.tgz"
builddir="$srcdir/$_pkgreal-$pkgver"
provides="php7-decimal=$pkgver-r$pkgrel" # for backward compatibility
replaces="php7-decimal" # for backward compatibility

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

check() {
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test PHP_TEST_SHARED_EXTENSIONS=" \
		-d extension=/usr/lib/php7/modules/json.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="8e3fa73c875d6b4df09c1a23569abd1487226112e9e91f2e1e02ad8118fc06e5002e4e6f2e16e1ca18b5913faa43e2ac5585f86ef489395e68e573a14de4e45a  decimal-1.3.1.tgz"