[csw-devel] SF.net SVN: gar:[5092] csw/mgar/pkg/mediawiki/trunk

valholla at users.sourceforge.net valholla at users.sourceforge.net
Thu May 28 22:05:14 CEST 2009


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

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

Modified Paths:
--------------
    csw/mgar/pkg/mediawiki/trunk/Makefile
    csw/mgar/pkg/mediawiki/trunk/checksums
    csw/mgar/pkg/mediawiki/trunk/files/CSWmediawiki.postinstall
    csw/mgar/pkg/mediawiki/trunk/files/CSWmediawiki.preremove

Added Paths:
-----------
    csw/mgar/pkg/mediawiki/trunk/files/README.CSW

Removed Paths:
-------------
    csw/mgar/pkg/mediawiki/trunk/files/CSWmediawiki-math.postinstall

Property Changed:
----------------
    csw/mgar/pkg/mediawiki/trunk/


Property changes on: csw/mgar/pkg/mediawiki/trunk
___________________________________________________________________
Modified: svn:externals
   - gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2

   + gar https://gar.svn.sourceforge.net/svnroot/gar/csw/mgar/gar/v2-relocate


Modified: csw/mgar/pkg/mediawiki/trunk/Makefile
===================================================================
--- csw/mgar/pkg/mediawiki/trunk/Makefile	2009-05-28 19:27:12 UTC (rev 5091)
+++ csw/mgar/pkg/mediawiki/trunk/Makefile	2009-05-28 20:05:14 UTC (rev 5092)
@@ -12,41 +12,39 @@
 
 MASTER_SITES = http://download.wikimedia.org/mediawiki/$(RELVER)/
 DISTFILES  = $(GARNAME)-$(GARVERSION).tar.gz
-DISTFILES += CSWmediawiki-math.postinstall
-DISTFILES += CSWmediawiki.postinstall
-DISTFILES += CSWmediawiki.preremove
+DISTFILES += CSWmediawiki.postinstall CSWmediawiki.preremove 
+DISTFILES += httpd-mediawiki.conf.CSW README.CSW
 
+ALLOW_RELOCATE = 1
+RELOCATE_PREFIX = /opt/csw/share
 
-PACKAGES = CSWmediawiki CSWmediawiki-math
 CATALOGNAME_CSWmediawiki = mediawiki
 SPKG_DESC_CSWmediawiki = $(DESCRIPTION)
-CATALOGNAME_CSWmediawiki-math = mediawiki_math
-SPKG_DESC_CSWmediawiki-math = LaTeX compatable Math plugin for MediaWiki
 
-REQUIRED_PKGS_CSWmediawiki  = CSWphp5
-REQUIRED_PKGS_CSWmediawiki-math  = CSWphp5 CSWmediawiki CSWtetex
+REQUIRED_PKGS_CSWmediawiki  = CSWphp5 CSWapache2c
 
-PKGFILES_CSWmediawiki-math = .*/mediawiki/math.*
-
 # We define upstream file regex so we can be notifed of 
 # new upstream software release
 UFILES_REGEX = $(GARNAME)-(\d+(?:\.\d+)*).tar.gz
 
-GARCOMPILER = GNU
 ARCHALL_CSWmediawiki = 1
+
 CONFIGURE_SCRIPTS =
-BUILD_SCRIPTS = math
+BUILD_SCRIPTS = 
 INSTALL_SCRIPTS = custom
 TEST_SCRIPTS = skip
 
-build-math:
-	cd $(WORKSRC)/math; $(BUILD_ENV) gmake
+PATH = /opt/csw/php5/bin:$(PATH)
+install-custom:
+	@ginstall -d $(DESTDIR)$(RELOCATE_PREFIX)/mediawiki
+	@cd $(WORKSRC); \
+		/usr/bin/pax -rw -v ./ $(abspath $(DESTDIR)$(RELOCATE_PREFIX)/mediawiki)
+	@ginstall -D $(DOWNLOADDIR)/README.CSW \
+		$(DESTDIR)$(RELOCATE_PREFIX)/mediawiki/documentation/README.CSW
+	@ginstall -D $(DOWNLOADDIR)/httpd-mediawiki.conf.CSW \
+		$(DESTDIR)$(RELOCATE_PREFIX)/mediawiki/contrib/httpd-mediawiki.conf.CSW
 	@$(MAKECOOKIE)
 
-install-custom:
-	@ginstall -d $(INSTALLISADIR)$(prefix)/mediawiki
-	@(cd $(WORKSRC); /usr/bin/pax -rw -v ./ $(abspath $(INSTALLISADIR)$(prefix)/mediawiki))
-
 test-skip:
 	@$(MAKECOOKIE)
 

Modified: csw/mgar/pkg/mediawiki/trunk/checksums
===================================================================
--- csw/mgar/pkg/mediawiki/trunk/checksums	2009-05-28 19:27:12 UTC (rev 5091)
+++ csw/mgar/pkg/mediawiki/trunk/checksums	2009-05-28 20:05:14 UTC (rev 5092)
@@ -1,4 +1,5 @@
-ef5ecd4900918e5bf67929a94a793f22  download/CSWmediawiki-math.postinstall
-7643276ab2527aa36dbd6c99c1493f73  download/CSWmediawiki.postinstall
-03b5e4fe1408f1fe2a1799b71df504af  download/CSWmediawiki.preremove
+33cd390e3999854f72a74c4130868326  download/CSWmediawiki.postinstall
+d10e35018669fe5531aac76f506110de  download/CSWmediawiki.preremove
+c0c26fcbbe8f69b3e8c139dcc24e6e5a  download/README.CSW
+205416295b92698424d1d16cc0cde93a  download/httpd-mediawiki.conf.CSW
 36bfd924e92b61a6f5fe70c6bc8e5aac  download/mediawiki-1.14.0.tar.gz

Deleted: csw/mgar/pkg/mediawiki/trunk/files/CSWmediawiki-math.postinstall
===================================================================
--- csw/mgar/pkg/mediawiki/trunk/files/CSWmediawiki-math.postinstall	2009-05-28 19:27:12 UTC (rev 5091)
+++ csw/mgar/pkg/mediawiki/trunk/files/CSWmediawiki-math.postinstall	2009-05-28 20:05:14 UTC (rev 5092)
@@ -1,21 +0,0 @@
-#!/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
-
-cat << _EOF_
-******************************************************************************
-*
-* DO NOT FORGET:
-* You will need to set \$wgUseTeX to true in your LocalSettings.php
-* 
-******************************************************************************
-_EOF_
-
-exit 0
-

Modified: csw/mgar/pkg/mediawiki/trunk/files/CSWmediawiki.postinstall
===================================================================
--- csw/mgar/pkg/mediawiki/trunk/files/CSWmediawiki.postinstall	2009-05-28 19:27:12 UTC (rev 5091)
+++ csw/mgar/pkg/mediawiki/trunk/files/CSWmediawiki.postinstall	2009-05-28 20:05:14 UTC (rev 5092)
@@ -1,27 +1,59 @@
 #!/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
+WIKIDIR=${PKG_INST_ROOT}${BASEDIR}/mediawiki
+DOCDIR=${WIKIDIR}/documentation
+CONTRIBDIR=${WIKIDIR}/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}`"
 
-AP2_SERVERNAME=`/bin/sed -ne 's/^[\s]*ServerName \(.*\)/\1/p' ${AP2_CONFIG}`
-AP2_DOCROOT=`/bin/sed -ne 's/^[\s]*DocumentRoot "\(.*\)"/\1/p' ${AP2_CONFIG}`
-/bin/ln -s /opt/csw/mediawiki ${AP2_DOCROOT}/wiki
+if [ -z "${AP2USR}" ]; then
+    AP2USR=nobody
+fi
+if [ -z "${AP2GRP}" ]; then
+    AP2GRP=nobody
+fi
 
-cat << _EOF_
-******************************************************************************
-* NOTICE: Successfully Enabled MediaWiki
-* in ${AP2_CONFIG}
+perl -i -pne "s|_MEDIAWIKIDIR_|${WIKIDIR}|" ${CONTRIBDIR}/httpd-mediawiki.conf.CSW
+cp ${CONTRIBDIR}/httpd-mediawiki.conf.CSW ${AP2EXTRADIR}/httpd-mediawiki.conf.CSW
+
+if [ -f "${AP2EXTRADIR}/httpd-mediawiki.conf" ]; then
+    echo "***** ${AP2EXTRADIR}/httpd-mediawiki.conf Found *****"
+    echo "***** Preserving Existing Config *****"
+else
+    cp ${AP2EXTRADIR}/httpd-mediawiki.conf.CSW ${AP2EXTRADIR}/httpd-mediawiki.conf
+fi
+
+if [ -n "`grep 'Include etc/extra/httpd-mediawiki.conf' ${AP2CONF}`" ]; then
+      perl -i -pne 's|#(Include etc/extra/httpd-mediawiki.conf)|$1|' ${AP2CONF}
+else
+      cat << END >>${AP2CONF}
+
+Include etc/extra/httpd-mediawiki.conf
+
+END
+fi
+
+cat << _EOM_
+*********************************************************************
+*    NOTICE:
+*          MediaWiki has been enabled in ${AP2CONF}
+*          You will need to restart your web server
+*          To finish the install.
+*********************************************************************
+
+*********************************************************************
+*   NOTICE:
+*         Before you can use MediaWiki you need to configure it.
 *
-* You will need to point your web browser to
-* http://${AP2_SERVERNAME}/wiki/config
-* To configure your Wiki
-******************************************************************************
-_EOF_
+*         For instructions on configuring Please Read
+*         ${DOCDIR}/README.CSW
+*
+*********************************************************************
 
+_EOM_
+
+chown -R ${AP2USR}:${AP2GRP} ${WIKIDIR}
 exit 0
 

Modified: csw/mgar/pkg/mediawiki/trunk/files/CSWmediawiki.preremove
===================================================================
--- csw/mgar/pkg/mediawiki/trunk/files/CSWmediawiki.preremove	2009-05-28 19:27:12 UTC (rev 5091)
+++ csw/mgar/pkg/mediawiki/trunk/files/CSWmediawiki.preremove	2009-05-28 20:05:14 UTC (rev 5092)
@@ -1,15 +1,20 @@
 #!/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
+PATH=/usr/bin:/usr/sbin
 
-AP2_DOCROOT=`/bin/sed -ne 's/^[\s]*DocumentRoot "\(.*\)"/\1/p' ${AP2_CONFIG}`
-/bin/rm -f ${AP2_DOCROOT}/wiki
+AP2CONF=/opt/csw/apache2/etc/httpd.conf
 
+perl -i -pne 's|(?<!#)(Include etc/extra/httpd-mediawiki.conf)|#$1|' ${AP2CONF}
+
+cat << _EOM_
+
+*********************************************************************
+*    NOTICE:
+*          MediaWiki has been disabled in ${AP2CONF}
+*          You will need to restart your web server
+*          To finish the removal.
+*********************************************************************
+
+_EOM_
+
 exit 0
-

Added: csw/mgar/pkg/mediawiki/trunk/files/README.CSW
===================================================================
--- csw/mgar/pkg/mediawiki/trunk/files/README.CSW	                        (rev 0)
+++ csw/mgar/pkg/mediawiki/trunk/files/README.CSW	2009-05-28 20:05:14 UTC (rev 5092)
@@ -0,0 +1,27 @@
+README.CSW
+==========
+
+Configuration
+=============
+1) Setup the MediaWiki Database
+    MediaWiki Requires Either:
+        * MySQL (http://www.mysql.com)
+        * PostgreSQL (http://www.postgresql.org)
+
+    Using MySQL
+    ===========
+    # pkg-get -i mysql5rt mysql5client mysql5 php5_mysqli
+    **** NOTE ****
+    You will need an account with superuser privileges
+    to create the database.
+    **************
+
+    Using PostgreSQL
+    ================
+    # pkg-get -i postgresql php5_pgsql
+
+2) Point your web browser to
+   http://mydomain/mediawiki/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