X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=stage5%2Fpkg%2Fphp;h=083a13fe7d2840d8097f83fcd6c3349c0505ca57;hb=78453e212ec7952477a5de2f702bfcab54e7a89c;hp=c23ba587a7bdb93bb09e62638a7b0f9adad54573;hpb=305cb288ba63239087a799237e8a3bd680b09b22;p=hvlinux.git diff --git a/stage5/pkg/php b/stage5/pkg/php index c23ba58..083a13f 100644 --- a/stage5/pkg/php +++ b/stage5/pkg/php @@ -7,11 +7,18 @@ hvconfig_pre() # your system). # Build directory doesn't work: - # gcc: Zend/zend_language_scanner.c: No such file or directory - CONFIGURE_OPTS=" \ - ${CONFIGURE_OPTS} \ - --with-apxs2 \ + # gcc: Zend/zend_language_scanner.c: No such file or directory + # --mandir: + # If not specified, php installs some man pages under /usr/php + # (phpize.1, php.1 and php-config.1) + CONFIGURE_OPTS+=" \ + --localstatedir=/var \ + --datadir=/usr/share/php \ + --mandir=/usr/share/man \ --with-config-file-path=/etc \ + --enable-fpm \ + --with-fpm-user=${HTTPD_USER} \ + --with-fpm-group=${HTTPD_USER} \ --with-zlib \ --enable-bcmath \ --with-bz2 \ @@ -23,6 +30,7 @@ hvconfig_pre() --with-gettext \ --enable-mbstring \ --with-readline \ + --with-apxs2 \ --with-mysql=/usr \ --with-openssl=/usr \ --with-gd \ @@ -41,19 +49,21 @@ hvbuild_post() if [ -f /etc/php.ini ]; then cp /etc/php.ini /etc/php.ini.old fi - cp ${LFS_TMP}/${PACKAGE}/php.ini-production /etc/php.ini + cp ${SRC_DIR}/php.ini-production /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 -q "application/x-httpd-php" /etc/apache/httpd.conf; then - echo "AddType application/x-httpd-php .php" >> /etc/apache/httpd.conf - fi + if [ "x${USE_HTTPD}" = "xyes" ]; then + # To enable PHP support in the Apache web server, a new AddType + # directive must be added to the httpd.conf file. + if ! grep -q "application/x-httpd-php" /etc/httpd/httpd.conf; then + echo "AddType application/x-httpd-php .php" >> /etc/httpd/httpd.conf + fi - # Est-ce nécessaire? - #cgi.discard_path = 1 + # Est-ce nécessaire? + #cgi.discard_path = 1 - if ! grep -q "DirectoryIndex" /etc/apache/httpd.conf | grep "index.php"; then - sed -i -e "s!\(^\s*DirectoryIndex index.html.*\)!\1 index.php!g" \ - /etc/apache/httpd.conf + if ! grep -q "DirectoryIndex" /etc/httpd/httpd.conf | grep "index.php"; then + sed -i -e "s!\(^\s*DirectoryIndex index.html.*\)!\1 index.php!g" \ + /etc/httpd/httpd.conf + fi fi }