[csw-devel] SF.net SVN: gar:[4455] csw/mgar/pkg/php5/trunk/extensions
valholla at users.sourceforge.net
valholla at users.sourceforge.net
Thu Apr 23 23:19:20 CEST 2009
Revision: 4455
http://gar.svn.sourceforge.net/gar/?rev=4455&view=rev
Author: valholla
Date: 2009-04-23 21:19:20 +0000 (Thu, 23 Apr 2009)
Log Message:
-----------
checkin for php5_apache2
Added Paths:
-----------
csw/mgar/pkg/php5/trunk/extensions/php5_apache2/
csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/
csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend
csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.postinstall
csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.preremove
csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.space
csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/httpd-php5.conf.CSW
Added: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend
===================================================================
--- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend (rev 0)
+++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.depend 2009-04-23 21:19:20 UTC (rev 4455)
@@ -0,0 +1,9 @@
+P CSWap2prefork ap2_prefork - Apache 2.2 prefork MPM
+P CSWbdb44 berkeleydb44 - embedded database libraries and utilities
+P CSWiconv libiconv - GNU iconv library
+P CSWkrb5lib krb5_lib - MIT Kerberos 5 core libraries
+P CSWlibmm libmm - Shared Memory Allocation abstraction library
+P CSWlibxml2 libxml2 - XML Parser Library
+P CSWosslrt openssl_rt - Openssl runtime libraries
+P CSWphp5 php5 - PHP Hypertext Processor 5
+P CSWzlib zlib - Zlib Data Compression Library
Added: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.postinstall
===================================================================
--- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.postinstall (rev 0)
+++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.postinstall 2009-04-23 21:19:20 UTC (rev 4455)
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+CSW_PREFIX=${PKG_INSTALL_ROOT}/opt/csw
+AP2_PREFIX=$CSW_PREFIX/apache2
+AP2_BINDIR=$AP2_PREFIX/sbin
+AP2_LIBEXEC=$AP2_PREFIX/libexec
+AP2_CONFDIR=$AP2_PREFIX/etc
+AP2_EXTRADIR=$AP2_CONFDIR/extra
+AP2_CONFIG=$AP2_CONFDIR/httpd.conf
+
+# Enable the PHP module
+PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-'/'}
+chroot $PKG_INSTALL_ROOT \
+ $AP2_BINDIR/apxs -S LIBEXECDIR=$AP2_LIBEXEC -e -a -n php5 libphp5.so
+
+# Configure mod_php5 in httpd.conf
+if [ -n "`egrep 'IfModule (mod_php|php_module)' $AP2_CONFIG`" ]
+then
+ echo "Existing mod_php5 configuration detected"
+elif [ -n "`egrep '#Include etc/extra/httpd-php5.conf' $AP2_CONFIG`" ]; then
+ echo "Re-enabling existing config"
+ perl -i -plne 's,^#(Include etc/extra/httpd-php5.conf),$1,' $AP2_CONFIG
+else
+ echo "Adding Include for extra/http-php5.conf to httpd.conf"
+ cat << END >> $AP2_CONFIG
+
+Include etc/extra/httpd-php5.conf
+END
+fi
+
+# Copy templates
+for file in $AP2_EXTRADIR/httpd-php5.conf
+do
+ if [ ! -f $file ]; then
+ echo "Creating $file"
+ cp $file.CSW $file
+ else
+ echo "Preserving existing $file"
+ fi
+done
+
+# Finito
+cat <<END
+
+NOTICE: mod_php5 is enabled in httpd.conf but the server was not restarted.
+Please examine your php5 configuration and restart apache.
+
+END
+
+exit 0
Added: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.preremove
===================================================================
--- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.preremove (rev 0)
+++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.preremove 2009-04-23 21:19:20 UTC (rev 4455)
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+CSW_PREFIX=${PKG_INSTALL_ROOT}/opt/csw
+AP2_PREFIX=$CSW_PREFIX/apache2
+AP2_BINDIR=$AP2_PREFIX/sbin
+AP2_LIBEXEC=$AP2_PREFIX/libexec
+AP2_CONFDIR=$AP2_PREFIX/etc
+AP2_EXTRADIR=$AP2_CONFDIR/extra
+AP2_CONFIG=$AP2_CONFDIR/httpd.conf
+
+# Disable the PHP module
+PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-'/'}
+chroot $PKG_INSTALL_ROOT \
+ $AP2_BINDIR/apxs -S LIBEXECDIR=$AP2_LIBEXEC -e -A -n php5 libphp5.so
+
+echo "Disabling httpd-php5.conf in httpd.conf"
+perl -i -plne 's,(?<!#)(Include etc/extra/httpd-php5.conf),#$1,' $AP2_CONFIG
+
+cat <<END
+
+NOTICE: mod_php5 is disabled in httpd.conf but the server was not restarted.
+Please check your configuration and restart apache.
+
+END
+
+exit 0
Added: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.space
===================================================================
--- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.space (rev 0)
+++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/CSWap2modphp5.space 2009-04-23 21:19:20 UTC (rev 4455)
@@ -0,0 +1 @@
+$BASEDIR 4
Added: csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/httpd-php5.conf.CSW
===================================================================
--- csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/httpd-php5.conf.CSW (rev 0)
+++ csw/mgar/pkg/php5/trunk/extensions/php5_apache2/files/httpd-php5.conf.CSW 2009-04-23 21:19:20 UTC (rev 4455)
@@ -0,0 +1,8 @@
+
+<IfModule php5_module>
+ <IfModule mime_module>
+ AddType application/x-httpd-php .php
+ AddType application/x-httpd-php-source .phps
+ </IfModule>
+</IfModule>
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list