#variables SRC_DIR=/data/src SVN_DIR=/data/svn # goto src directory cd $SRC_DIR #-------------- # php #-------------- #wget #tar xjvf php-5.3.10.tar.bz2 cd php-5.3.10 # download patches wget http://patch-tracker.debian.org/patch/series/dl/php5/5.3.10-1/004-ldap_fix.patch wget http://patch-tracker.debian.org/patch/series/dl/php5/5.3.10-1/017-pread_pwrite_disable.patch wget http://patch-tracker.debian.org/patch/series/dl/php5/5.3.10-1/029-php.ini_paranoid.patch wget http://patch-tracker.debian.org/patch/series/dl/php5/5.3.10-1/034-apache2_umask_fix.patch wget http://patch-tracker.debian.org/patch/series/dl/php5/5.3.10-1/036-fd_setsize_fix.patch wget http://patch-tracker.debian.org/patch/series/dl/php5/5.3.10-1/043-recode_size_t.patch wget http://patch-tracker.debian.org/patch/series/dl/php5/5.3.10-1/libdb_is_-ldb #wget http://patch-tracker.debian.org/patch/series/dl/php5/5.3.10-1/page_size_fixes.patch wget http://patch-tracker.debian.org/patch/series/dl/php5/5.3.9-1/suhosin.patch wget http://patch-tracker.debian.org/patch/series/dl/php5/5.3.10-1/gentoo/009_ob-memory-leaks.patch wget http://patch-tracker.debian.org/patch/series/dl/php5/5.3.10-1/zend_int_overflow.patch wget http://patch-tracker.debian.org/patch/series/dl/php5/5.3.10-1/fix_broken_upstream_tests.patch wget http://patch-tracker.debian.org/patch/series/dl/php5/5.3.10-1/fix_broken_5.3_tests.patch wget http://patch-tracker.debian.org/patch/series/dl/php5/5.3.10-1/fix_broken_sha2_test.patch # apply patches patch -p 1 -i 004-ldap_fix.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 libdb_is_-ldb #patch -p 1 -i page_size_fixes.patch patch -p 1 -i suhosin.patch patch -p 1 -i 009_ob-memory-leaks.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 \ --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-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=shared,/usr \ --with-curl=shared,/usr \ --with-db4=shared,/usr \ --with-gettext=shared,/usr \ --with-gd=shared,/usr \ --with-freetype-dir \ --with-interbase=shared,/usr \ --with-jpeg-dir \ --with-layout=GNU \ --with-ldap=shared,/usr \ --with-ldap-sasl \ --with-libmbfl \ --with-mhash=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-pdo-firebird=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-dbase \ --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-pdo-sqlite=shared \ --with-pdo-sqlite3=shared \ --with-sqlite3=shared \ --with-sqlite=shared \ --enable-embedded-mysqli \ --enable-libxml \ --with-iconv=shared \ --enable-suhosin \ --with-mysqli=mysqlnd \ --with-pdo-mysql=shared,mysqlnd # compile php5 make # strip -R .note -R .comment /usr/lib/php5/20090626/* strip -R .note -R .comment /usr/local/apache2/modules/libphp5.so #-------------- # eaccelerator #-------------- cd $SRC_DIR #wget eaccelerator-0.9.6.1.tar.bz2 #tar xjvf eaccelerator-0.9.6.1.tar.bz2 cd eaccelerator-0.9.6.1 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/20090626/* #-------------- # apc #-------------- cd $SRC_DIR #wget http://pecl.php.net/get/APC-3.1.9.tgz #tar xzvf APC-3.1.9.tgz cd APC-3.1.9 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/20090626/* #-------------- # pdf #-------------- cd $SRC_DIR #wget pdflib-2.1.8.tgz #tar pdflib-2.1.8.tgz cd pdflib-2.1.8 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/20090626/* #-------------- # copy to svn #-------------- cd $SVN_DIR/trunk/web/apache2_php5/eisfair-2-bin cp /usr/lib/php5/20090626/* usr/lib/php5/extensions/ cp /usr/local/apache2/modules/libphp5.so usr/local/apache2/modules/libphp5.so