|
|
|
@ -1,6 +1,6 @@
|
|
|
|
|
#!/bin/bash |
|
|
|
|
# Build script for Slackware |
|
|
|
|
# Copyright (C) 2008,2009,2010,2011 Damien Goutte-Gattat |
|
|
|
|
# Copyright (C) 2008,2009,2010,2011,2012 Damien Goutte-Gattat |
|
|
|
|
# |
|
|
|
|
# Redistribution and use of this script, with or without modifications, |
|
|
|
|
# is permitted provided that the following conditions are met: |
|
|
|
@ -27,13 +27,13 @@
|
|
|
|
|
|
|
|
|
|
# Source package infos |
|
|
|
|
NAMESRC=${NAMESRC:-postgresql} |
|
|
|
|
VERSION=${VERSION:-9.0.4} |
|
|
|
|
VERSION=${VERSION:-9.1.3} |
|
|
|
|
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.bz2} |
|
|
|
|
WGET=${WGET:-ftp://ftp4.fr.postgresql.org/pub/mirrors/postgresql/source/v$VERSION/$ARCHIVE} |
|
|
|
|
|
|
|
|
|
# Build infos |
|
|
|
|
NAMEPKG=${NAMEPKG:-postgresql} |
|
|
|
|
BUILD=${BUILD:-2GGD} |
|
|
|
|
BUILD=${BUILD:-1GGD} |
|
|
|
|
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')} |
|
|
|
|
JOBS=${JOBS:-1} |
|
|
|
|
EXT=${EXT:-txz} |
|
|
|
@ -71,7 +71,7 @@ x86_64)
|
|
|
|
|
;; |
|
|
|
|
esac |
|
|
|
|
|
|
|
|
|
# Get and verify sources archives |
|
|
|
|
# Get and verify the source archive |
|
|
|
|
if [ ! -r $ARCHIVE ]; then |
|
|
|
|
wget -c -O $ARCHIVE.part "$WGET" |
|
|
|
|
mv $ARCHIVE.part $ARCHIVE |
|
|
|
@ -127,11 +127,12 @@ find $PKG/usr/man -type f -exec gzip -9 {} \;
|
|
|
|
|
|
|
|
|
|
# Install PHP extension |
|
|
|
|
if type -p phpize ; then |
|
|
|
|
PHP_ARCHIVE=php-5.3.6.tar.xz |
|
|
|
|
# Get latest PHP included with Slackware-13.37 |
|
|
|
|
PHP_ARCHIVE=php-5.3.13.tar.xz |
|
|
|
|
( |
|
|
|
|
cd $CWD |
|
|
|
|
if [ ! -r $PHP_ARCHIVE ]; then |
|
|
|
|
wget -c -O $PHP_ARCHIVE.part "ftp://ftp.lip6.fr/pub/linux/distributions/slackware/slackware-13.37/source/n/php/$PHP_ARCHIVE" |
|
|
|
|
wget -c -O $PHP_ARCHIVE.part "ftp://ftp.lip6.fr/pub/linux/distributions/slackware/slackware-13.37/patches/source/php/$PHP_ARCHIVE" |
|
|
|
|
mv $PHP_ARCHIVE.part $PHP_ARCHIVE |
|
|
|
|
fi |
|
|
|
|
sha1sum -c $PHP_ARCHIVE.sha1 |
|
|
|
@ -146,8 +147,9 @@ if type -p phpize ; then
|
|
|
|
|
install -D -s -m 755 modules/pgsql.so $PKG/usr/lib$LIBDIRSUFFIX/php/extensions/pgsql.so |
|
|
|
|
|
|
|
|
|
cd ../pdo_pgsql |
|
|
|
|
phpize |
|
|
|
|
./configure --with-pdo-pgsql=$PKG/usr |
|
|
|
|
sed -i "s:^PGSQL_SHARED_LIBADD =.*$:PGSQL_SHARED_LIBADD = -Wl,-rpath,/usr/lib$LIBDIRSUFFIX -L$PKG/usr/lib$LIBDIRSUFFIX -lpq:" Makefile |
|
|
|
|
sed -i "s:^PDO_PGSQL_SHARED_LIBADD =.*$:PDO_PGSQL_SHARED_LIBADD = -Wl,-rpath,/usr/lib$LIBDIRSUFFIX -L$PKG/usr/lib$LIBDIRSUFFIX -lpq:" Makefile |
|
|
|
|
make |
|
|
|
|
install -D -s -m 755 modules/pdo_pgsql.so $PKG/usr/lib$LIBDIRSUFFIX/php/extensions/pdo_pgsql.so |
|
|
|
|
fi |
|
|
|
|