From 47a5b49203d5df374f5e8dbe6a22ae0fa8cdd7b2 Mon Sep 17 00:00:00 2001 From: Heinz Wiesinger Date: Sat, 6 Feb 2016 22:36:50 +0100 Subject: development/php-apcu: Fix php ini file location. Also added missing pecl registration. Signed-off-by: Heinz Wiesinger --- development/php-apcu/apc.ini | 5 ----- development/php-apcu/apcu.ini | 5 +++++ development/php-apcu/doinst.sh | 18 ++++++++++++++++++ development/php-apcu/php-apcu.SlackBuild | 10 +++++++--- 4 files changed, 30 insertions(+), 8 deletions(-) delete mode 100644 development/php-apcu/apc.ini create mode 100644 development/php-apcu/apcu.ini create mode 100644 development/php-apcu/doinst.sh (limited to 'development/php-apcu') diff --git a/development/php-apcu/apc.ini b/development/php-apcu/apc.ini deleted file mode 100644 index b76e42ac6f..0000000000 --- a/development/php-apcu/apc.ini +++ /dev/null @@ -1,5 +0,0 @@ -extension=apcu.so -apc.enabled=1 -apc.shm_size=32M -apc.ttl=7200 -apc.enable_cli=1 diff --git a/development/php-apcu/apcu.ini b/development/php-apcu/apcu.ini new file mode 100644 index 0000000000..b76e42ac6f --- /dev/null +++ b/development/php-apcu/apcu.ini @@ -0,0 +1,5 @@ +extension=apcu.so +apc.enabled=1 +apc.shm_size=32M +apc.ttl=7200 +apc.enable_cli=1 diff --git a/development/php-apcu/doinst.sh b/development/php-apcu/doinst.sh new file mode 100644 index 0000000000..9a45670d55 --- /dev/null +++ b/development/php-apcu/doinst.sh @@ -0,0 +1,18 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD|md5sum)" = "$(cat $NEW|md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/php.d/apcu.ini.new + +/usr/bin/pecl install --nodeps --soft --force --register-only --nobuild \ + usr/libLIBDIRSUFFIX/php/.pkgxml/apcu.xml > /dev/null + diff --git a/development/php-apcu/php-apcu.SlackBuild b/development/php-apcu/php-apcu.SlackBuild index 918cfe3780..d0bb3b8bc6 100644 --- a/development/php-apcu/php-apcu.SlackBuild +++ b/development/php-apcu/php-apcu.SlackBuild @@ -27,7 +27,7 @@ PRGNAM=php-apcu SRCNAM=apcu VERSION=${VERSION:-4.0.7} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -88,12 +88,15 @@ CXXFLAGS="$SLKCFLAGS" \ make make INSTALL_ROOT=$PKG install +mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/php/.pkgxml +install -m 644 $TMP/package.xml $PKG/usr/lib$LIBDIRSUFFIX/php/.pkgxml/apcu.xml + find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true # Copy default php configuration -mkdir -p $PKG/etc/php -cp -a $CWD/apc.ini $PKG/etc/php +mkdir -p $PKG/etc/php.d +cp -a $CWD/apcu.ini $PKG/etc/php.d/apcu.ini.new mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a LICENSE README.md NOTICE TECHNOTES.txt TODO $PKG/usr/doc/$PRGNAM-$VERSION @@ -101,6 +104,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc +sed "s|LIBDIRSUFFIX|$LIBDIRSUFFIX|" $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} -- cgit v1.2.3