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

valholla at users.sourceforge.net valholla at users.sourceforge.net
Fri May 22 06:40:51 CEST 2009


Revision: 5007
          http://gar.svn.sourceforge.net/gar/?rev=5007&view=rev
Author:   valholla
Date:     2009-05-22 04:40:51 +0000 (Fri, 22 May 2009)

Log Message:
-----------
various fixes

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

Added Paths:
-----------
    csw/mgar/pkg/drupal/trunk/files/uploaddir.diff

Modified: csw/mgar/pkg/drupal/trunk/Makefile
===================================================================
--- csw/mgar/pkg/drupal/trunk/Makefile	2009-05-21 21:54:46 UTC (rev 5006)
+++ csw/mgar/pkg/drupal/trunk/Makefile	2009-05-22 04:40:51 UTC (rev 5007)
@@ -16,6 +16,7 @@
 DISTFILES  = $(GARNAME)-$(GARVERSION).tar.gz
 DISTFILES += httpd-drupal.conf.CSW
 DISTFILES += README.CSW
+PATCHFILES = uploaddir.diff
 
 PACKAGES = CSWdrupal
 CATALOGNAME_CSWdrupal = drupal
@@ -32,36 +33,24 @@
 CONFIGURE_SCRIPTS = 
 BUILD_SCRIPTS     = 
 INSTALL_SCRIPTS   = custom
+TEST_SCRIPTS = 
 
 REQUIRED_PKGS_CSWdrupal  = CSWapache2c CSWphp5 CSWphp5gd CSWphp5mbstring
 REQUIRED_PKGS_CSWdrupal += CSWphp5session CSWap2modphp5
 
-## There are no tests for this
-TEST_SCRIPTS = skip
+DRUPAL_INST_DIR = $(DESTDIR)$(datadir)/$(GARNAME)/$(GARVERSION)
+DRUPAL_DOCFILES  = CHANGELOG.txt COPYRIGHT.txt INSTALL.mysql.txt
+DRUPAL_DOCFILES += INSTALL.pgsql.txt INSTALL.txt LICENSE.txt
+DRUPAL_DOCFILES += MAINTAINERS.txt UPGRADE.txt
 
-test-skip:
-	@$(MAKECOOKIE)
-
-DRUPAL_BASE_INSTDIR = $(prefix)
-DRUPAL_INST_DIR = $(DRUPAL_BASE_INSTDIR)/$(GARNAME)/$(GARVERSION)
-SETTINGS_DIR=$(DRUPAL_INST_DIR)/sites/default
-
 install-custom:
-	ginstall -d $(DESTDIR)$(DRUPAL_INST_DIR)
-	ginstall -d $(DESTDIR)$(prefix)/apache2/etc/extra
-	ginstall -d $(DESTDIR)$(docdir)/drupal
-	cd $(WORKSRC); /usr/bin/pax -rw -v * $(DESTDIR)$(DRUPAL_INST_DIR)
-	gcp $(DESTDIR)$(SETTINGS_DIR)/default.settings.php $(DESTDIR)$(SETTINGS_DIR)/settings.php.CSW
-	gcp $(DOWNLOADDIR)/httpd-drupal.conf.CSW $(DESTDIR)$(prefix)/apache2/etc/extra
-	gcp $(DOWNLOADDIR)/README.CSW $(DESTDIR)$(docdir)/drupal/
-	gmv $(DESTDIR)$(DRUPAL_BASE_INSTDIR)/$(GARNAME)/$(GARVERSION)/LICENSE.txt $(DESTDIR)$(docdir)/drupal/license
-	gmv $(DESTDIR)$(DRUPAL_BASE_INSTDIR)/$(GARNAME)/$(GARVERSION)/COPYRIGHT.txt $(DESTDIR)$(docdir)/drupal/
-	gmv $(DESTDIR)$(DRUPAL_BASE_INSTDIR)/$(GARNAME)/$(GARVERSION)/CHANGELOG.txt $(DESTDIR)$(docdir)/drupal/
-	gmv $(DESTDIR)$(DRUPAL_BASE_INSTDIR)/$(GARNAME)/$(GARVERSION)/INSTALL.mysql.txt $(DESTDIR)$(docdir)/drupal/
-	gmv $(DESTDIR)$(DRUPAL_BASE_INSTDIR)/$(GARNAME)/$(GARVERSION)/INSTALL.pgsql.txt $(DESTDIR)$(docdir)/drupal/
-	gmv $(DESTDIR)$(DRUPAL_BASE_INSTDIR)/$(GARNAME)/$(GARVERSION)/INSTALL.txt $(DESTDIR)$(docdir)/drupal/
-	gmv $(DESTDIR)$(DRUPAL_BASE_INSTDIR)/$(GARNAME)/$(GARVERSION)/MAINTAINERS.txt $(DESTDIR)$(docdir)/drupal/
-	gmv $(DESTDIR)$(DRUPAL_BASE_INSTDIR)/$(GARNAME)/$(GARVERSION)/UPGRADE.txt $(DESTDIR)$(docdir)/drupal/
+	ginstall -d $(DRUPAL_INST_DIR)/documentation
+	ginstall -d $(DRUPAL_INST_DIR)/contrib
+	cd $(WORKSRC); /usr/bin/pax -rw -v * $(DRUPAL_INST_DIR)
+	gcp $(DOWNLOADDIR)/httpd-drupal.conf.CSW $(DRUPAL_INST_DIR)/contrib
+	gcp $(DOWNLOADDIR)/README.CSW $(DRUPAL_INST_DIR)/documentation
+	for file in $(DRUPAL_DOCFILES); do \
+		gmv $(DRUPAL_INST_DIR)/$${file} $(DRUPAL_INST_DIR)/documentation/; done
 	@$(MAKECOOKIE)
 
 
@@ -70,86 +59,21 @@
 
 PATH=/usr/bin:/usr/sbin
 
-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}`"
+mkdir -p /var/opt/csw/drupal/upload
+chmod o+w /var/opt/csw/drupal/upload
 
-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)/settings.php.CSW $(SETTINGS_DIR)/settings.php
-	chmod o+w $(SETTINGS_DIR)/settings.php
-	chmod o+w $(SETTINGS_DIR)
-fi
-
-perl -i -pne 's|_DRUPALDIR_|$(DRUPAL_INST_DIR)|' $${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
-chown -R $${AP2USR}:$${AP2GRP} $(DRUPAL_BASE_INSTDIR)/$(GARNAME)
 cat << _EOM_
 
 *********************************************************************
 *    NOTICE:
-*          drupal has been enabled in $${AP2CONF}
-*          You will need to restart your web server
-*          To finish the install.
-*********************************************************************
-
-*********************************************************************
-*	You need to install and or configure either
-*   PostgreSQL: pkg-get -i postgresql
-*   MySQL: pkg-get -i mysql5rt mysql5client mysql5
+*	Before you can use druppal you need to configure it.
 *	
 *	For instructions on configuring Please Read
-*   $$PKG_INST_ROOT/opt/csw/share/doc/drupal/README.CSW
+*   $$PKG_INST_ROOT/drupal/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/files/README.CSW
===================================================================
--- csw/mgar/pkg/drupal/trunk/files/README.CSW	2009-05-21 21:54:46 UTC (rev 5006)
+++ csw/mgar/pkg/drupal/trunk/files/README.CSW	2009-05-22 04:40:51 UTC (rev 5007)
@@ -3,12 +3,20 @@
 
 Configuration
 =============
-1) Setup the Drupal Database
-2) Point Your Web browser to
-   http://mydomain/drupal/install.php
-and follow the instructions
+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
 
+3) Point Your Web browser to
+   http://mydomain/drupal/index.php
+and follow the instructions
 
 Setup the Drupal Database
 =========================

Added: csw/mgar/pkg/drupal/trunk/files/uploaddir.diff
===================================================================
--- csw/mgar/pkg/drupal/trunk/files/uploaddir.diff	                        (rev 0)
+++ csw/mgar/pkg/drupal/trunk/files/uploaddir.diff	2009-05-22 04:40:51 UTC (rev 5007)
@@ -0,0 +1,11 @@
+--- drupal-6.12/includes/file.inc.o	2009-05-21 23:10:08.590704147 -0500
++++ drupal-6.12/includes/file.inc	2009-05-21 23:09:48.867918382 -0500
+@@ -961,7 +961,7 @@
+  * @return A string containing the path to Drupal's 'files' directory.
+  */
+ function file_directory_path() {
+-  return variable_get('file_directory_path', conf_path() .'/files');
++  return variable_get('file_directory_path', '/var/opt/csw/drupal/upload');
+ }
+ 
+ /**


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