[arch-commits] Commit in php-redis/repos (2 files)

Pierre Schmitz pierre at gemini.archlinux.org
Sat Jan 8 08:22:50 UTC 2022


    Date: Saturday, January 8, 2022 @ 08:22:50
  Author: pierre
Revision: 1096975

archrelease: copy trunk to community-staging-x86_64

Added:
  php-redis/repos/community-staging-x86_64/
  php-redis/repos/community-staging-x86_64/PKGBUILD
    (from rev 1096974, php-redis/trunk/PKGBUILD)

----------+
 PKGBUILD |  102 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 102 insertions(+)

Copied: php-redis/repos/community-staging-x86_64/PKGBUILD (from rev 1096974, php-redis/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2022-01-08 08:22:50 UTC (rev 1096975)
@@ -0,0 +1,102 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+
+_name=redis
+_upstream=phpredis
+pkgbase=php-redis
+pkgname=('php-redis' 'php7-redis')
+pkgver=5.3.5
+pkgrel=2
+pkgdesc="An API for communicating with the Redis key-value store"
+arch=(x86_64)
+url="https://github.com/phpredis/phpredis/"
+license=(PHP)
+depends=(glibc)
+makedepends=(liblzf php-igbinary php7-igbinary)
+checkdepends=(lsof redis)
+optdepends=('redis: use a local redis instance')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/${_upstream}/${_upstream}/archive/${pkgver}.tar.gz")
+sha512sums=('4114d1e8b7c19b4ad04e078a01fc8666c029ada49ad7807f7aebc40ca849ca901ed2b55636d7e7528c0ac1d3d37b73839b60e89661959e46714477857b289b0b')
+b2sums=('6624b049ef3381904fbdb77e478bd6a743129d0ecdbbb3ad508c63a8fb1db070576dca6ffa6bd4e63f05a5081d338b28515311879c73972afd4445fd8a7a3c43')
+
+prepare() {
+  mv -v "${_upstream}-${pkgver}" "$pkgbase-$pkgver"
+  # tempfile is non-standard, Debian only
+  sed -e 's/tempfile/mktemp/g' -i  "$pkgname-$pkgver/tests/mkring.sh"
+  # the kill after shutdown of redis makes it exit with status code 1
+  sed -e '/kill -9/d' -i "$pkgname-$pkgver/tests/mkring.sh"
+  # disable the extension by default
+  echo -e "; this extension requires igbinary to be activated as well\n;extension=${_name}" > "$pkgname-$pkgver/${_name}.ini"
+
+  cp -av "$pkgbase-$pkgver" "${pkgname[1]}-$pkgver"
+
+  (
+    cd "$pkgbase-$pkgver"
+    phpize
+  )
+  (
+    cd "${pkgname[1]}-$pkgver"
+    phpize7
+  )
+}
+
+build() {
+  (
+    cd "$pkgname-$pkgver"
+    ./configure --prefix=/usr \
+                --enable-redis-igbinary \
+                --enable-redis-lzf \
+                --with-liblzf=/usr/lib/
+    make
+  )
+  (
+    cd "${pkgname[1]}-$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/php
+    export TEST_PHP_ARGS="-d extension=igbinary -d extension=${srcdir}/${pkgbase}-${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
+  )
+  (
+    export TEST_PHP_EXECUTABLE=/usr/bin/php7
+    export TEST_PHP_ARGS="-d extension=igbinary -d extension=${srcdir}/${pkgname[1]}-${pkgver}/modules/redis.so"
+    cd "${pkgname[1]}-$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_php-redis() {
+  depends+=(liblzf.so php-igbinary)
+  backup=("etc/php/conf.d/${_name}.ini")
+
+  cd "$pkgname-$pkgver"
+  make INSTALL_ROOT="$pkgdir/" install
+  install -vDm 644 "${_name}.ini" -t "${pkgdir}/etc/php/conf.d/"
+  install -vDm 644 {{README,arrays,cluster}.markdown,CREDITS} -t "${pkgdir}/usr/share/doc/${pkgname}/"
+}
+
+package_php7-redis() {
+  depends+=(liblzf.so php7-igbinary)
+  backup=("etc/php7/conf.d/${_name}.ini")
+
+  cd "$pkgname-$pkgver"
+  make INSTALL_ROOT="$pkgdir/" install
+  install -vDm 644 "${_name}.ini" -t "${pkgdir}/etc/php7/conf.d/"
+  install -vDm 644 {{README,arrays,cluster}.markdown,CREDITS} -t "${pkgdir}/usr/share/doc/${pkgname}/"
+}



More information about the arch-commits mailing list