aboutsummaryrefslogtreecommitdiffstats
path: root/community/php7-pecl-amqp/APKBUILD
blob: 3d1a3b1155ecda9ca48d58131a8f306b4e22a28c (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
# Contributor: Fabio Ribeiro <fabiorphp@gmail.com>
# Maintainer: Fabio Ribeiro <fabiorphp@gmail.com>
pkgname=php7-pecl-amqp
_pkgreal=amqp
pkgver=1.10.2
pkgrel=0
pkgdesc="PHP extension to communicate with any AMQP spec 0-9-1 compatible server - PECL"
url="https://pecl.php.net/package/amqp"
arch="all"
license="PHP-3.01"
depends="php7-common"
makedepends="php7-dev autoconf rabbitmq-c-dev re2c"
source="$pkgname-$pkgver.tgz::https://pecl.php.net/get/$_pkgreal-$pkgver.tgz"
builddir="$srcdir/$_pkgreal-$pkgver"
provides="php7-amqp=$pkgver-r$pkgrel" # for backward compatibility
replaces="php7-amqp" # for backward compatibility

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

check() {
	# Tests require running AMQP server, so basic check
	php7 -d extension="$builddir"/modules/$_pkgreal.so --ri $_pkgreal
}

package() {
	make INSTALL_ROOT="$pkgdir" install
	local confdir="$pkgdir/etc/php7/conf.d"
	mkdir -p "$confdir"
	echo "extension=$_pkgreal.so" > "$confdir"/40_$_pkgreal.ini
}

sha512sums="a17176bcc02d35a9686d3ca120cca98d808b2a896733f41a28b5d29d43127a0a45b012bc6566de3604f41b8bcc453408a37a8254bcf47e940ebe12bb6f4d4265  php7-pecl-amqp-1.10.2.tgz"