[csw-devel] SF.net SVN: gar:[5015] csw/mgar/pkg/drupal/trunk

valholla at users.sourceforge.net valholla at users.sourceforge.net
Fri May 22 20:37:36 CEST 2009


Revision: 5015
          http://gar.svn.sourceforge.net/gar/?rev=5015&view=rev
Author:   valholla
Date:     2009-05-22 18:37:36 +0000 (Fri, 22 May 2009)

Log Message:
-----------
release ready checkin

Modified Paths:
--------------
    csw/mgar/pkg/drupal/trunk/Makefile
    csw/mgar/pkg/drupal/trunk/checksums
    csw/mgar/pkg/drupal/trunk/files/README.CSW

Modified: csw/mgar/pkg/drupal/trunk/Makefile
===================================================================
--- csw/mgar/pkg/drupal/trunk/Makefile	2009-05-22 18:32:06 UTC (rev 5014)
+++ csw/mgar/pkg/drupal/trunk/Makefile	2009-05-22 18:37:36 UTC (rev 5015)
@@ -61,21 +61,91 @@
 
 PATH=/usr/bin:/usr/sbin
 
+DRUPAL_DIR=$${PKG_INST_ROOT}$${BASEDIR}/$(GARNAME)/$(GARVERSION)
+SETTINGS_DIR=$${DRUPAL_DIR}/sites/default
+CONTRIB_DIR=$${DRUPAL_DIR}/contrib
+AP2CONF=/opt/csw/apache2/etc/httpd.conf
+AP2EXTRADIR=/opt/csw/apache2/etc/extra
+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
+
+if [ -f $${SETTINGS_DIR}/settings.php ]; then
+	echo "***** $${SETTINGS_DIR}/settings.php Found ***** "
+	echo "***** Preserving Existing Config ***** "
+else
+	cp $${SETTINGS_DIR}/default.settings.php $${SETTINGS_DIR}/settings.php
+	chmod o+w $${SETTINGS_DIR}/settings.php
+	chmod o+w $${SETTINGS_DIR}
+fi
+perl -i -pne "s|_DRUPALDIR_|$${DRUPAL_DIR}|" $${CONTRIB_DIR}/httpd-drupal.conf.CSW
+cp $${CONTRIB_DIR}/httpd-drupal.conf.CSW $${AP2EXTRADIR}/httpd-drupal.conf.CSW
+
+if [ -f $${AP2EXTRADIR}/httpd-drupal.conf ]; then
+	echo "***** $${AP2EXTRADIR}/httpd-drupal.conf Found *****"
+	echo "***** Preserving Existing Config *****"
+else
+	cp $${AP2EXTRADIR}/httpd-drupal.conf.CSW $${AP2EXTRADIR}/httpd-drupal.conf
+fi
+
+if [ -n "`grep 'Include etc/extra/httpd-drupal.conf' $${AP2CONF}`" ]; then
+      perl -i -pne 's|#(Include etc/extra/httpd-drupal.conf)|$$1|' $${AP2CONF}
+else
+      cat << END >>$${AP2CONF}
+
+Include etc/extra/httpd-drupal.conf
+
+END
+fi
 mkdir -p /var/opt/csw/drupal/upload
 chmod o+w /var/opt/csw/drupal/upload
+chown -R $${AP2USR}:$${AP2GRP} /var/opt/csw/drupal/upload
+chown -R $${AP2USR}:$${AP2GRP} $${DRUPAL_DIR}
 
 cat << _EOM_
+*********************************************************************
+*    NOTICE:
+*          drupal has been enabled in $${AP2CONF}
+*          You will need to restart your web server
+*          To finish the install.
+*********************************************************************
 
 *********************************************************************
-*    NOTICE:
-*	Before you can use druppal you need to configure it.
-*	
-*	For instructions on configuring Please Read
-*   $${PKG_INST_ROOT}$${BASEDIR}/$(GARNAME)/$(GARVERSION)/documentation/README.CSW
+*   NOTICE:
+*         Before you can use druppal you need to configure it.
 *
+*         For instructions on configuring Please Read
+*         $${PKG_INST_ROOT}$${BASEDIR}/$(GARNAME)/$(GARVERSION)/documentation/README.CSW
+*
 *********************************************************************
 
 _EOM_
 endef
 
+define CSWdrupal_preremove
+#!/bin/sh
+
+PATH=/usr/bin:/usr/sbin
+
+AP2CONF=/opt/csw/apache2/etc/httpd.conf
+
+perl -i -pne 's|(?<!#)(Include etc/extra/httpd-drupal.conf)|#$$1|' $${AP2CONF}
+
+cat << _EOM_
+
+*********************************************************************
+*    NOTICE:
+*          drupal has been disabled in $${AP2CONF}
+*          You will need to restart your web server
+*          To finish the removal.
+*********************************************************************
+
+_EOM_
+endef
+
 include gar/category.mk

Modified: csw/mgar/pkg/drupal/trunk/checksums
===================================================================
--- csw/mgar/pkg/drupal/trunk/checksums	2009-05-22 18:32:06 UTC (rev 5014)
+++ csw/mgar/pkg/drupal/trunk/checksums	2009-05-22 18:37:36 UTC (rev 5015)
@@ -1,4 +1,4 @@
-35825d0cc6e5c7792baa295d73b2ec19  download/README.CSW
+53fd0059901ddea2bf62f920ee8a6cf6  download/README.CSW
 82e2517f175320cffe20997333b3a33a  download/drupal-6.12.tar.gz
 26a7b490bfe0b52a9ff85880dd3aede1  download/httpd-drupal.conf.CSW
 827f7d5f390a53577fc11ac17ad66651  download/uploaddir.diff

Modified: csw/mgar/pkg/drupal/trunk/files/README.CSW
===================================================================
--- csw/mgar/pkg/drupal/trunk/files/README.CSW	2009-05-22 18:32:06 UTC (rev 5014)
+++ csw/mgar/pkg/drupal/trunk/files/README.CSW	2009-05-22 18:37:36 UTC (rev 5015)
@@ -3,26 +3,10 @@
 
 Configuration
 =============
-1) Create the configuration file and set permissions
-    a) cp drupal/6.12/sites/default/default.settings.php \
-            drupal/6.12/sites/default/settings.php
-    b) chmod o+w drupal/6.12/sites/default/settings.php
-    c) chmod o+w drupal/6.12/sites/default
-    d) chown -R nobody:nobody drupal 
-        # Replace nobody:nobody with Apache's User:Group
-    e) chown -R nobody:nobody /var/opt/csw/drupal
-
-2) Setup the Drupal Database
+1) Setup the Drupal Database
     See Below
 
-3) Setup your webserver
-    a) cp drupal/6.12/contrib/httpd-drupal.conf.CSW \
-            /opt/csw/apache2/etc/extra/httpd-drupal.conf
-    b) echo 'Include etc/extra/httpd-drupal.conf' \
-            >>/opt/csw/apache2/etc/httpd.conf
-    c) restart your webserver
-
-4) Point Your Web browser to
+2) Point Your Web browser to
    http://mydomain/drupal/index.php
 
 and follow the onscreen instructions


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