diff options
author | Matt Harrison | 2020-01-03 09:52:46 -0500 |
---|---|---|
committer | Matt Harrison | 2020-01-03 09:52:46 -0500 |
commit | 602791d77ff78d0a9a80e5a01c41f9c14c5b1d91 (patch) | |
tree | cd68bcf98bcf32425a64f18f44025e68a3780c5e | |
download | aur-602791d77ff78d0a9a80e5a01c41f9c14c5b1d91.tar.gz |
Initial upload: php73-redis 5.1.1-1
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | PKGBUILD | 59 |
2 files changed, 78 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2d103f8895a5 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = php73-redis + pkgdesc = An API for communicating with the Redis key-value store + pkgver = 5.1.1 + pkgrel = 1 + url = https://github.com/phpredis/phpredis/ + arch = x86_64 + license = PHP + checkdepends = lsof + checkdepends = redis + depends = glibc + depends = liblzf + depends = php73-igbinary + optdepends = redis: use a local redis instance + backup = etc/php73/conf.d/redis.ini + source = php73-redis-5.1.1.tar.gz::https://github.com/phpredis/phpredis/archive/5.1.1.tar.gz + sha512sums = d15bfb675491aaafeb09a398fb540d9ba6d64803d7ad0fd8765bc1a3f50f58ef066384e678f20259742b67135e814f0b379861a46eab3afa0ac9f95ae375e726 + +pkgname = php73-redis + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..e5df455a8521 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,59 @@ +# Maintainer: Matt Harrison <matt@harrison.us.com> +# Contributor: David Runge <dvzrv@archlinux.org> + +pkgname=php73-redis +_name=redis +_upstream=phpredis +pkgver=5.1.1 +pkgrel=1 +pkgdesc="An API for communicating with the Redis key-value store" +arch=('x86_64') +url="https://github.com/phpredis/phpredis/" +license=('PHP') +depends=('glibc' 'liblzf' 'php73-igbinary') +checkdepends=('lsof' 'redis') +optdepends=('redis: use a local redis instance') +backup=("etc/php73/conf.d/${_name}.ini") +source=("$pkgname-$pkgver.tar.gz::https://github.com/${_upstream}/${_upstream}/archive/${pkgver}.tar.gz") +sha512sums=('d15bfb675491aaafeb09a398fb540d9ba6d64803d7ad0fd8765bc1a3f50f58ef066384e678f20259742b67135e814f0b379861a46eab3afa0ac9f95ae375e726') + +prepare() { + mv -v "${_upstream}-${pkgver}" "$pkgname-$pkgver" + cd "$pkgname-$pkgver" + # tempfile is non-standard, Debian only + sed -e 's/tempfile/mktemp/g' -i tests/mkring.sh + # the kill after shutdown of redis makes it exit with status code 1 + sed -e '/kill -9/d' -i tests/mkring.sh + # disable the extension by default + echo -e "; this extension requires igbinary to be activated as well\n;extension=${_name}" > "${_name}.ini" + phpize73 +} + +build() { + cd "$pkgname-$pkgver" + ./configure --prefix=/usr \ + --enable-redis-igbinary \ + --enable-redis-lzf \ + --with-liblzf=/usr/lib/ + make +} + +check() { + # tests are partly broken: + # https://github.com/phpredis/phpredis/issues/1593 + export TEST_PHP_EXECUTABLE=/usr/bin/php73 + export TEST_PHP_ARGS="-d extension=igbinary -d extension=${srcdir}/${pkgname}-${pkgver}/modules/redis.so" + cd "$pkgname-$pkgver" + tests/mkring.sh start + $TEST_PHP_EXECUTABLE $TEST_PHP_ARGS tests/TestRedis.php --class Redis + $TEST_PHP_EXECUTABLE $TEST_PHP_ARGS tests/TestRedis.php --class RedisArray + tests/mkring.sh stop +} + +package() { + cd "$pkgname-$pkgver" + make INSTALL_ROOT="$pkgdir/" install + install -vDm 644 "${_name}.ini" -t "${pkgdir}/etc/php73/conf.d/" + install -vDm 644 {{README,arrays,cluster}.markdown,CREDITS} \ + -t "${pkgdir}/usr/share/doc/${pkgname}/" +} |