Update of /cvsroot/devil-linux/build/scripts
In directory sc8-pr-cvs12.sourceforge.net:/tmp/cvs-serv6980/scripts
Modified Files:
php
Log Message:
- reworked the pecl compile code for better inclusion of all wanted pecl
modules
downside is we need to add a extension=xyz.so to the php.ini
- added pecl apc 3.0.19 module for php performance optimizations
- upgraded memcached to 1.2.6
- upgraded memcache pecl module to 3.0.2
- enable php inline-optimization for performance optimizations
Index: php
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/php,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- php 25 Aug 2008 12:30:29 -0000 1.22
+++ php 19 Sep 2008 07:35:23 -0000 1.23
@@ -29,25 +29,6 @@
build )
IMAPDIR=$(find_src_dir imap)
if [ "$CONFIG_PHP" = "y" ]; then
- cd ext || exit 1
- rm -rf lzf &> /dev/null || exit 1
-
- for FILE in $(ls $DL_DIR/src/pecl/*.tgz)
- do
- echo "unpacking PECL extension $FILE"
- F=${FILE##*/}
- DIRNAME=${F%*.tgz}
- PACKAGENAME=${F%-*}
- test -d $PACKAGENAME && rm -rf $PACKAGENAME
- tar -xzf $FILE || exit 1
- mv $DIRNAME $PACKAGENAME || exit 1
- done
- mv pecl_http* http || exit 1
- mv LZF lzf || exit 1
-
- cd .. || exit 1
- rm configure || exit 1
- ./buildconf --force || exit 1
./configure --with-apxs2=/usr/sbin/apxs --with-mysql=/usr --disable-cgi --with-openssl --with-zlib --with-bz2 --enable-calendar \
--with-jpeg-dir=/usr --enable-dba --with-gdbm --with-db4 --with-inifile --with-flatfile --with-dom --with-dom-xslt \
@@ -56,12 +37,37 @@
--with-imap=$IMAPDIR --with-imap-ssl --with-openssl --with-iconv --with-curl \
--enable-http --with-http-shared-deps --with-http-curl-requests --with-http-curl-libevent --with-http-zlib-compression \
--sysconfdir=/etc --with-config-file-path=/etc --prefix=/usr --with-gettext \
- --enable-mbstring --enable-memcache --enable-lzf --enable-rar --enable-zip || exit 1
+ --enable-mbstring --enable-inline-optimization || exit 1
+
#
# not working --enable-xslt --with-kerberos
# do not use --with-cyrus
- make CC="gcc -fno-stack-protector" $PMAKE all || exit 1
+
+ rm ~/.pearrc
+ rm /etc/pear.conf
+ make $PMAKE CC="gcc -fno-stack-protector" all install || exit 1
strip_debug
+
+ cp -dp php.ini-dist /etc/php.ini || exit 1
+
+ rm -rf DL_pecl &> /dev/null
+ mkdir -p DL_pecl || exit 1
+ mkdir -p DL_pecl/installroot/etc/ || exit 1
+ replace_str /etc/php.ini 'extension_dir = "./"' 'extension_dir = "/usr/lib/php/extensions"'
+ pear config-set php_ini /etc/php.ini
+ pear config-set ext_dir /usr/lib/php/extensions
+ pear config-set cfg_dir /etc
+ for FILE in $(ls $DL_DIR/src/pecl/*.tgz)
+ do
+ echo "compiling PECL extension $FILE"
+ F=${FILE##*/}
+ DIRNAME=${F%*.tgz}
+ PACKAGENAME=$(echo ${F%-*} | tr '[:upper:]' '[:lower:]')
+ yes "" | pecl install --force --nodeps --offline $FILE || yes "" | pear install --force --nodeps --offline $FILE
+ done
+ set -x
+ find /usr/lib/php/extensions -name \*.so -exec mv '{}' /usr/lib/php/extensions/ \; || exit 1
+ find /usr/lib/php/extensions -type d | grep -v "^/usr/lib/php/extensions$" | xargs rm -rf
fi
;;
@@ -76,11 +82,14 @@
rm $TMPDIR/etc/apache2/httpd.conf.bak
rm $TMPDIR/etc/apache2/httpd.conf.old
cp -dp $TMPDIR/etc/apache2/httpd.conf $ETCDIR/etc/apache2/
- cp -dp php.ini-dist $ETCDIR/etc/php.ini || exit 1
+ cp -dp /etc/php.ini $ETCDIR/etc/ || exit 1
+ cp -dp /etc/pear.conf $ETCDIR/etc/ || exit 1
rm -rf $TMPDIR/usr/include || exit 1
cp -dpR $TMPDIR/etc/* $ETCDIR/etc/ || exit 1
copy_docs $TMPDIR/
cp -dpR $TMPDIR/usr/* $CDDIR/usr/ || exit 1
+ # okay now let's overwrite with all the additional extensions which got installed in /usr
+ cp -vdpR /usr/lib/php/* $CDDIR/usr/lib/php/ || exit 1
rm -rf $TMPDIR || exit 1
fi
|