# Contributor: Andy Postnikov # Maintainer: Andy Postnikov pkgname=php7-pecl-event _pkgname=event pkgver=2.4.2 pkgrel=0 pkgdesc="PHP extension that provides interface to libevent library - PECL" url="https://pecl.php.net/package/event" arch="all" license="PHP-3.01" depends="php7 php7-sockets" makedepends="php7-dev autoconf libevent-dev openssl-dev pkgconf re2c" source="$pkgname-$pkgver.tgz::https://pecl.php.net/get/$_pkgname-$pkgver.tgz" builddir="$srcdir/$_pkgname-$pkgver" provides="php7-event=$pkgver-r$pkgrel" # for backward compatibility replaces="php7-event" # for backward compatibility build() { cd "$builddir" phpize7 ./configure --prefix=/usr --with-php-config=php-config7 make } check() { cd "$builddir" # Tests require sockets extension which is not bundled sed -i 's#PHP_TEST_SHARED_EXTENSIONS = `#PHP_TEST_SHARED_EXTENSIONS = -d extension=/usr/lib/php7/modules/sockets.so `#' Makefile make NO_INTERACTION=1 REPORT_EXIT_STATUS=1 SKIP_ONLINE_TESTS=1 test } package() { cd "$builddir" make INSTALL_ROOT="$pkgdir" install install -d "$pkgdir"/etc/php7/conf.d echo "extension=$_pkgname.so" > "$pkgdir"/etc/php7/conf.d/$_pkgname.ini } sha512sums="4695d461b20ec3789565db5610c5d6e06603e851c708ccc9c86d4e3fb0ef593e53c21d2f7b7bfade2fe81759fde2f5f62e84fca081253f1c20168a493fb6ab1b php7-pecl-event-2.4.2.tgz"