aboutsummaryrefslogtreecommitdiffstats
path: root/community/php7-pecl-ast/APKBUILD
blob: 3fd6701794dfcbad2c238dcc87244d9c3b40330e (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
# Contributor: Andy Blyler <andy@blyler.cc>
# Maintainer: Fabio Ribeiro <fabiorphp@gmail.com>
pkgname=php7-pecl-ast
_pkgext=ast
_pkgreal=php-ast
pkgver=1.0.3
pkgrel=0
pkgdesc="PHP extension exposing PHP 7 abstract syntax tree - PECL"
url="https://pecl.php.net/package/ast"
arch="all"
license="BSD-3-Clause"
depends="php7-common"
makedepends="php7-dev autoconf re2c"
source="$pkgname-$pkgver.tar.gz::https://pecl.php.net/get/$_pkgext-$pkgver.tgz"
builddir="$srcdir"/$_pkgext-$pkgver
provides="php7-ast=$pkgver-r$pkgrel" # for backward compatibility
replaces="php7-ast" # for backward compatibility

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

check() {
	cd "$builddir"
	make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 test
}

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

sha512sums="1901e4169ba7eb5ff9836a8773ac144c5daa6474c4d7bc545258f8faceb92d4b4d94f8e1685f9b9bc2980270205d75b89437b1cf01b74683db5986fb09229aee  php7-pecl-ast-1.0.3.tar.gz"