summaryrefslogtreecommitdiff
path: root/libraries/php-suhosin/php-suhosin.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/php-suhosin/php-suhosin.SlackBuild')
-rw-r--r--libraries/php-suhosin/php-suhosin.SlackBuild30
1 files changed, 18 insertions, 12 deletions
diff --git a/libraries/php-suhosin/php-suhosin.SlackBuild b/libraries/php-suhosin/php-suhosin.SlackBuild
index 5529126ee6..2ad3baa774 100644
--- a/libraries/php-suhosin/php-suhosin.SlackBuild
+++ b/libraries/php-suhosin/php-suhosin.SlackBuild
@@ -3,6 +3,7 @@
# Slackware build script for Suhosin
# Written by Menno Duursma <druiloor@zonnet.nl>
+# Modified by Heinz Wiesinger <pprkut@liwjatan.at>
# This program is free software. It comes without any warranty.
# Granted WTFPL, Version 2, as published by Sam Hocevar. See
@@ -44,7 +45,7 @@ else
LIBDIRSUFFIX=""
fi
-set -e # Exit on most errors
+set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
@@ -53,28 +54,33 @@ rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
cd $SRCNAM-$VERSION
chown -R root:root .
-find . -type d | xargs chmod 0755
-find . -type f | xargs chmod a-s,go-w
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
-# With PHP extentions apparently this is needed
-phpize
+/usr/bin/phpize
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
-EXTENSION_DIR="$PKG/usr/lib$LIBDIRSUFFIX/php/extensions" \
./configure \
--prefix=/usr \
- --libdir=/usr/lib$LIBDIRSUFFIX \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
- --localstatedir=/var
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --with-php-config=/usr/bin/php-config \
+ --build=$ARCH-slackware-linux
make
-install -D -m755 modules/suhosin.so $PKG/usr/lib$LIBDIRSUFFIX/php/extensions/suhosin.so
+mkdir -p $PKG/usr/lib$LIBDIRSUFFIX/php/extensions/ \
+ $PKG/etc/php
-# Add to the PHP config
-mkdir -p $PKG/etc/php
-echo "extension=suhosin.so" > $PKG/etc/php/suhosin.ini.new
+install -m 755 modules/suhosin.so $PKG/usr/lib$LIBDIRSUFFIX/php/extensions/
+install -m 644 $CWD/suhosin.ini $PKG/etc/php/suhosin.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