[csw-devel] SF.net SVN: gar:[4847] csw/mgar/pkg/php4/trunk/files

valholla at users.sourceforge.net valholla at users.sourceforge.net
Thu May 14 20:26:56 CEST 2009


Revision: 4847
          http://gar.svn.sourceforge.net/gar/?rev=4847&view=rev
Author:   valholla
Date:     2009-05-14 18:26:56 +0000 (Thu, 14 May 2009)

Log Message:
-----------
admin scripts

Modified Paths:
--------------
    csw/mgar/pkg/php4/trunk/files/CSWphp4.postinstall

Added Paths:
-----------
    csw/mgar/pkg/php4/trunk/files/CSWap2modphp4.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWap2modphp4.preremove
    csw/mgar/pkg/php4/trunk/files/CSWap2modphp4.space
    csw/mgar/pkg/php4/trunk/files/CSWmodphp4.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWmodphp4.preremove
    csw/mgar/pkg/php4/trunk/files/CSWmodphp4.space
    csw/mgar/pkg/php4/trunk/files/CSWphp4bcmath.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4bcmath.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4bz2.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4bz2.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4calendar.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4calendar.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4curl.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4curl.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4dba.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4dba.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4domxml.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4domxml.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4gd.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4gd.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4gettext.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4gettext.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4gmp.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4gmp.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4iconv.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4iconv.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4imap.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4imap.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4ldap.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4ldap.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4mbstring.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4mbstring.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4mcal.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4mcal.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4mssql.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4mssql.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4mysql.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4mysql.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4ncurses.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4ncurses.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4odbc.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4odbc.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4openssl.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4openssl.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4pgsql.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4pgsql.preremove
    csw/mgar/pkg/php4/trunk/files/CSWphp4zlib.postinstall
    csw/mgar/pkg/php4/trunk/files/CSWphp4zlib.preremove

Added: csw/mgar/pkg/php4/trunk/files/CSWap2modphp4.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWap2modphp4.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWap2modphp4.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -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 php4 libphp4.so
+
+# Configure mod_php4 in httpd.conf
+if [ -n "`egrep 'IfModule (mod_php|php_module)' $AP2_CONFIG`" ]
+then
+    echo "Existing mod_php4 configuration detected"
+elif [ -n "`egrep '#Include etc/extra/httpd-php4.conf' $AP2_CONFIG`" ]; then
+    echo "Re-enabling existing config"
+    perl -i -plne 's,^#(Include etc/extra/httpd-php4.conf),$1,' $AP2_CONFIG
+else
+    echo "Adding Include for extra/http-php4.conf to httpd.conf"
+    cat << END >> $AP2_CONFIG
+
+Include etc/extra/httpd-php4.conf
+END
+fi
+
+# Copy templates
+for file in $AP2_EXTRADIR/httpd-php4.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_php4 is enabled in httpd.conf but the server was not restarted.
+Please examine your php4 configuration and restart apache.
+
+END
+
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWap2modphp4.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWap2modphp4.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWap2modphp4.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -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 php4 libphp4.so
+
+echo "Disabling httpd-php4.conf in httpd.conf"
+perl -i -plne 's,(?<!#)(Include etc/extra/httpd-php4.conf),#$1,' $AP2_CONFIG
+
+cat <<END
+
+NOTICE: mod_php4 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/php4/trunk/files/CSWap2modphp4.space
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWap2modphp4.space	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWap2modphp4.space	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1 @@
+$BASEDIR 4

Added: csw/mgar/pkg/php4/trunk/files/CSWmodphp4.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWmodphp4.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWmodphp4.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,48 @@
+#!/bin/sh
+
+CSW_PREFIX=${PKG_INSTALL_ROOT}/opt/csw
+AP_PREFIX=$CSW_PREFIX/apache
+AP_BINDIR=$AP_PREFIX/bin
+AP_LIBEXEC=$AP_PREFIX/libexec
+AP_CONFDIR=$AP_PREFIX/conf
+AP_CONFIG=$AP_CONFDIR/httpd.conf
+
+# Enable the PHP module
+PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-'/'}
+chroot $PKG_INSTALL_ROOT \
+    $AP_BINDIR/apxs -S LIBEXECDIR=$AP_LIBEXEC -e -a -n php4 libphp4.so
+
+# Add a configuration sample
+if [ -z "`grep 'IfModule mod_php4.c' $AP_CONFIG`" ]; then
+    cp $AP_CONFIG $AP_CONFIG.pre-PHP4
+
+    echo "Adding libphp4 configuration to $AP_CONFIG..."
+    cat <<CONFIG >> $AP_CONFIG
+
+# For PHP support. added by $PKGINST
+
+<IfModule mod_php4.c>
+    <IfModule mod_mime.c>
+        AddType application/x-httpd-php .php
+        AddType application/x-httpd-php-source .phps
+    </IfModule>
+</IfModule>
+
+# If you want "index.php" to be an acceptible directory index, adjust
+# DirectoryIndex index.html
+# to be
+# DirectoryIndex index.html index.php
+
+CONFIG
+
+fi
+
+# Finito
+cat <<END
+
+NOTICE: mod_php4 is enabled in httpd.conf but the server was not restarted.
+Please examine your php4 configuration and restart apache.
+
+END
+
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWmodphp4.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWmodphp4.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWmodphp4.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+CSW_PREFIX=${PKG_INSTALL_ROOT}/opt/csw
+AP_PREFIX=$CSW_PREFIX/apache
+AP_BINDIR=$AP_PREFIX/bin
+AP_LIBEXEC=$AP_PREFIX/libexec
+AP_CONFDIR=$AP_PREFIX/conf
+AP_CONFIG=$AP_CONFDIR/httpd.conf
+
+# Disable the PHP module
+PKG_INSTALL_ROOT=${PKG_INSTALL_ROOT:-'/'}
+chroot $PKG_INSTALL_ROOT \
+    $AP_BINDIR/apxs -S LIBEXECDIR=$AP_LIBEXEC -e -A -n php4 libphp4.so
+
+cat <<END
+
+NOTICE: mod_php4 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/php4/trunk/files/CSWmodphp4.space
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWmodphp4.space	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWmodphp4.space	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1 @@
+$BASEDIR 4

Modified: csw/mgar/pkg/php4/trunk/files/CSWphp4.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4.postinstall	2009-05-14 17:11:32 UTC (rev 4846)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -18,114 +18,18 @@
     if [ "$extdir" != "$curextdir" ]; then
         echo "updating extension_dir..."
         perl -i.bak -plne "s,no-debug-non-zts-[0-9]+,$extdir," $PHP_INI
-
-        old_list="`sed -ne 's/^extension=\(.*\)\.so/\1/p' $PHP_INI`"
-        new_pkgs=''
-        non_pkgs=''
-        for ext in `echo ${old_list}`; do
-            if grep "extension=$ext" $PHP_INI.CSW; then
-                new_pkgs="${new_pkgs} php4_${ext}"
-            else
-                non_pkgs="${non_pkgs} ${ext}"
-            fi
-        done
-
-        cat << _EOT_
-
-******************************************************************************
-* NOTICE: The existing php.ini file is from an older version of PHP4.  
-*
-* *************  PLEASE READ  *************
-*
-* Starting with php4-5.2.9,REV=2009.04.29 the CSW php5 suite has been 
-* broken out into seperate packages for the modules.
-*
-_EOT_
-if [ -n "${new_pkgs}" ]; then
-    cat << _EOT_
-* *************  PLEASE READ  *************
-*
-* Your existing config contains the following extensions
-* that now have become external packages:
-*
-_EOT_
-cnt=1
-for name in `echo ${new_pkgs}`; do
-    if [ ${cnt} -eq 1 ]; then
-        echo "* \c"
     fi
-    if [ `expr ${cnt} % 4` -ne 0 ]; then
-        echo "${name} \c"
-        cnt=`expr ${cnt} + 1`
-    else
-        echo "${name}"
-        cnt=1
-    fi
-done
-if [ ${cnt} -ne 1 ]; then
-    echo
-fi
+
 cat << _EOT_
-*
-* to keep the same functionality as the original install 
-* you will need to install them using pkg-get 
-*
-* If you have issues with missing extensions, Please check
-* the catalog for the missing extension before filing a bug report
-*
-_EOT_
-else
-    cat << _EOT_
-* *************  PLEASE READ  *************
-*
-* Your existing config does not contain any shared extensions
-* that are now packages.  If you have issues with missing extensions, 
-* Please Check the catalog for the missing extension before
-* filing a bug report.
-*
-_EOT_
-fi
-if [ -n "${non_pkgs}" ]; then
-    cat << _EOT_
-* *************  PLEASE READ  *************
-* 
-* Your existing config contains the following extensions
-* that are not part of CSW build: 
-*
-_EOT_
-cnt=1
-for name in `echo ${non_pkgs}`; do
-    if [ ${cnt} -eq 1 ]; then
-        echo "* \c"
-    fi
-    if [ `expr ${cnt} % 4` -ne 0 ]; then
-        echo "${name} \c"
-        cnt=`expr ${cnt} + 1`
-    else
-        echo "${name}"
-        cnt=1
-    fi
-done
-if [ ${cnt} -ne 1 ]; then
-    echo
-fi
-cat << _EOT_
-* 
-* Please verify they are still working after this upgrade.
-*
-_EOT_
-fi
-cat << _EOT_
-******************************************************************************
 
 ******************************************************************************
-* WARNING: Short open tag support in this release of CSWphp4 is DISABLED by
+* WARNING: Short open tag support in this release of php4 is DISABLED by
 * default.  If you rely on short open tag (<? vs <?php) behavior, set
 * short_open_tag to On in php.ini right away.
 ******************************************************************************
+
 _EOT_
-    fi
-fi
+
 if [ ! -d ${extdir} ]; then
     mkdir -p ${extdir}
     for dir in `${PHP_BIN}/php -i |grep extension_dir |\

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4bcmath.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4bcmath.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4bcmath.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=bcmath
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4bcmath.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4bcmath.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4bcmath.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=bcmath
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4bz2.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4bz2.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4bz2.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=bz2
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4bz2.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4bz2.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4bz2.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=bz2
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4calendar.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4calendar.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4calendar.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=calendar
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4calendar.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4calendar.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4calendar.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=calendar
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4curl.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4curl.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4curl.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=curl
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4curl.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4curl.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4curl.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=curl
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4dba.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4dba.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4dba.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=dba
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4dba.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4dba.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4dba.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=dba
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4domxml.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4domxml.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4domxml.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=domxml
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4domxml.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4domxml.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4domxml.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=domxml
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4gd.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4gd.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4gd.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=gd
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4gd.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4gd.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4gd.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=gd
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4gettext.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4gettext.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4gettext.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=gettext
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4gettext.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4gettext.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4gettext.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=gettext
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4gmp.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4gmp.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4gmp.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=gmp
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4gmp.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4gmp.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4gmp.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=gmp
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4iconv.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4iconv.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4iconv.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=iconv
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4iconv.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4iconv.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4iconv.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=iconv
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4imap.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4imap.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4imap.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=imap
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4imap.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4imap.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4imap.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=imap
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4ldap.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4ldap.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4ldap.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=ldap
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4ldap.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4ldap.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4ldap.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=ldap
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4mbstring.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4mbstring.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4mbstring.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=mbstring
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4mbstring.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4mbstring.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4mbstring.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=mbstring
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4mcal.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4mcal.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4mcal.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=mcal
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4mcal.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4mcal.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4mcal.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=mcal
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4mssql.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4mssql.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4mssql.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=mssql
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4mssql.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4mssql.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4mssql.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=mssql
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4mysql.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4mysql.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4mysql.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=mysql
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4mysql.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4mysql.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4mysql.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=mysql
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4ncurses.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4ncurses.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4ncurses.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=ncurses
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4ncurses.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4ncurses.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4ncurses.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=ncurses
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4odbc.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4odbc.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4odbc.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=odbc
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4odbc.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4odbc.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4odbc.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=odbc
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4openssl.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4openssl.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4openssl.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=openssl
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4openssl.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4openssl.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4openssl.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=openssl
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4pgsql.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4pgsql.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4pgsql.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=pgsql
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4pgsql.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4pgsql.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4pgsql.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=pgsql
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4zlib.postinstall
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4zlib.postinstall	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4zlib.postinstall	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,35 @@
+#!/bin/sh
+MODULE_NAME=zlib
+PHP_INI=/opt/csw/php4/lib/php.ini
+
+echo "[===> Running Post Install <===]"
+echo "   ===> Enabling ${MODULE_NAME} extension"
+if grep 'CSW Extensions' ${PHP_INI} >/dev/null 2>&1; then
+/bin/true
+else
+cat << _EOF_
+******************************************************************************
+* WARNING: Could not enable Extension "${MODULE_NAME}"
+* You will need to enable it by hand as follows:
+*
+* open ${PHP_INI} in your favorite text editor
+* Add the following line to the file, save, and restart your web server
+* extension=${MODULE_NAME}.so
+******************************************************************************
+_EOF_
+exit 0
+fi
+if grep "extension=${MODULE_NAME}.so" ${PHP_INI} >/dev/null 2>&1; then
+perl -i -plne "s|;extension=${MODULE_NAME}.so|extension=${MODULE_NAME}.so|" ${PHP_INI}
+else
+perl -i -pe "s|.*CSW Extensions|; CSW Extensions\nextension=${MODULE_NAME}.so|" ${PHP_INI}
+fi
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Enabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the install
+******************************************************************************
+_EOF_
+exit 0

Added: csw/mgar/pkg/php4/trunk/files/CSWphp4zlib.preremove
===================================================================
--- csw/mgar/pkg/php4/trunk/files/CSWphp4zlib.preremove	                        (rev 0)
+++ csw/mgar/pkg/php4/trunk/files/CSWphp4zlib.preremove	2009-05-14 18:26:56 UTC (rev 4847)
@@ -0,0 +1,16 @@
+#!/bin/sh
+MODULE_NAME=zlib
+#PHP_INI=/opt/csw/php4/lib/php.ini
+PHP_INI=php.ini
+echo "[===> Running Pre Remove <===]"
+echo "   ===> Disabling ${MODULE_NAME} extension"
+perl -i -plne "s|extension=${MODULE_NAME}.so|;extension=${MODULE_NAME}.so|" ${PHP_INI}
+cat << _EOF_
+******************************************************************************
+* NOTICE: Successfully Disabled Extension "${MODULE_NAME}"
+* in ${PHP_INI}
+*
+* You will need to restart your web server to finish the removal
+******************************************************************************
+_EOF_
+exit 0


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