[arch-commits] Commit in php-igbinary/trunk (PKGBUILD)
David Runge
dvzrv at archlinux.org
Sat Jan 9 16:47:14 UTC 2021
Date: Saturday, January 9, 2021 @ 16:47:13
Author: dvzrv
Revision: 816312
upgpkg: php-igbinary 3.2.1-2: Rebuild against php >=8.
Introduce a split-package to also make igbinary available for php7.
Modified:
php-igbinary/trunk/PKGBUILD
----------+
PKGBUILD | 68 +++++++++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 53 insertions(+), 15 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-01-09 16:45:01 UTC (rev 816311)
+++ PKGBUILD 2021-01-09 16:47:13 UTC (rev 816312)
@@ -1,40 +1,66 @@
# Maintainer: David Runge <dvzrv at archlinux.org>
_name=igbinary
-pkgname=php-igbinary
+pkgbase=php-igbinary
+pkgname=('php-igbinary' 'php7-igbinary')
pkgver=3.2.1
-pkgrel=1
+pkgrel=2
pkgdesc="A drop in replacement for the standard php serializer"
arch=('x86_64')
url="https://github.com/igbinary/igbinary"
license=('BSD')
-depends=('glibc' 'php')
-backup=("etc/php/conf.d/${_name}.ini")
+depends=('glibc')
+makedepends=('php7' 'php')
source=("$pkgname-$pkgver.tar.gz::https://github.com/${_name}/${_name}/archive/${pkgver}.tar.gz")
sha512sums=('fdab404eb6ab8e64c0d3b92c1c12e796a182a90084acc78a31a31dece62075d310d298c545d149d10b188f0467108a0429ee750747e073fa7fba752162b64eb4')
b2sums=('4eda60b49a2f1e3e822a0fbff8f23cd546517a51193f0f4f2d4646f99888552aad1877f80a67f0d655e0a51771c539efe5b0d8b5c8ce7d88c8403305dc7570df')
prepare() {
- mv -v "${_name}-${pkgver}" "$pkgname-$pkgver"
- cd "$pkgname-$pkgver"
+ mv -v "${_name}-${pkgver}" "$pkgbase-$pkgver"
# disable the extension by default
- sed 's/extension/;extension/g' -i "${_name}.php.ini"
- phpize
+ sed 's/extension/;extension/g' -i "$pkgbase-$pkgver/${_name}.php.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-igbinary
- make
+ (
+ cd "$pkgbase-$pkgver"
+ ./configure --prefix=/usr \
+ --enable-igbinary
+ make
+ )
+ (
+ cd "${pkgname[1]}-$pkgver"
+ ./configure --prefix=/usr \
+ --enable-igbinary
+ make
+ )
}
check() {
- cd "$pkgname-$pkgver"
- NO_INTERACTION=1 make -k test
+ (
+ cd "$pkgbase-$pkgver"
+ NO_INTERACTION=1 make -k test
+ )
+ (
+ cd "${pkgname[1]}-$pkgver"
+ NO_INTERACTION=1 make -k test
+ )
}
-package() {
+package_php-igbinary() {
+ depends+=('php')
+ backup=("etc/php/conf.d/${_name}.ini")
+
cd "$pkgname-$pkgver"
make INSTALL_ROOT="$pkgdir/" install
install -vDm 644 "${_name}.php.ini" "${pkgdir}/etc/php/conf.d/${_name}.ini"
@@ -42,3 +68,15 @@
install -vDm 644 {CREDITS,NEWS,README.md} \
-t "${pkgdir}/usr/share/doc/${pkgname}"
}
+
+package_php7-igbinary() {
+ depends+=('php7')
+ backup=("etc/php7/conf.d/${_name}.ini")
+
+ cd "$pkgname-$pkgver"
+ make INSTALL_ROOT="$pkgdir/" install
+ install -vDm 644 "${_name}.php.ini" "${pkgdir}/etc/php7/conf.d/${_name}.ini"
+ install -vDm 644 COPYING -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -vDm 644 {CREDITS,NEWS,README.md} \
+ -t "${pkgdir}/usr/share/doc/${pkgname}"
+}
More information about the arch-commits
mailing list