summaryrefslogtreecommitdiff
path: root/libraries/php-pgsql/php-pgsql.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/php-pgsql/php-pgsql.SlackBuild')
-rw-r--r--libraries/php-pgsql/php-pgsql.SlackBuild38
1 files changed, 32 insertions, 6 deletions
diff --git a/libraries/php-pgsql/php-pgsql.SlackBuild b/libraries/php-pgsql/php-pgsql.SlackBuild
index e7df477031..1a270f85fd 100644
--- a/libraries/php-pgsql/php-pgsql.SlackBuild
+++ b/libraries/php-pgsql/php-pgsql.SlackBuild
@@ -24,7 +24,7 @@
SRCNAM=php
PRGNAM=php-pgsql
-VERSION=5.4.6
+VERSION=5.4.20
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -70,9 +70,10 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-cd ext/pgsql/
-
PHP_CONFIG=/usr/bin/php-config
+EXTENSION_DIR="$PKG/$($PHP_CONFIG --extension-dir)"
+
+cd ext/pgsql/
/usr/bin/phpize
@@ -90,18 +91,43 @@ CXXFLAGS="$SLKCFLAGS" \
make
-EXTENSION_DIR="$PKG/$($PHP_CONFIG --extension-dir)"
mkdir -p $EXTENSION_DIR $PKG/etc/php
make install DESTDIR=$PKG EXTENSION_DIR=$EXTENSION_DIR
+cd -
+
+cd ext/pdo_pgsql
+
+/usr/bin/phpize
+
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --with-php-config=$PHP_CONFIG \
+ --build=$ARCH-slackware-linux
+
+make
+
+make install DESTDIR=$PKG EXTENSION_DIR=$EXTENSION_DIR
+
+cd -
+
install -m 644 $CWD/pgsql.ini $PKG/etc/php/pgsql.ini.new
+install -m 644 $CWD/pdo_pgsql.ini $PKG/etc/php/pdo_pgsql.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
-cp CREDITS README $PKG/usr/doc/$PRGNAM-$VERSION/
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/{pgsql,pdo_pgsql}
+cp ext/pgsql/{CREDITS,README} $PKG/usr/doc/$PRGNAM-$VERSION/pgsql/
+cp ext/pdo_pgsql/CREDITS $PKG/usr/doc/$PRGNAM-$VERSION/pdo_pgsql/
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install