summaryrefslogtreecommitdiff
path: root/libraries/php-oci8
diff options
context:
space:
mode:
authorDhabyX <slack.dhabyx@gmail.com>2016-08-02 07:41:03 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-08-03 07:29:33 +0700
commit3f511ddfb9564f9b6d54f46c6c633615ef6f8208 (patch)
treea62f171aa2b2fb9204431e14f200a4c114eeca4d /libraries/php-oci8
parentcbfb19fb2c2bf58055c5ff0245f40d3bf1f721d9 (diff)
downloadslackbuilds-3f511ddfb9564f9b6d54f46c6c633615ef6f8208.tar.gz
libraries/php-oci8: Added (PHP extension to access Oracle Database).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/php-oci8')
-rw-r--r--libraries/php-oci8/README9
-rw-r--r--libraries/php-oci8/README.Slackware13
-rw-r--r--libraries/php-oci8/php-oci8.SlackBuild120
-rw-r--r--libraries/php-oci8/php-oci8.info10
-rw-r--r--libraries/php-oci8/slack-desc19
5 files changed, 171 insertions, 0 deletions
diff --git a/libraries/php-oci8/README b/libraries/php-oci8/README
new file mode 100644
index 0000000000..ab3e1267d6
--- /dev/null
+++ b/libraries/php-oci8/README
@@ -0,0 +1,9 @@
+PHP-OCI8 in an extension to access Oracle Database.
+
+The extension can be linked with Oracle client libraries
+from Oracle Database 10.2, 11, or 12.1.
+
+Its important to have the ORACLE_CLIENT_HOME variable
+properly loaded, this is part of oracle-instantclient-basic
+package. See README.Slackware for proper use of Slackbuild and
+configurations hits.
diff --git a/libraries/php-oci8/README.Slackware b/libraries/php-oci8/README.Slackware
new file mode 100644
index 0000000000..a7b47a561e
--- /dev/null
+++ b/libraries/php-oci8/README.Slackware
@@ -0,0 +1,13 @@
+Before install, you need that the ORACLE_CLIENT_HOME
+environment variable has been loaded correctly, that
+variable is set in profile.d file, from
+oracle-instantclient-basic package, that is a requirement
+of oracle-instantclient-devel package.
+
+You can logout and login again or simply run:
+
+# source /etc/profile.d/oracle-instantclient-basic.sh
+
+To enable the oci8 extension for php, go to
+/etc/php/oci8.ini and uncomment the line:
+ ; extension=oci8.so
diff --git a/libraries/php-oci8/php-oci8.SlackBuild b/libraries/php-oci8/php-oci8.SlackBuild
new file mode 100644
index 0000000000..de6782eb37
--- /dev/null
+++ b/libraries/php-oci8/php-oci8.SlackBuild
@@ -0,0 +1,120 @@
+#!/bin/sh
+
+# Slackware build script for php-oci8
+
+# Copyright 2015 Dhaby Xiloj <slack.dhabyx@gmail.com> Guatemala
+# All rights reserved.
+#
+# Redistribution and use of this script, with or without modification, is
+# permitted provided that the following conditions are met:
+#
+# 1. Redistributions of this script must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+PKGNAM=oci8
+PRGNAM=php-$PKGNAM
+VERSION=${VERSION:-2.0.8}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -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
+
+# TODO: test oracle-instantclient or exit
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PKGNAM-$VERSION package.xml
+tar xvf $CWD/$PKGNAM-$VERSION.tgz
+cd $PKGNAM-$VERSION
+chown -R root:root .
+find -L . \
+ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
+ -o -perm 511 \) -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+
+PHP_CONFIG=php-config
+
+phpize
+
+if [ ! -z "${LIBDIRSUFFIX}" ]; then
+ sed -i "s#/usr/lib/oracle#/usr/lib${LIBDIRSUFFIX}/oracle#g" configure
+fi
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --with-oci8=instantclient,${ORACLE_CLIENT_HOME}/lib \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+
+EXTENSION_DIR="$PKG/$($PHP_CONFIG --extension-dir)"
+mkdir -p $EXTENSION_DIR
+
+make install DESTDIR=$PKG EXTENSION_DIR=$EXTENSION_DIR
+
+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
+
+# slackware 14.1 current use /etc/php.d
+mkdir -p $PKG/etc/php.d
+cat << EOF > $PKG/etc/php.d/${PKGNAM}.ini
+; Enable oci8 extension module
+; extension=oci8.so
+EOF
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CREDITS LICENSE README $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/libraries/php-oci8/php-oci8.info b/libraries/php-oci8/php-oci8.info
new file mode 100644
index 0000000000..70cea4de14
--- /dev/null
+++ b/libraries/php-oci8/php-oci8.info
@@ -0,0 +1,10 @@
+PRGNAM="php-oci8"
+VERSION="2.0.8"
+HOMEPAGE="https://pecl.php.net/package/oci8"
+DOWNLOAD="https://pecl.php.net/get/oci8-2.0.8.tgz"
+MD5SUM="9de75c4649bb047c6192f13092f9751d"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+REQUIRES="oracle-instantclient-devel"
+MAINTAINER="DhabyX"
+EMAIL="slack.dhabyx@gmail.com"
diff --git a/libraries/php-oci8/slack-desc b/libraries/php-oci8/slack-desc
new file mode 100644
index 0000000000..b768437c35
--- /dev/null
+++ b/libraries/php-oci8/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 ':' except on otherwise blank lines.
+
+ |-----handy-ruler------------------------------------------------------|
+php-oci8: PHP-OCI8 (PHP extension to access Oracle Database)
+php-oci8:
+php-oci8: The extension can be linked with Oracle client libraries from Oracle
+php-oci8: Database 10.2, 11, or 12.1
+php-oci8:
+php-oci8:
+php-oci8:
+php-oci8:
+php-oci8:
+php-oci8:
+php-oci8: