1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
7 MY_BRANCH=$(ver_cut 1-2)
9 DESCRIPTION="The MediaWiki wiki web application (as used on wikipedia.org)"
10 HOMEPAGE="http://www.mediawiki.org"
11 SRC_URI="http://releases.wikimedia.org/${PN}/${MY_BRANCH}/${P}.tar.gz"
14 KEYWORDS="~alpha amd64 ~arm ~arm64 ppc x86"
15 IUSE="imagemagick mysql postgres sqlite"
17 RDEPEND="dev-lang/php[ctype,fileinfo,iconv,json,mysql?,postgres?,session,ssl,unicode,xml,xmlreader]
18 imagemagick? ( virtual/imagemagick-tools )
19 !imagemagick? ( dev-lang/php[gd] )
21 dev-db/sqlite[fts3(+)]
34 # First we install docs and then copy everything left into htdocs dir
35 # to avoid bugs like #236411.
37 # We ensure the directories are prepared for writing. The post-
38 # install instructions guide the user to enable the feature.
39 local DOCS="FAQ HISTORY INSTALL README RELEASE-NOTES-${PV:0:4} UPGRADE"
40 dodoc ${DOCS} docs/*.txt
42 dodoc docs/php-memcached/*
44 # Clean everything not used at the site...
45 rm -rf ${DOCS} COPYING tests docs || die
46 find . -name Makefile -delete || die
48 insinto "${MY_HTDOCSDIR}"
51 # If imagemagick is enabled then setup for image upload.
52 # We ensure the directory is prepared for writing.
53 if use imagemagick ; then
54 webapp_serverowned "${MY_HTDOCSDIR}"/images
57 webapp_postinst_txt en "${FILESDIR}/postinstall-1.18-en.txt"
58 webapp_postupgrade_txt en "${FILESDIR}/postupgrade-1.16-en.txt"
65 if [[ -n ${REPLACING_VERSIONS} ]]; then
67 elog "=== Consult the release notes ==="
68 elog "Before doing anything, stop and consult the release notes"
69 elog "/usr/share/doc/${PF}/RELEASE-NOTES-${PV:0:4}.bz2"
71 elog "These detail bug fixes, new features and functionality, and any"
72 elog "particular points that may need to be noted during the upgrade procedure."
74 ewarn "Back up existing files and the database before upgrade."
75 ewarn "http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki"
76 ewarn "provides an overview of the backup process."