#set -e #variables SRC_DIR=/data/src SVN_DIR=/data/svn PHP_VER=php-7.0.27 EISFAIR_VER=1 if [ "`cat /etc/eisfair-system`" = "eisfair-2" ] then EISFAIR_VER=2 fi # goto src directory cd $SRC_DIR #-------------- # php #-------------- #wget #tar xjvf php-5.4.34.tar.bz2 cd $PHP_VER # download patches #wget http://patch-tracker.debian.org/patch/series/dl/php5/5.4.15-1/004-ldap_fix.patch #wget http://patch-tracker.debian.org/patch/series/dl/php5/5.4.15-1/017-pread_pwrite_disable.patch #wget http://patch-tracker.debian.org/patch/series/dl/php5/5.4.15-1/113-php.ini_securitynotes.patch #wget http://patch-tracker.debian.org/patch/series/dl/php5/5.4.15-1/034-apache2_umask_fix.patch #wget http://patch-tracker.debian.org/patch/series/dl/php5/5.4.15-1/036-fd_setsize_fix.patch #wget http://patch-tracker.debian.org/patch/series/dl/php5/5.4.15-1/043-recode_size_t.patch #wget http://patch-tracker.debian.org/patch/series/dl/php5/5.4.15-1/libdb_is_-ldb #wget http://download.suhosin.org/suhosin-patch-5.3.9-0.9.10.patch.gz #wget http://patch-tracker.debian.org/patch/series/dl/php5/5.4.15-1/zend_int_overflow.patch #wget http://patch-tracker.debian.org/patch/series/dl/php5/5.4.15-1/fix_broken_upstream_tests.patch #wget http://patch-tracker.debian.org/patch/series/dl/php5/5.4.15-1/fix_broken_5.3_tests.patch #wget http://patch-tracker.debian.org/patch/series/dl/php5/5.4.15-1/fix_broken_sha2_test.patch #wget http://patch-tracker.debian.org/patch/series/dl/php5/5.4.15-1/gdIOCtx.patch #gunzip suhosin-patch-5.3.9-0.9.10.patch.gz # apply patches #patch -p 1 -i 004-ldap_fix.patch #patch -p 1 -i 017-pread_pwrite_disable.patch #patch -p 1 -i 113-php.ini_securitynotes.patch #patch -p 1 -i 034-apache2_umask_fix.patch #patch -p 1 -i 036-fd_setsize_fix.patch #patch -p 1 -i 043-recode_size_t.patch #patch -p 1 -i libdb_is_-ldb ##patch -p 1 -i suhosin-patch-5.3.9-0.9.10.patch #patch -p 1 -i zend_int_overflow.patch #patch -p 1 -i fix_broken_upstream_tests.patch #patch -p 1 -i fix_broken_5.3_tests.patch #patch -p 1 -i fix_broken_sha2_test.patch #patch -p 1 -i fix_gd_210.patch #patch -p 1 -i libdb.patch #patch -p 1 -i gdIOCtx.patch # rebuild configure script mv configure configure.orig ./buildconf --force #sed für maintainer mode = off # configure ./configure --prefix=/usr \ --exec-prefix=/usr \ --with-apxs2=/usr/local/apache2/bin/apxs \ --with-config-file-path=/etc/php5/apache2 \ --program-prefix= \ --build=i486-pc-linux-gnu \ --target=i486-pc-linux-gnu \ --host=i486-pc-linux-gnu \ --bindir=/usr/bin \ --sysconfdir=/etc/php5 \ --libdir=/usr/lib/php5 \ --datadir=/usr/lib/php5 \ --includedir=/usr/include/php5 \ --with-pear=/usr/share/php5 \ --disable-debug \ --enable-bcmath \ --enable-calendar \ --enable-dba \ --enable-exif \ --enable-ftp \ --enable-gd-native-ttf \ --enable-gd-jis-conv \ --enable-inline-optimization \ --enable-ipv6 \ --enable-mbstring \ --enable-mbregex \ --enable-session \ --enable-shmop \ --enable-sigchild \ --enable-sockets \ --enable-sysvmsg \ --enable-sysvsem \ --enable-sysvshm \ --enable-wddx \ --enable-zip \ --with-bz2=shared,/usr \ --with-curl=shared,/usr \ --with-db4=shared,/usr \ --with-gettext=shared,/usr \ --with-gd=shared,/usr \ --with-freetype-dir \ --with-jpeg-dir \ --with-layout=GNU \ --with-ldap=shared,/usr \ --with-ldap-sasl \ --with-libmbfl \ --with-mcrypt=shared,/usr \ --with-mm=shared,/usr \ --with-pdo-dblib=shared,/usr \ --with-pdo-mysql=shared,/usr \ --with-pgsql=shared,/usr \ --with-pdo-pgsql=shared,/usr \ --with-interbase=shared,/usr \ --with-openssl=shared,/usr \ --with-png-dir \ --with-zlib=shared,/usr \ --with-imap=/usr/local/imap-2007 \ --with-imap-ssl=/usr/local/imap-2007 \ --with-config-file-scan-dir=/etc/php5/conf.d \ --with-config-file-path=/etc/php5/apache2 \ --enable-soap=shared \ --enable-sigchild \ --enable-pdo=shared \ --with-sqlite3=shared,/usr \ --with-pdo-sqlite=shared,/usr \ --enable-embedded-mysqli \ --enable-libxml \ --with-iconv=shared \ --with-mysqli=mysqlnd \ --with-pdo-mysql=shared,mysqlnd \ --with-xsl \ --with-xpm-dir=/usr \ --enable-fpm \ --with-fpm-user=wwwrun \ --with-fpm-group=nogroup \ --enable-intl # compile php5 make make install # strip -R .note -R .comment /usr/lib/php5/20151012/* strip -R .note -R .comment /usr/local/apache2/modules/libphp5.so #-------------- # apcu #-------------- cd $SRC_DIR #wget http://pecl.php.net/get/apcu-5.1.9.tgz #tar xzvf apcu-5.1.9.tgz cd apcu-5.1.9 make distclean phpize ./configure --host=i486-pc-linux-gnu \ --build=i486-pc-linux-gnu \ --target=i486-pc-linux-gnu make make install strip -R .note -R .comment /usr/lib/php5/20151012/* #-------------- # pdf #-------------- cd $SRC_DIR #wget https://pecl.php.net/get/pdflib-4.1.2.tgz #tar xzvf pdflib-4.1.2.tgz # see https://bugs.php.net/bug.php?id=60385 for hotfix cd pdflib-4.1.2 make distclean phpize ./configure --host=i486-pc-linux-gnu \ --build=i486-pc-linux-gnu \ --target=i486-pc-linux-gnu make make install strip -R .note -R .comment /usr/lib/php5/20151012/* #-------------- # redis #-------------- cd $SRC_DIR #wget http://pecl.php.net/get/redis-3.1.6.tgz #tar xzvf redis-3.1.6.tgz cd redis-3.1.6/ make distclean phpize ./configure --host=i486-pc-linux-gnu \ --build=i486-pc-linux-gnu \ --target=i486-pc-linux-gnu make make install strip -R .note -R .comment /usr/lib/php5/20151012/* #-------------- # php-xz #-------------- cd $SRC_DIR cd $PHP_VER cd ext git clone https://github.com/payden/php-xz xz cd xz git pull phpize && ./configure && make && make install strip -R .note -R .comment /usr/lib/php5/20151012/* #-------------- # pcntl #-------------- cd $SRC_DIR cd $PHP_VER cd ext cd pcntl phpize && ./configure && make && make install strip -R .note -R .comment /usr/lib/php5/20151012/* #-------------- # intl #-------------- cd $SRC_DIR cd $PHP_VER cd ext cd intl phpize && ./configure && make && make install strip -R .note -R .comment /usr/lib/php5/20131226/* #-------------- # libsmbclient #-------------- cd $SRC_DIR cd $PHP_VER cd ext git clone git://github.com/eduardok/libsmbclient-php.git cd libsmbclient-php && phpize && ./configure && make && make install strip -R .note -R .comment /usr/lib/php5/20131226/* #-------------- # copy to svn #-------------- cd $SVN_DIR/trunk/web/apache2_php7/eisfair-${EISFAIR_VER}-bin cp /usr/local/apache2/modules/libphp7.so usr/local/apache2/modules/libphp7.so cd $SVN_DIR/trunk/web/php7-common/eisfair-${EISFAIR_VER} cp /usr/lib/php5/20151012/* usr/lib/php7/extensions/