2013-04-16 08:51:30 +02:00
|
|
|
# Copyright 1999-2013 Gentoo Foundation
|
2011-04-23 08:19:36 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2013-04-16 09:02:31 +02:00
|
|
|
# $Header: /var/cvsroot/gentoo-x86/www-apps/mediawiki/Attic/mediawiki-1.18.6.ebuild,v 1.3 2013/03/20 03:48:04 radhermit dead $
|
2011-04-23 08:19:36 +02:00
|
|
|
|
2013-04-16 09:02:31 +02:00
|
|
|
EAPI="5"
|
|
|
|
inherit webapp versionator
|
2011-04-23 08:19:36 +02:00
|
|
|
|
|
|
|
MY_BRANCH=$(get_version_component_range 1-2)
|
|
|
|
|
|
|
|
DESCRIPTION="The MediaWiki wiki web application (as used on wikipedia.org)"
|
|
|
|
HOMEPAGE="http://www.mediawiki.org"
|
2013-04-16 09:02:31 +02:00
|
|
|
SRC_URI="http://download.wikimedia.org/mediawiki/${MY_BRANCH}/${P}.tar.gz
|
|
|
|
http://mikedld.com/f/mediawiki/mediawiki-1.18.1-restrict-0.8.5.patch"
|
2011-04-23 08:19:36 +02:00
|
|
|
|
|
|
|
LICENSE="GPL-2"
|
2013-04-16 09:02:31 +02:00
|
|
|
KEYWORDS="~alpha ~amd64 ~ppc ~x86"
|
|
|
|
IUSE="imagemagick mysql postgres sqlite"
|
|
|
|
|
|
|
|
RDEPEND=">=dev-lang/php-5.3[mysql?,postgres?,session,xml,xmlreader]
|
2012-01-30 06:32:18 +01:00
|
|
|
imagemagick? ( || ( media-gfx/imagemagick media-gfx/graphicsmagick[imagemagick] ) )
|
2013-04-16 09:02:31 +02:00
|
|
|
!imagemagick? ( dev-lang/php[gd] )
|
|
|
|
sqlite? (
|
|
|
|
dev-db/sqlite:3[fts3]
|
|
|
|
>=dev-lang/php-5.3[pdo]
|
|
|
|
|| ( dev-lang/php[sqlite] dev-lang/php[sqlite3] )
|
|
|
|
)
|
|
|
|
virtual/httpd-php"
|
2011-04-23 08:19:36 +02:00
|
|
|
|
|
|
|
need_httpd_cgi
|
|
|
|
|
2012-01-30 06:32:18 +01:00
|
|
|
RESTRICT="test"
|
|
|
|
|
2011-04-23 08:19:36 +02:00
|
|
|
src_prepare() {
|
2013-04-16 09:02:31 +02:00
|
|
|
epatch "${DISTDIR}"/mediawiki-1.18.1-restrict-0.8.5.patch
|
|
|
|
webapp_src_prepare
|
2011-04-23 08:19:36 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
webapp_src_preinst
|
|
|
|
|
2013-04-16 09:02:31 +02:00
|
|
|
# First we install docs and then copy everything left into htdocs dir
|
2011-04-23 08:19:36 +02:00
|
|
|
# to avoid bugs like #236411.
|
|
|
|
|
|
|
|
# We ensure the directories are prepared for writing. The post-
|
|
|
|
# install instructions guide the user to enable the feature.
|
2013-04-16 09:02:31 +02:00
|
|
|
local DOCS="FAQ HISTORY INSTALL README RELEASE-NOTES-${PV:0:4} UPGRADE"
|
2011-04-23 08:19:36 +02:00
|
|
|
dodoc ${DOCS} docs/*.txt
|
|
|
|
docinto php-memcached
|
|
|
|
dodoc docs/php-memcached/*
|
|
|
|
|
|
|
|
# Clean everything not used at the site...
|
2013-04-16 09:02:31 +02:00
|
|
|
rm -rf ${DOCS} COPYING tests docs
|
2011-04-23 08:19:36 +02:00
|
|
|
find . -name Makefile -delete
|
|
|
|
# and install
|
|
|
|
insinto "${MY_HTDOCSDIR}"
|
|
|
|
doins -r .
|
|
|
|
|
|
|
|
# If imagemagick is enabled then setup for image upload.
|
|
|
|
# We ensure the directory is prepared for writing.
|
2013-04-16 09:02:31 +02:00
|
|
|
if use imagemagick ; then
|
2011-04-23 08:19:36 +02:00
|
|
|
webapp_serverowned "${MY_HTDOCSDIR}"/images
|
|
|
|
fi
|
|
|
|
|
2013-04-16 08:51:30 +02:00
|
|
|
webapp_postinst_txt en "${FILESDIR}/postinstall-1.18-en.txt"
|
2012-01-30 06:32:18 +01:00
|
|
|
webapp_postupgrade_txt en "${FILESDIR}/postupgrade-1.16-en.txt"
|
2011-04-23 08:19:36 +02:00
|
|
|
webapp_src_install
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_preinst() {
|
2013-04-16 09:02:31 +02:00
|
|
|
prev_install="false"
|
|
|
|
if has_version ${CATEGORY}/${PN} ; then
|
|
|
|
prev_install="true"
|
2011-04-23 08:19:36 +02:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
pkg_postinst() {
|
|
|
|
webapp_pkg_postinst
|
2013-04-16 09:02:31 +02:00
|
|
|
|
|
|
|
if ${prev_install} ; then
|
2011-04-23 08:19:36 +02:00
|
|
|
einfo
|
|
|
|
elog "=== Consult the release notes ==="
|
|
|
|
elog "Before doing anything, stop and consult the release notes"
|
2013-04-16 09:02:31 +02:00
|
|
|
elog "/usr/share/doc/${PF}/RELEASE-NOTES-${PV:0:4}.bz2"
|
2011-04-23 08:19:36 +02:00
|
|
|
elog
|
|
|
|
elog "These detail bug fixes, new features and functionality, and any"
|
|
|
|
elog "particular points that may need to be noted during the upgrade procedure."
|
|
|
|
einfo
|
|
|
|
ewarn "Back up existing files and the database before upgrade."
|
|
|
|
ewarn "http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki"
|
|
|
|
ewarn "provides an overview of the backup process."
|
|
|
|
einfo
|
|
|
|
fi
|
|
|
|
}
|