aboutsummaryrefslogtreecommitdiffstats
path: root/community/php7-pecl-yaml/APKBUILD
blob: 744e5481a131f23d44385d69a99bdf5833550a03 (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
40
# Maintainer: Renoir Boulanger <hello@renoirboulanger.com>
pkgname=php7-pecl-yaml
_pkgreal=yaml
pkgver=2.0.4
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="138e5b4566800fc7d624baf71bc585d6d432755046e598ae9f4099fa565727e04d79bb171289a53eb9e5daa416ffee1b0fb4967c84976ac6cd6fc01b0a05fbae  php7-pecl-yaml-2.0.4.tgz"