merged with ideas from bug #37894 as I just knew about this bug after my ideas to...
authorChristian Parpart <trapni@gentoo.org>
Tue, 16 Nov 2004 18:42:04 +0000 (18:42 +0000)
committerChristian Parpart <trapni@gentoo.org>
Tue, 16 Nov 2004 18:42:04 +0000 (18:42 +0000)
www-apps/mediawiki/Manifest
www-apps/mediawiki/files/postinstall-en.txt [new file with mode: 0644]
www-apps/mediawiki/mediawiki-1.3.8.ebuild

index 7598ca4cc322e3b075726b4eb6c72f0a3f53d6da..f741b25e6ba31b7a71e668a31f351ff3a25b0869 100644 (file)
@@ -1,4 +1,5 @@
 MD5 0e201daa491640c742b312e06075cbc5 metadata.xml 225
-MD5 d10719238ae27e8b375ce4cf220238bc mediawiki-1.3.8.ebuild 881
+MD5 61f87c4a500e4e6c57afe31da9dcbd5d mediawiki-1.3.8.ebuild 2900
 MD5 e083e4c4c0297a1a914a1cd669fc4c97 ChangeLog 379
 MD5 f083e5c34cf1201e213e4b2daa3b289a files/digest-mediawiki-1.3.8 68
+MD5 85f32b5fca9afd6479cdcea022c096f2 files/postinstall-en.txt 1731
diff --git a/www-apps/mediawiki/files/postinstall-en.txt b/www-apps/mediawiki/files/postinstall-en.txt
new file mode 100644 (file)
index 0000000..8523661
--- /dev/null
@@ -0,0 +1,51 @@
+
+Completing setup:
+
+To complete installation cd into the MediaWiki install location, but
+make sure to start mysql first with:
+
+$ /etc/init.d/mysql start
+
+$ cd /var/www/localhost/htdocs/mediawiki/
+
+The host directory, localhost, may change depending on your installation.
+
+Then temporarily make the MediaWiki /config directory writable
+to the  user the web server is running as. The quickest way is 
+to make  the directory world writable.  For example:
+
+$ chmod a+w config
+ 
+Then access it, for example:
+
+lynx http://localhost/mediawiki/config/
+ 
+After setup move the newly created LocalSettings.php from the config/
+directory to the main mediawiki directory, for example:
+  
+$ mv config/LocalSettings.php .
+
+    Remember to restore safe permissions to the MediaWiki config/ and
+    LocalSettings.php (which contains clear-text passwords).
+    chmod a-w config
+    chmod ug=r,o=  LocalSettings.php
+    chown root:apache LocalSettings.php
+
+After these steps MediaWiki should be accesable at
+http://localhost/mediawiki/
+ 
+Enabling Optional Features:
+
+If you wish to enable image uploads then you must manually edit the
+LocalSettings.php file to uncomment the \$wgDisableUploads line.  If" 
+MediaWiki was built with the imagemagick USE flag the directory
+permissions are correct, otherwise you must install ImageMagick and" 
+also adjust permissions on the images directory to allow the server
+to write.  For example:
+ 
+$ chown apache:apache /var/www/localhost/htdocs/mediawiki/images
+
+If you wish to enable the math support then you must manually edit" 
+the LocalSettings.php file to uncomment the \$wgUseTeX line.
+Mediawiki must have been built with the tetex USE flag enabled or the
+necessary support executable will not be present.
index c5cc7dbf5e0bfe45040724286ecf9bc720c2a845..36e213ff38d54417252dc3dcf38c65655f224391 100644 (file)
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-apps/mediawiki/mediawiki-1.3.8.ebuild,v 1.1 2004/11/16 17:43:11 trapni Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apps/mediawiki/mediawiki-1.3.8.ebuild,v 1.2 2004/11/16 18:42:04 trapni Exp $
 
 inherit webapp
 
 DESCRIPTION="The MediaWiki wiki web application (as used on wikipedia.org)"
 HOMEPAGE="http://www.mediawiki.org"
 SRC_URI="mirror://sourceforge/wikipedia/${P}.tar.gz"
+RESTRICT="nomirror"
 LICENSE="GPL-2"
 KEYWORDS="~x86"
-IUSE=""
-DEPEND="virtual/php
-               >=dev-db/mysql-4"
+IUSE="imagemagick tetex"
+
+DEPEND="tetex? ( >=dev-lang/ocaml-3.0.6 )"
+
+RDEPEND="virtual/php
+                >=dev-db/mysql-4
+                tetex? ( app-text/tetex )
+                imagemagick? ( media-gfx/imagemagick )"
+
 S=${WORKDIR}/${P}
 
+src_compile() {
+       # Only required if tetex USE flag is set
+       #
+       if use tetex; then
+               einfo "Compiling math support"
+               cd math || die
+               emake || die
+       else
+               einfo "Nothing to compile"
+       fi
+}
+
 src_install() {
        webapp_src_preinst
 
-       dodoc ${S}/docs/*
-       rm -rf "${S}/docs"
+       # copy the app's main files excluding math support and docs
+       local DIRS='config images includes languages languages/wikipedia
+                       maintenance maintenance/archives maintenance/postgresql
+                       stylesheets stylesheets/davinci stylesheets/images
+                       stylesheets/mono stylesheets/monobook
+                       stylesheets/myskin templates
+                       PHPTAL-NP-0.7.0 PHPTAL-NP-0.7.0/libs
+                       PHPTAL-NP-0.7.0/libs/Algo PHPTAL-NP-0.7.0/libs/PHPTAL
+                       PHPTAL-NP-0.7.0/libs/PHPTAL/Attribute
+                       PHPTAL-NP-0.7.0/libs/PHPTAL/Attribute/I18N
+                       PHPTAL-NP-0.7.0/libs/PHPTAL/Attribute/METAL
+                       PHPTAL-NP-0.7.0/libs/PHPTAL/Attribute/PHPTAL
+                       PHPTAL-NP-0.7.0/libs/PHPTAL/Attribute/TAL
+                       PHPTAL-NP-0.7.0/libs/Types'
+       insinto ${MY_HTDOCSDIR}
+       doins *.php *.inc *.phtml
+       for DIR in ${DIRS}; do
+               dodir ${MY_HTDOCSDIR}/${DIR}
+               insinto ${MY_HTDOCSDIR}/${DIR}
+               doins ${DIR}/*
+       done
 
+       # installing some docs
        local DOCS="COPYING HISTORY INSTALL README RELEASE-NOTES UPGRADE AdminSettings.sample"
        for DOC in ${DOCS}; do
                dodoc "${DOC}"
                rm -f "${DOC}"
        done
+       dodoc docs/*.doc
+       rm -f docs/*.doc
+
+       docinto php-memcached
+       dodoc docs/php-memcached/*
+
+       # If imagemagick is enabled then setup for image upload.
+       # We ensure the directory is prepared for writing.  The post-
+       # install instructions guide the user to enable the feature.
+       if use imagemagick; then
+               webapp_serverowned ${MY_HTDOCSDIR}/images
+       fi
+
+       # If we've enabled tetex, install math support.
+       # We ensure the directories are prepared for writing.  The post-
+       # install instructions guide the user to enable the feature.
+       if use tetex; then
+               einfo "Installing math support"
+               dodir ${MY_HTDOCSDIR}/math
+               exeinto ${MY_HTDOCSDIR}/math
+               doexe math/texvc
 
-       cp -ap * "${D}/${MY_HTDOCSDIR}"
+               # Docs
+               docinto math
+               dodoc math/README math/TODO
 
-       webapp_serverowned "${MY_HTDOCSDIR}/config"
-       webapp_serverowned "${MY_HTDOCSDIR}/images"
+               # Working directories.  Server writeable.
+               dodir ${MY_HTDOCSDIR}/images/math
+               webapp_serverowned ${MY_HTDOCSDIR}/images/math
+               dodir ${MY_HTDOCSDIR}/images/tmp
+               webapp_serverowned ${MY_HTDOCSDIR}/images/tmp
+       fi
 
+       webapp_postinst_txt en ${FILESDIR}/postinstall-en.txt
        webapp_src_install
 }