summaryrefslogtreecommitdiff
path: root/source/n/php/php.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/php/php.SlackBuild')
-rwxr-xr-xsource/n/php/php.SlackBuild33
1 files changed, 19 insertions, 14 deletions
diff --git a/source/n/php/php.SlackBuild b/source/n/php/php.SlackBuild
index 9e263230..2e8748ce 100755
--- a/source/n/php/php.SlackBuild
+++ b/source/n/php/php.SlackBuild
@@ -3,7 +3,7 @@
# Build and package mod_php on Slackware.
# by: David Cantrell <david@slackware.com>
# Modified for PHP 4-5 by volkerdi@slackware.com
-# Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013 Patrick Volkerding, Sebeka, MN, USA
+# Copyright 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2015 Patrick Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,13 +25,13 @@
VERSION=${VERSION:-$(echo php-*.tar.xz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
-ALPINE=2.11
+ALPINE=2.20
BUILD=${BUILD:-1}
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
+ i?86) export ARCH=i586 ;;
arm*) export ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other archs:
*) export ARCH=$( uname -m ) ;;
@@ -52,6 +52,9 @@ if [ "$ARCH" = "i386" ]; then
elif [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
LIBDIRSUFFIX=""
@@ -75,14 +78,13 @@ else
strip -g c-client.a
mkdir -p $IMAPLIBDIR/lib${LIBDIRSUFFIX}
cp c-client.a $IMAPLIBDIR/lib${LIBDIRSUFFIX}
- ( cd $IMAPLIBDIR/lib${LIBDIRSUFFIX} ; ln -sf c-client.a libc-client.a )
mkdir -p $IMAPLIBDIR/include
cp *.h $IMAPLIBDIR/include
)
fi
mkdir -p $PKG/etc/httpd
-mkdir -p $PKG/etc/php
+mkdir -p $PKG/etc/php.d
# A trick from DaMouse to enable building php into $PKG.
# We'll remove this later on.
cat /etc/httpd/original/httpd.conf > $PKG/etc/httpd/httpd.conf
@@ -96,8 +98,6 @@ rm -rf php-$VERSION
tar xvf $CWD/php-$VERSION.tar.?z* || exit 1
cd php-$VERSION
-zcat $CWD/init.d.php-fpm.in.diff.gz | patch -p1 --verbose || exit 1
-
# cleanup:
find . -name "*.orig" -delete
@@ -158,8 +158,8 @@ CFLAGS="$SLKCFLAGS" \
--enable-pcntl \
--enable-mbregex \
--enable-tokenizer=shared \
- --with-config-file-scan-dir=/etc/php \
- --with-config-file-path=/etc/httpd \
+ --with-config-file-scan-dir=/etc/php.d \
+ --with-config-file-path=/etc \
--enable-mod_charset \
--with-layout=PHP \
--disable-sigchild \
@@ -178,7 +178,6 @@ CFLAGS="$SLKCFLAGS" \
--enable-calendar=shared \
--enable-ctype=shared \
--with-curl=shared \
- --with-curlwrappers \
--with-mcrypt=/usr \
--enable-dba=shared \
--with-gdbm=/usr \
@@ -188,6 +187,7 @@ CFLAGS="$SLKCFLAGS" \
--with-gd=shared \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
+ --with-vpx-dir=/usr \
--with-zlib-dir=/usr \
--with-xpm-dir=/usr \
--with-freetype-dir=/usr \
@@ -204,9 +204,11 @@ CFLAGS="$SLKCFLAGS" \
--with-mysql=shared,mysqlnd \
--with-mysqli=shared,mysqlnd \
--with-mysql-sock=/var/run/mysql/mysql.sock \
+ --with-iodbc=shared,/usr \
--enable-pdo=shared \
--with-pdo-mysql=shared,mysqlnd \
--with-pdo-sqlite=shared,/usr \
+ --with-pdo-odbc=shared,iODBC,/usr \
--with-pspell=shared,/usr \
--with-enchant=shared,/usr \
--enable-shmop=shared \
@@ -223,10 +225,12 @@ CFLAGS="$SLKCFLAGS" \
--enable-zip=shared \
--with-tsrm-pthreads \
--enable-intl=shared \
+ --enable-opcache \
--enable-shared=yes \
--enable-static=no \
--with-gnu-ld \
--with-pic \
+ --enable-phpdbg \
--build=$ARCH-slackware-linux
# I am told this option is worse than nothing. :-)
@@ -238,11 +242,9 @@ CFLAGS="$SLKCFLAGS" \
make $NUMJOBS || make || exit 1
make install INSTALL_ROOT=$PKG || exit 1
-mkdir -p $PKG/etc/{rc.d,php-fpm}
+mkdir -p $PKG/etc/{rc.d,php-fpm.d}
cp sapi/fpm/init.d.php-fpm $PKG/etc/rc.d/rc.php-fpm.new
chmod 644 $PKG/etc/rc.d/rc.php-fpm.new
-mv $PKG/etc/php-fpm.conf.default $PKG/etc/php-fpm
-chmod 644 $PKG/etc/php-fpm/php-fpm.conf.default
# PHP (used to) install Pear with some strange permissions.
chmod 755 $PKG/usr/bin/pear
@@ -273,12 +275,15 @@ chown -R root:root $PKG/usr/doc/php-$VERSION
chmod 644 $PKG/usr/doc/php-$VERSION/UPGRADING*
mkdir -p $PKG/etc/httpd
-cp -a php.ini-development php.ini-production $PKG/etc/httpd
cat $CWD/mod_php.conf.example | sed -e "s#lib/httpd#lib${LIBDIRSUFFIX}/httpd#" \
> $PKG/etc/httpd/mod_php.conf.example
chmod 644 $PKG/etc/httpd/*
chown root:root $PKG/etc/httpd/*
+cp -a php.ini-development php.ini-production $PKG/etc
+chmod 755 $PKG/etc/php.d $PKG/etc/php-fpm.d $PKG/etc/httpd
+chown root:root $PKG/etc/*
+
# This can go now.
rm -f $PKG/etc/httpd/httpd*