[arch-commits] Commit in php-memcached/trunk (PKGBUILD)

Evangelos Foutras foutrelis at archlinux.org
Fri Jan 8 22:53:29 UTC 2021


    Date: Friday, January 8, 2021 @ 22:53:29
  Author: foutrelis
Revision: 814198

upgpkg: php-memcached 3.1.5.r16.gbfb0a66-1: bump for PHP 8; add split pkg for PHP 7

Modified:
  php-memcached/trunk/PKGBUILD

----------+
 PKGBUILD |   49 ++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 38 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2021-01-08 22:40:41 UTC (rev 814197)
+++ PKGBUILD	2021-01-08 22:53:29 UTC (rev 814198)
@@ -1,33 +1,60 @@
 # Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
 
-pkgname=php-memcached
-pkgver=3.1.5
+pkgname=('php-memcached' 'php7-memcached')
+pkgver=3.1.5.r16.gbfb0a66
+_commit=bfb0a66809d43080219ab5381235f848c91eff7e
 pkgrel=1
 pkgdesc="PHP extension for interfacing with memcached via libmemcached library"
 arch=('x86_64')
 url="https://github.com/php-memcached-dev/php-memcached"
 license=('PHP')
-depends=('php' 'libmemcached')
-makedepends=('git')
-backup=('etc/php/conf.d/memcached.ini')
-source=("git+https://github.com/php-memcached-dev/php-memcached.git#tag=v$pkgver")
+depends=('libmemcached')
+makedepends=('php' 'php7' 'git')
+source=("git+https://github.com/php-memcached-dev/php-memcached.git#commit=$_commit")
 sha256sums=('SKIP')
 
+pkgver() {
+  cd $pkgbase
+  git describe --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
+}
+
+prepare() {
+  cp -a $pkgbase{,-php7}
+}
+
 build() {
-  cd "$srcdir/$pkgname"
-
+  cd $pkgbase
   phpize
   ./configure --prefix=/usr
   make
+
+  cd ../$pkgbase-php7
+  phpize7
+  ./configure --prefix=/usr
+  make
 }
 
-package() {
-  cd "$srcdir/$pkgname"
+package_php-memcached() {
+  depends+=('php')
+  backup=('etc/php/conf.d/memcached.ini')
 
+  cd $pkgbase
+
   make INSTALL_ROOT="$pkgdir" install
-
   install -d "$pkgdir/etc/php/conf.d"
   echo ';extension=memcached.so' >"$pkgdir/etc/php/conf.d/memcached.ini"
 }
 
+package_php7-memcached() {
+  pkgdesc=${pkgdesc/PHP/PHP 7}
+  depends+=('php7')
+  backup=('etc/php7/conf.d/memcached.ini')
+
+  cd $pkgbase-php7
+
+  make INSTALL_ROOT="$pkgdir" install
+  install -d "$pkgdir/etc/php7/conf.d"
+  echo ';extension=memcached.so' >"$pkgdir/etc/php7/conf.d/memcached.ini"
+}
+
 # vim:set ts=2 sw=2 et:



More information about the arch-commits mailing list