[csw-devel] SF.net SVN: gar:[11539] csw/mgar/gar/v2/bin/ap2mod_build_scripts

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Wed Nov 10 02:16:00 CET 2010


Revision: 11539
          http://gar.svn.sourceforge.net/gar/?rev=11539&view=rev
Author:   bdwalton
Date:     2010-11-10 01:16:00 +0000 (Wed, 10 Nov 2010)

Log Message:
-----------
gar/v2: streamline ap2mod_build_scripts generated script outputs

Modified Paths:
--------------
    csw/mgar/gar/v2/bin/ap2mod_build_scripts

Modified: csw/mgar/gar/v2/bin/ap2mod_build_scripts
===================================================================
--- csw/mgar/gar/v2/bin/ap2mod_build_scripts	2010-11-09 15:46:47 UTC (rev 11538)
+++ csw/mgar/gar/v2/bin/ap2mod_build_scripts	2010-11-10 01:16:00 UTC (rev 11539)
@@ -13,9 +13,17 @@
 	modname=$(echo $modfile | sed 's/mod_//; s/\.so$//')
 	ap2modfile=$AP2MODS/$modname
 	cat <<EOF > $ap2modfile
-!install
+
 PIR=\${PKG_INSTALL_ROOT:-'/'}
+AP2_PREFIX=/opt/csw/apache2
+AP2_BINDIR=\$AP2_PREFIX/sbin
+AP2_LIBEXEC=\$AP2_PREFIX/libexec
+AP2_CONFDIR=\$AP2_PREFIX/etc
+AP2_CONFIG=\$AP2_CONFDIR/httpd.conf
+AP2_APXS=\$AP2_BINDIR/apxs
 
+if [ "\$1" = install ]; then
+
 touch \$PIR/$ap2modfile
 
 # Source csw.conf, if it exists
@@ -26,13 +34,6 @@
   . \$PIR/etc/opt/csw/csw.conf
 fi
 
-AP2_PREFIX=/opt/csw/apache2
-AP2_BINDIR=\$AP2_PREFIX/sbin
-AP2_LIBEXEC=\$AP2_PREFIX/libexec
-AP2_CONFDIR=\$AP2_PREFIX/etc
-AP2_CONFIG=\$AP2_CONFDIR/httpd.conf
-AP2_APXS=\$AP2_BINDIR/apxs
-
 # Modules will be enabled by default, but a global kill switch
 # is checked , followed by a module specific value.  Thus,
 # either ap2_enable_modules or ap2_enable_suexec (for example)
@@ -57,21 +58,14 @@
     chroot \$PIR \$AP2_APXS -e \$enmod -n $modname $modfile
 fi
 
-!remove
-PIR=\${PKG_INSTALL_ROOT:-'/'}
+else
 
 rm \$PIR/$ap2modfile
 
-AP2_PREFIX=/opt/csw/apache2
-AP2_BINDIR=\$AP2_PREFIX/sbin
-AP2_LIBEXEC=\$AP2_PREFIX/libexec
-AP2_CONFDIR=\$AP2_PREFIX/etc
-AP2_CONFIG=\$AP2_CONFDIR/httpd.conf
-AP2_APXS=\$AP2_BINDIR/apxs
-
 if [ -f "\$PIR/\$AP2_CONFIG" -a -x "\$PIR/\$AP2_APXS" ]; then
-  chroot \$PIR \$APXS -e -A -n $modname $modfile
+  chroot \$PIR \$AP2_APXS -e -A -n $modname $modfile
 fi
+fi
 EOF
     done
 done


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