aboutsummaryrefslogtreecommitdiffstats
path: root/community/php7-pecl-amqp/APKBUILD
blob: 9ff1ea9eb4eaeef7853fc102964985232dd73960 (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
41
# Contributor: Fabio Ribeiro <fabiorphp@gmail.com>
# Maintainer: Fabio Ribeiro <fabiorphp@gmail.com>
pkgname=php7-pecl-amqp
_pkgreal=amqp
pkgver=1.9.4
pkgrel=1
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"
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() {
	cd "$builddir"

	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() {
	local confdir="$pkgdir/etc/php7/conf.d"
	cd "$builddir"

	make INSTALL_ROOT="$pkgdir" install

	mkdir -p "$confdir"
	echo "extension=$_pkgreal.so" > "$confdir"/40_$_pkgreal.ini
}

sha512sums="53f8893c2fdb6f41467c9af4a5e48810d39201150a94dd9d32f542d53387ef5e6d8c614ebe2d82b3ab9febd39aa8759a86975d0dc45092a2772f08cd86d7f739  php7-pecl-amqp-1.9.4.tgz"