dev-qt/qdbus: stable 5.14.2 for ppc, bug #719732
[gentoo.git] / www-apps / mediawiki / mediawiki-1.34.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit webapp
6
7 MY_BRANCH=$(ver_cut 1-2)
8
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"
12
13 LICENSE="GPL-2"
14 KEYWORDS="~alpha amd64 ~arm ~arm64 ppc x86"
15 IUSE="imagemagick mysql postgres sqlite"
16
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] )
20         sqlite? (
21                 dev-db/sqlite[fts3(+)]
22                 dev-lang/php[pdo]
23                 dev-lang/php[sqlite]
24         )
25         virtual/httpd-php"
26
27 need_httpd_cgi
28
29 RESTRICT="test"
30
31 src_install() {
32         webapp_src_preinst
33
34         # First we install docs and then copy everything left into htdocs dir
35         # to avoid bugs like #236411.
36
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
41         docinto php-memcached
42         dodoc docs/php-memcached/*
43
44         # Clean everything not used at the site...
45         rm -rf ${DOCS} COPYING tests docs || die
46         find . -name Makefile -delete || die
47         # and install
48         insinto "${MY_HTDOCSDIR}"
49         doins -r .
50
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
55         fi
56
57         webapp_postinst_txt en "${FILESDIR}/postinstall-1.18-en.txt"
58         webapp_postupgrade_txt en "${FILESDIR}/postupgrade-1.16-en.txt"
59         webapp_src_install
60 }
61
62 pkg_postinst() {
63         webapp_pkg_postinst
64
65         if [[ -n ${REPLACING_VERSIONS} ]]; then
66                 echo
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"
70                 echo
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."
73                 echo
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."
77                 echo
78         fi
79 }