aboutsummaryrefslogtreecommitdiffstats
path: root/community/php7-pecl-yaml/APKBUILD
blob: bd45878ee4990b4a2a13c661b79a220061f13e7e (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
37
38
39
40
# Maintainer: Renoir Boulanger <hello@renoirboulanger.com>
pkgname=php7-pecl-yaml
_pkgreal=yaml
pkgver=2.0.3
pkgrel=0
pkgdesc="YAML syntax bindings for PHP"
url="https://pecl.php.net/package/yaml"
arch="all"
license="MIT"
makedepends="php7-dev autoconf yaml-dev"
depends="php7-common"
# Set source file explicitly, otherwise extracted archive directory breaks the build.
source="$pkgname-$pkgver.tgz::https://pecl.php.net/get/$_pkgreal-$pkgver.tgz"
builddir="$srcdir/$_pkgreal-$pkgver"
provides="php7-yaml=$pkgver-r$pkgrel" # for backward compatibility
replaces="php7-yaml" # for backward compatibility

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

# Thanks to @TBK for https://github.com/php/pecl-file_formats-yaml/pull/29
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=$_pkgreal.so" > $pkgdir/etc/php7/conf.d/70_$_pkgreal.ini
}

sha512sums="8ed5302b18098afe6a789c2b56d2356ae5b7dd58b9ffe8b2cc574868bc99642ac650e21041d68e6c5a43981df1ab2939f64bf28e9c8482e08e145437cc874316  php7-pecl-yaml-2.0.3.tgz"