diff options
author | Tomasz Gruszka | 2021-02-21 15:11:45 +0100 |
---|---|---|
committer | Tomasz Gruszka | 2021-02-21 15:11:45 +0100 |
commit | 87757be817a2790dfbe402a2f73beb96fbcd163f (patch) | |
tree | 2f95406587e3cfbc166a8d034a11bbe98194c907 | |
download | aur-87757be817a2790dfbe402a2f73beb96fbcd163f.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | .gitignore | 19 | ||||
-rw-r--r-- | PKGBUILD | 61 |
3 files changed, 102 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ac3bfd25a3cd --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = php74-redis + pkgdesc = An API for communicating with the Redis key-value store + pkgver = 5.3.3 + pkgrel = 1 + url = https://pecl.php.net/package/redis + arch = x86_64 + license = PHP + checkdepends = lsof + checkdepends = redis + makedepends = liblzf + depends = glibc + depends = php74-igbinary + optdepends = redis: use a local redis instance + backup = etc/php74/conf.d/redis.ini + source = https://pecl.php.net/get/redis-5.3.3.tgz + sha512sums = a04a7d0aa3881b861a00c3f0a889b2f3fd135009293629ac55a74890196c0686e9766438f5255561105e30293f1a6a91ca987fd68e43f3ca436f6cc884e6a5df + +pkgname = php74-redis + depends = glibc + depends = php74-igbinary + depends = liblzf.so + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..553161727b30 --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +*.zip +*.jar +*.tar +*.tgz +*.tbz2 +*.gz +*.bz2 +*.xz +*.gem +*.run +*.deb +*.rpm +*.sig +*.log +*.asc +*.zst +/src +/pkg +*.kate-swp diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..72d40373e114 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,61 @@ +# Maintainer: Tomasz Gruszka <tompear79@gmail.com> +# Contributor: Matt Harrison <matt@harrison.us.com> +# Contributor: David Runge <dvzrv@archlinux.org> + +pkgname=php74-redis +_name=redis +_upstream=phpredis +pkgver=5.3.3 +pkgrel=1 +pkgdesc="An API for communicating with the Redis key-value store" +arch=('x86_64') +url="https://pecl.php.net/package/redis" +license=('PHP') +depends=('glibc' 'php74-igbinary') +makedepends=('liblzf') +checkdepends=('lsof' 'redis') +optdepends=('redis: use a local redis instance') +backup=("etc/php74/conf.d/${_name}.ini") +source=("https://pecl.php.net/get/${_name}-${pkgver}.tgz") +sha512sums=('a04a7d0aa3881b861a00c3f0a889b2f3fd135009293629ac55a74890196c0686e9766438f5255561105e30293f1a6a91ca987fd68e43f3ca436f6cc884e6a5df') + +prepare() { + mv -v "${_name}-${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" + phpize74 +} + +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/php74 + export TEST_PHP_ARGS="--no-php-ini -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() { + depends+=('liblzf.so') + cd "$pkgname-$pkgver" + make INSTALL_ROOT="$pkgdir/" install + install -vDm 644 "${_name}.ini" -t "${pkgdir}/etc/php74/conf.d/" + install -vDm 644 {{README,arrays,cluster}.markdown,CREDITS} -t "${pkgdir}/usr/share/doc/${pkgname}/" +} |