X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage3%2Fcis-php;h=2ff7172642a1514235d2c6de6404e7678b928a01;hb=425bbc4fed1d0106b78befe474328fb9f5a15334;hp=dbab9877ff775ffd8222c312bb43526e6a19b0b9;hpb=16cc35ba4890382ee9368a176e4f5a7fa773b7a6;p=hvlinux.git diff --git a/stage3/cis-php b/stage3/cis-php index dbab987..2ff7172 100755 --- a/stage3/cis-php +++ b/stage3/cis-php @@ -1,4 +1,6 @@ #!/bin/sh +set -o errexit + # First argument of this script is the package name # Reading system configuration informations, functions and package versions. @@ -7,20 +9,16 @@ source ../functions source ../packages-list # Applying patches (if any) -apply_patches ${1} && - -cd ${LFS_TMP}/${1} && -sed -i 's/const char \*errpfx,/const DB_ENV *dbenv, & const/' ext/dba/dba_db4.c && +apply_patches ${1} +cd ${LFS_TMP}/${1} +sed -i 's/const char \*errpfx,/const DB_ENV *dbenv, & const/' ext/dba/dba_db4.c # Since PHP 5, you need to explicitly bundle PHP with MySQL by --with-mysql directive # (make sure you specified path to where MySQL is installed on your system). # Build directory doesn't work: # gcc: Zend/zend_language_scanner.c: No such file or directory - -# --enable-memory-limit : only for php lower than php-5.2... - ./configure \ --prefix=/usr \ --sysconfdir=/etc \ @@ -34,7 +32,6 @@ sed -i 's/const char \*errpfx,/const DB_ENV *dbenv, & const/' ext/dba/dba_db4.c --with-gd \ --with-freetype-dir=/usr \ --with-t1lib \ - --enable-memory-limit \ --enable-gd-native-ttf \ --enable-calendar \ --enable-dba \ @@ -48,24 +45,23 @@ sed -i 's/const char \*errpfx,/const DB_ENV *dbenv, & const/' ext/dba/dba_db4.c --with-ldap \ --with-mysql=/usr \ --with-imap=/usr/lib/uw-imap \ - --with-imap-ssl=/usr/include/openssl && -make && -make install || exit 1 + --with-imap-ssl=/usr/include/openssl +make +make install if [ -f /etc/php.ini ]; then - cp /etc/php.ini /etc/php.ini.old || exit 1 + cp /etc/php.ini /etc/php.ini.old fi -cp ../${1}/php.ini-dist /etc/php.ini || exit 1 +cp ../${1}/php.ini-dist /etc/php.ini # To enable PHP support in the Apache web server, a new AddType directive # must be added to the httpd.conf file. if ! grep "application/x-httpd-php" /etc/apache/httpd.conf 1> /dev/null 2>&1; then - echo "AddType application/x-httpd-php .php" >> /etc/apache/httpd.conf || exit 1 + echo "AddType application/x-httpd-php .php" >> /etc/apache/httpd.conf fi if ! grep "DirectoryIndex" /etc/apache/httpd.conf | grep "index.php" 1> /dev/null 2>&1; then - sed -i -e "s!\(^DirectoryIndex index.html.*\)!\1 index.php!g" /etc/apache/httpd.conf || exit 1 + sed -i -e "s!\(^DirectoryIndex index.html.*\)!\1 index.php!g" /etc/apache/httpd.conf fi -# Return last error exit $?