aboutsummaryrefslogtreecommitdiff
path: root/development/php-apcu
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@slackbuilds.org>2016-02-06 22:36:50 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-02-07 15:06:56 +0700
commit47a5b49203d5df374f5e8dbe6a22ae0fa8cdd7b2 (patch)
treed1f054055873cec9e6837e34ab5a4c5c5c277c6e /development/php-apcu
parente4d8630f015b066bec294f5f3ac8ec59f530e021 (diff)
development/php-apcu: Fix php ini file location.
Also added missing pecl registration. Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
Diffstat (limited to 'development/php-apcu')
-rw-r--r--development/php-apcu/apcu.ini (renamed from development/php-apcu/apc.ini)0
-rw-r--r--development/php-apcu/doinst.sh18
-rw-r--r--development/php-apcu/php-apcu.SlackBuild10
3 files changed, 25 insertions, 3 deletions
diff --git a/development/php-apcu/apc.ini b/development/php-apcu/apcu.ini
index b76e42ac6f975..b76e42ac6f975 100644
--- a/development/php-apcu/apc.ini
+++ b/development/php-apcu/apcu.ini
diff --git a/development/php-apcu/doinst.sh b/development/php-apcu/doinst.sh
new file mode 100644
index 0000000000000..9a45670d55184
--- /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 918cfe3780f1a..d0bb3b8bc694b 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}