#set -e #variables SRC_DIR=/data/src SVN_DIR=/data/svn EISFAIR_VER=2 if [ "`cat /etc/eisfair-system`" = "eisfair-1" ] then EISFAIR_VER=1 fi # goto src directory cd $SRC_DIR #-------------- # php #-------------- #wget #tar xjvf php-5.4.34.tar.bz2 cd php-5.4.45 # 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-zend-multibyte \ --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-hash=shared,/usr \ --with-mcrypt=shared,/usr \ --with-mm=shared,/usr \ --with-mssql=shared,/usr \ --with-pdo-dblib=shared,/usr \ --with-mysql=shared,/usr \ --with-pdo-mysql=shared,/usr \ --with-pgsql=shared,/usr \ --with-pdo-pgsql=shared,/usr \ --with-openssl=shared,/usr \ --with-png-dir \ --with-t1lib=shared,/usr \ --with-zlib=shared,/usr \ --with-imap=/usr/local/imap-2007 \ --with-imap-ssl=/usr/local/imap-2007 \ --enable-track-vars \ --with-curlwrappers \ --with-snmp=shared \ --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 \ --enable-suhosin \ --with-mysqli=mysqlnd \ --with-pdo-mysql=shared,mysqlnd \ --with-xsl # compile php5 make make install # strip -R .note -R .comment /usr/lib/php5/20131226/* strip -R .note -R .comment /usr/local/apache2/modules/libphp5.so #-------------- # suhosin #-------------- cd $SRC_DIR #wget http://download.suhosin.org/suhosin-0.9.33.tgz #tar xzvf suhosin-0.9.33.tgz cd suhosin-0.9.37.1 make distclean phpize ./configure --host=i486-pc-linux-gnu \ --build=i486-pc-linux-gnu \ --target=i486-pc-linux-gnu \ --with-php-config=/usr/bin/php-config make make install strip -R .note -R .comment /usr/lib/php5/20100525/* #-------------- # eaccelerator #-------------- cd $SRC_DIR #wget eaccelerator-0.9.6.1.tar.bz2 #tar xjvf eaccelerator-0.9.6.1.tar.bz2 cd eaccelerator-eaccelerator-42067ac/ make distclean phpize ./configure --host=i486-pc-linux-gnu \ --build=i486-pc-linux-gnu \ --target=i486-pc-linux-gnu \ --with-eaccelerator-doc-comment-inclusion \ --without-eaccelerator-use-inode make make install strip -R .note -R .comment /usr/lib/php5/20100525/* #-------------- # apc #-------------- cd $SRC_DIR #wget http://pecl.php.net/get/APC-3.1.13.tgz #tar xzvf APC-3.1.13.tgz cd APC-3.1.13 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/20100525/* cd $SRC_DIR #wget http://pecl.php.net/get/apcu-4.0.7.tgz #tar xzvf apcu-4.0.7.tgz cd apcu-4.0.7 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/20100525/* #-------------- # pdf #-------------- cd $SRC_DIR #wget http://pecl.php.net/get/pdflib-3.0.4.tgz #tar xzvf pdflib-3.0.4.tgz # see https://bugs.php.net/bug.php?id=60385 for hotfix cd pdflib-3.0.4 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/20100525/* #-------------- # php-xz #-------------- cd $SRC_DIR cd php/ext git clone https://github.com/payden/php-xz xz cd xz && phpize && ./configure && make && make install strip -R .note -R .comment /usr/lib/php5/20100525/* #-------------- # copy to svn #-------------- cd $SVN_DIR/trunk/web/apache2_php5/eisfair-${EISFAIR_VER}-bin cp /usr/lib/php5/20131226/* usr/lib/php5/extensions/ cp /usr/local/apache2/modules/libphp5.so usr/local/apache2/modules/libphp5.so