diff options
author | Menno Duursma <druiloor@zonnet.nl> | 2010-09-17 04:47:13 -0400 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-09-21 22:09:37 -0500 |
commit | 3dae1846b0ad71c7528dd955362f6064f837f22a (patch) | |
tree | a30a34ebc2dad614742b42586ca693074049848c /libraries/php-ssh2 | |
parent | 38fb9864c6c14e48193e0a353cbcc848e72ca36b (diff) | |
download | slackbuilds-3dae1846b0ad71c7528dd955362f6064f837f22a.tar.gz |
libraries/php-ssh2: Added (SECSH network protocol PHP extention)
Signed-off-by: dsomero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'libraries/php-ssh2')
-rw-r--r-- | libraries/php-ssh2/README | 4 | ||||
-rw-r--r-- | libraries/php-ssh2/doinst.sh | 15 | ||||
-rw-r--r-- | libraries/php-ssh2/php-ssh2.SlackBuild | 88 | ||||
-rw-r--r-- | libraries/php-ssh2/php-ssh2.info | 10 | ||||
-rw-r--r-- | libraries/php-ssh2/slack-desc | 19 |
5 files changed, 136 insertions, 0 deletions
diff --git a/libraries/php-ssh2/README b/libraries/php-ssh2/README new file mode 100644 index 0000000000..612aa4ddb5 --- /dev/null +++ b/libraries/php-ssh2/README @@ -0,0 +1,4 @@ +PHP bindings for the libssh2 library + +This provides bindings to the functions of libssh2 which implements +the SSH2 protocol. Requires: libssh2 (available via SBo also). diff --git a/libraries/php-ssh2/doinst.sh b/libraries/php-ssh2/doinst.sh new file mode 100644 index 0000000000..b8417cfb61 --- /dev/null +++ b/libraries/php-ssh2/doinst.sh @@ -0,0 +1,15 @@ +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/ssh2.ini.new + diff --git a/libraries/php-ssh2/php-ssh2.SlackBuild b/libraries/php-ssh2/php-ssh2.SlackBuild new file mode 100644 index 0000000000..c31e8e2be8 --- /dev/null +++ b/libraries/php-ssh2/php-ssh2.SlackBuild @@ -0,0 +1,88 @@ +#!/bin/sh + +# Slackware build script for the secsh (SSH2) extention to PHP + +# Written by Menno Duursma <druiloor@zonnet.nl> + +# This program is free software. It comes without any warranty. +# Granted WTFPL, Version 2, as published by Sam Hocevar. See +# http://sam.zoy.org/wtfpl/COPYING for more details. + +SRCNAM=ssh2 +PRGNAM=php-$SRCNAM +VERSION=${VERSION:-0.11.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e # Exit on most errors + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tgz +cd $SRCNAM-$VERSION +chown -R root:root . +find . -type d | xargs chmod 0755 +find . -type f | xargs chmod a-s,go-w + +# With PHP extentions apparently this is needed +phpize + +CFLAGS="$SLKCFLAGS" \ +CXXFLAGS="$SLKCFLAGS" \ +EXTENSION_DIR="$PKG/usr/lib$LIBDIRSUFFIX/php/extensions" \ +./configure \ + --prefix=/usr \ + --libdir=/usr/lib$LIBDIRSUFFIX \ + --sysconfdir=/etc \ + --localstatedir=/var + +make + +install -D -m755 modules/$SRCNAM.so $PKG/usr/lib$LIBDIRSUFFIX/php/extensions/$SRCNAM.so + +# Add to the PHP config +mkdir -p $PKG/etc/php +echo "extension=$SRCNAM.so" > $PKG/etc/php/$SRCNAM.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 + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cat ../package.xml > $PKG/usr/doc/$PRGNAM-$VERSION/package.xml +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 + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/libraries/php-ssh2/php-ssh2.info b/libraries/php-ssh2/php-ssh2.info new file mode 100644 index 0000000000..0986588507 --- /dev/null +++ b/libraries/php-ssh2/php-ssh2.info @@ -0,0 +1,10 @@ +PRGNAM="php-ssh2" +VERSION="0.11.0" +HOMEPAGE="http://pecl.php.net/package/ssh2" +DOWNLOAD="http://pecl.php.net/get/ssh2-0.11.0.tgz" +MD5SUM="9f5dcd5b92299458389038f7318cbc46" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +MAINTAINER="Menno Duursma" +EMAIL="druiloor@zonnet.nl" +APPROVED="dsomero" diff --git a/libraries/php-ssh2/slack-desc b/libraries/php-ssh2/slack-desc new file mode 100644 index 0000000000..37385fddf6 --- /dev/null +++ b/libraries/php-ssh2/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler-----------------------------------------------------| +php-ssh2: SSH2 (SECSH network protocol PHP extention) +php-ssh2: +php-ssh2: php-ssh2 is a library implementing the SSH2 protocol. +php-ssh2: +php-ssh2: php-ssh2 is maintained by Sara Golemon and Mike Sullivan +php-ssh2: +php-ssh2: +php-ssh2: +php-ssh2: +php-ssh2: +php-ssh2: |