[csw-devel] SF.net SVN: gar:[5097] csw/mgar/pkg/squirrelmail/trunk

valholla at users.sourceforge.net valholla at users.sourceforge.net
Thu May 28 22:55:23 CEST 2009


Revision: 5097
          http://gar.svn.sourceforge.net/gar/?rev=5097&view=rev
Author:   valholla
Date:     2009-05-28 20:55:14 +0000 (Thu, 28 May 2009)

Log Message:
-----------
checkin

Modified Paths:
--------------
    csw/mgar/pkg/squirrelmail/trunk/Makefile

Added Paths:
-----------
    csw/mgar/pkg/squirrelmail/trunk/files/CSWsquirrelmail.postinstall
    csw/mgar/pkg/squirrelmail/trunk/files/CSWsquirrelmail.preremove
    csw/mgar/pkg/squirrelmail/trunk/files/httpd-squirrelmail.conf.CSW

Modified: csw/mgar/pkg/squirrelmail/trunk/Makefile
===================================================================
--- csw/mgar/pkg/squirrelmail/trunk/Makefile	2009-05-28 20:51:27 UTC (rev 5096)
+++ csw/mgar/pkg/squirrelmail/trunk/Makefile	2009-05-28 20:55:14 UTC (rev 5097)
@@ -28,11 +28,22 @@
 UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.bz2
 
 CONFIGURE_SCRIPTS = cswize
+BUILD_SCRIPTS = 
+INSTALL_SCRIPTS = custom
+TEST_SCRIPTS =
 
+ALLOW_RELOCATE = 1
+RELOCATE_PREFIX = /opt/csw/share
 configure-cswize:
-	@(perl -i -pe 's|/var/local|/opt/csw|' $(WORKSRC)/config/config_default.php)
+	@(perl -i -pe 's|/var/local|/var/opt/csw|' \
+		$(WORKSRC)/config/config_default.php)
 	@(perl -i -pe 's|/usr/sbin/sendmail|/usr/lib/sendmail|' \
 		        $(WORKSRC)/config/config_default.php)
 	@$(MAKECOOKIE)
 
+install-custom:
+	ginstall -d $(DESTDIR)$(RELOCATE_PREFIX)/$(GARNAME)
+	cd $(WORKSRC); /usr/bin/pax -rw -v * $(DESTDIR)$(RELOCATE_PREFIX)/$(GARNAME)
+	@$(MAKECOOKIE)
+	
 include gar/category.mk

Added: csw/mgar/pkg/squirrelmail/trunk/files/CSWsquirrelmail.postinstall
===================================================================
--- csw/mgar/pkg/squirrelmail/trunk/files/CSWsquirrelmail.postinstall	                        (rev 0)
+++ csw/mgar/pkg/squirrelmail/trunk/files/CSWsquirrelmail.postinstall	2009-05-28 20:55:14 UTC (rev 5097)
@@ -0,0 +1,63 @@
+#!/bin/sh
+
+SQUIRRELMAILDIR=${PKG_INST_ROOT}${BASEDIR}/squirrelmail
+CONTRIBDIR=${SQUIRRELMAILDIR}/contrib
+AP2EXTRADIR=/opt/csw/apache2/etc/extra
+AP2CONF=/opt/csw/apache2/etc/httpd.conf
+AP2USR="`sed -ne 's/^User \(.*\)/\1/p' ${AP2CONF}`"
+AP2GRP="`sed -ne 's/^Group \(.*\)/\1/p' ${AP2CONF}`"
+
+if [ -z "${AP2USR}" ]; then
+    AP2USR=nobody
+fi
+if [ -z "${AP2GRP}" ]; then
+    AP2GRP=nobody
+fi
+
+perl -i -pne "s|_SQUIRRELMAILDIR_|${SQUIRRELMAILDIR}|" ${CONTRIBDIR}/httpd-squirrelmail.conf.CSW
+cp ${CONTRIBDIR}/httpd-squirrelmail.conf.CSW ${AP2EXTRADIR}/httpd-squirrelmail.conf.CSW
+
+if [ -f "${AP2EXTRADIR}/httpd-squirrelmail.conf" ]; then
+    echo "***** ${AP2EXTRADIR}/httpd-squirrelmail.conf Found *****"
+    echo "***** Preserving Existing Config *****"
+else
+    cp ${AP2EXTRADIR}/httpd-squirrelmail.conf.CSW ${AP2EXTRADIR}/httpd-squirrelmail.conf
+fi
+
+if [ -n "`grep 'Include etc/extra/httpd-squirrelmail.conf' ${AP2CONF}`" ]; then
+      perl -i -pne 's|#(Include etc/extra/httpd-squirrelmail.conf)|$1|' ${AP2CONF}
+else
+      cat << END >>${AP2CONF}
+
+Include etc/extra/httpd-squirrelmail.conf
+
+END
+fi
+
+cat << _EOM_
+*********************************************************************
+*    NOTICE:
+*          SquirrelMail has been enabled in ${AP2CONF}
+*          You will need to restart your web server
+*          To finish the install.
+*********************************************************************
+
+*********************************************************************
+*   NOTICE:
+*         Before you can use SquirrelMail you need to configure it.
+*
+*         Run ${SQUIRRELMAILDIR}/config/conf.pl
+*
+*********************************************************************
+
+_EOM_
+
+mkdir -p /var/opt/csw/squirrelmail/data
+mkdir -p /var/opt/csw/squirrelmail/attach
+chmod 0730 /var/opt/csw/squirrelmail/attach
+chown -R ${AP2USR}:${AP2GRP} ${SQUIRRELMAILDIR}
+chown -R ${AP2USR}:${AP2GRP} /var/opt/csw/squirrelmail/data
+chown -R root:${AP2GRP} /var/opt/csw/squirrelmail/attach
+
+exit 0
+

Added: csw/mgar/pkg/squirrelmail/trunk/files/CSWsquirrelmail.preremove
===================================================================
--- csw/mgar/pkg/squirrelmail/trunk/files/CSWsquirrelmail.preremove	                        (rev 0)
+++ csw/mgar/pkg/squirrelmail/trunk/files/CSWsquirrelmail.preremove	2009-05-28 20:55:14 UTC (rev 5097)
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+PATH=/usr/bin:/usr/sbin
+
+AP2CONF=/opt/csw/apache2/etc/httpd.conf
+
+perl -i -pne 's|(?<!#)(Include etc/extra/httpd-squirrelmail.conf)|#$1|' ${AP2CONF}
+
+cat << _EOM_
+
+*********************************************************************
+*    NOTICE:
+*          SquirrelMail has been disabled in ${AP2CONF}
+*          You will need to restart your web server
+*          To finish the removal.
+*********************************************************************
+
+_EOM_
+
+exit 0

Added: csw/mgar/pkg/squirrelmail/trunk/files/httpd-squirrelmail.conf.CSW
===================================================================
--- csw/mgar/pkg/squirrelmail/trunk/files/httpd-squirrelmail.conf.CSW	                        (rev 0)
+++ csw/mgar/pkg/squirrelmail/trunk/files/httpd-squirrelmail.conf.CSW	2009-05-28 20:55:14 UTC (rev 5097)
@@ -0,0 +1,14 @@
+Alias /squirrelmail "_SQUIRRELMAILDIR_"
+
+<Directory "_SQUIRRELMAILDIR_">
+    AllowOverride None
+    <Limit GET POST OPTIONS>
+        Order allow,deny
+        Allow from all
+    </Limit>
+    <LimitExcept GET POST OPTIONS>
+        Order deny,allow
+        Deny from all
+    </LimitExcept>
+</Directory>
+


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