aboutsummaryrefslogtreecommitdiffstats
path: root/community/php7-pecl-protobuf/APKBUILD
blob: 860de4a573679845c150724cfe92f9cce224f555 (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
# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=php7-pecl-protobuf
_pkgreal=protobuf
pkgver=3.12.2
pkgrel=0
pkgdesc="PHP7 extension: Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data."
url="https://pecl.php.net/package/protobuf"
arch="all"
license="BSD-3-Clause"
depends="php7-common"
makedepends="php7-dev autoconf libtool"
source="https://pecl.php.net/get/$_pkgreal-$pkgver.tgz"
builddir="$srcdir/$_pkgreal-$pkgver"
provides="php7-protobuf=$pkgver-r$pkgrel" # for backward compatibility
replaces="php7-protobuf" # for backward compatibility

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

check() {
	# Test suite is not a part of pecl release.
	php7 -d extension="$builddir"/modules/$_pkgreal.so --ri $_pkgreal
}

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="66a6cf897ea68aa0ca6d10909cb0783238e800c8b21b41949322a0a959d7f1e00a8fd05756c1ebf28f75efcf5374cda2f2bcd8b8923e41e65d054d37a898f489  protobuf-3.12.2.tgz"