summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinz Wiesinger <pprkut@slackbuilds.org>2016-02-06 23:33:49 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-02-07 15:06:56 +0700
commitee09f3f1aab10133586ac9526c1a2f7097e2ab5f (patch)
tree1af96f803e5532237ce6ce1275a9407c21615e7f
parent4bbd289c7c30a1df0d640f16658dca7c0cc69f59 (diff)
downloadslackbuilds-ee09f3f1aab10133586ac9526c1a2f7097e2ab5f.tar.gz
libraries/php-ssh2: Fix php ini file location.
Also added missing pecl registration. Signed-off-by: Heinz Wiesinger <pprkut@slackbuilds.org>
-rw-r--r--libraries/php-ssh2/README2
-rw-r--r--libraries/php-ssh2/doinst.sh5
-rw-r--r--libraries/php-ssh2/php-ssh2.SlackBuild11
3 files changed, 12 insertions, 6 deletions
diff --git a/libraries/php-ssh2/README b/libraries/php-ssh2/README
index cc353431e0..ed24317286 100644
--- a/libraries/php-ssh2/README
+++ b/libraries/php-ssh2/README
@@ -1,5 +1,5 @@
This extension enables PHP to connect to and use SSH2 servers.
-To enable the pgsql extension for php, go to /etc/php/ssh2.ini
+To enable the pgsql extension for php, go to /etc/php.d/ssh2.ini
and uncomment the line:
; extension=ssh2.so
diff --git a/libraries/php-ssh2/doinst.sh b/libraries/php-ssh2/doinst.sh
index e5760e7218..34e7d19b76 100644
--- a/libraries/php-ssh2/doinst.sh
+++ b/libraries/php-ssh2/doinst.sh
@@ -11,5 +11,8 @@ config() {
# Otherwise, we leave the .new copy for the admin to consider...
}
-config etc/php/ssh2.ini.new
+config etc/php.d/ssh2.ini.new
+
+/usr/bin/pecl install --nodeps --soft --force --register-only --nobuild \
+ usr/libLIBDIRSUFFIX/php/.pkgxml/ssh2.xml > /dev/null
diff --git a/libraries/php-ssh2/php-ssh2.SlackBuild b/libraries/php-ssh2/php-ssh2.SlackBuild
index 9d7396544b..238f232ad1 100644
--- a/libraries/php-ssh2/php-ssh2.SlackBuild
+++ b/libraries/php-ssh2/php-ssh2.SlackBuild
@@ -25,7 +25,7 @@
SRCNAM=ssh2
PRGNAM=php-ssh2
VERSION=${VERSION:-0.12}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@@ -89,11 +89,14 @@ CXXFLAGS="$SLKCFLAGS" \
make
EXTENSION_DIR="$PKG/$($PHP_CONFIG --extension-dir)"
-mkdir -p $EXTENSION_DIR $PKG/etc/php
+mkdir -p $EXTENSION_DIR $PKG/etc/php.d
make install DESTDIR=$PKG EXTENSION_DIR=$EXTENSION_DIR
-install -m 644 $CWD/ssh2.ini $PKG/etc/php/ssh2.ini.new
+mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/php/.pkgxml
+install -m 644 $TMP/package.xml $PKG/usr/lib$LIBDIRSUFFIX/php/.pkgxml/ssh2.xml
+
+install -m 644 $CWD/ssh2.ini $PKG/etc/php.d/ssh2.ini.new
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
@@ -104,7 +107,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
-cat $CWD/doinst.sh > $PKG/install/doinst.sh
+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}