#variables SRC_DIR=/data/src SVN_DIR=/data/svn EISFAIR_VER=1 if [ "`cat /etc/eisfair-system`" = "eisfair-1" ] then EISFAIR_VER=1 fi # goto src directory cd ${SRC_DIR} #-------------- # php #-------------- #wget #tar xjvf php-5.6.26.tar.bz2 cd php-5.6.30 # 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 009_ob-memory-leaks.patch patch -p 1 -i 017-pread_pwrite_disable.patch patch -p 1 -i 029-php.ini_paranoid.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 101-sqlite_is_shared.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 # rebuild configure script mv configure configure.orig ./buildconf --force # configure ./configure --prefix=/usr \ --exec-prefix=/usr \ --with-apxs2=/usr/local/apache2/bin/apxs \ --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-magic-quotes \ --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=/usr \ --with-curl=/usr \ --with-db4=/usr \ --with-gettext=/usr \ --with-gd=/usr \ --with-freetype-dir \ --with-interbase=/usr \ --with-jpeg-dir \ --with-layout=GNU \ --with-ldap=/usr \ --with-ldap-sasl \ --with-libmbfl \ --with-mhash=/usr \ --with-mcrypt=/usr \ --with-mssql=/usr \ --with-pdo-dblib=/usr \ --with-mysql=/usr \ --with-pdo-mysql=/usr \ --with-pgsql=/usr \ --with-pdo-pgsql=/usr \ --with-pdo-firebird=/usr \ --with-openssl=/usr \ --with-png-dir \ --with-t1lib=/usr \ --with-zlib=/usr \ --with-imap=/usr/local/imap-2007 \ --with-imap-ssl=/usr/local/imap-2007 \ --enable-dbase \ --enable-track-vars \ --with-curlwrappers \ --with-config-file-scan-dir=/etc/php5/cli \ --with-config-file-path=/etc/php5/cli \ --enable-soap \ --enable-sigchild \ --enable-pdo \ --with-sqlite \ --with-sqlite3=/usr \ --with-pdo-sqlite3=/usr \ --with-pdo-sqlite=/usr \ --enable-embedded-mysqli \ --enable-libxml \ --with-iconv \ --enable-suhosin \ --with-mysqli=mysqlnd \ --with-pdo-mysql=mysqlnd \ --with-xpm-dir=/usr \ --with-vpx-dir=/usr \ --enable-fpm \ --with-fpm-user=wwwrun \ --with-fpm-group=nogroup \ --enable-intl # compile php5 make clean make make install # strip -R .note -R .comment /usr/bin/php* # /var/install/bin/php5_ccpp.package.install update /var/install/bin/php5_ccpp.package.install upgrade #-------------- # copy to svn #-------------- cd ${SVN_DIR}/trunk/plang/php5_ccpp/eisfair-${EISFAIR_VER} cp /usr/bin/pear* usr/bin/ cp /usr/bin/pecl usr/bin/ cp /usr/bin/php* usr/bin/ cp -R /usr/include/php5/* usr/include/php5/ cp -R /usr/lib/php5/build/* usr/lib/php5/build/ cp -R /usr/share/php5/* usr/share/php5/