app-admin/awscli: Bump to 1.37.9
[gentoo/gentoo.git] / www-apps / mediawiki / mediawiki-1.39.11.ebuild
blob067e534bc470bbb310515be1ff8d16656f2078ed
1 # Copyright 1999-2025 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
4 EAPI=8
5 inherit webapp
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"
13 LICENSE="GPL-2"
14 KEYWORDS="~alpha amd64 ~arm ~arm64 ppc x86"
15 IUSE="imagemagick mysql postgres +sqlite"
16 REQUIRED_USE="|| ( mysql postgres sqlite )"
18 RDEPEND="dev-lang/php[calendar,ctype,fileinfo,iconv,intl,json(+),postgres?,session,ssl,unicode,xml,xmlreader]
19         imagemagick? ( virtual/imagemagick-tools )
20         !imagemagick? ( dev-lang/php[gd] )
21         mysql? ( dev-lang/php[mysql,mysqli] )
22         sqlite? (
23                 dev-db/sqlite[fts3(+)]
24                 dev-lang/php[pdo,sqlite]
25         )
26         virtual/httpd-php"
28 need_httpd_cgi
30 RESTRICT="test"
32 src_unpack() {
33         default
35         # remove lua binaries (bug #631554)
36         rm -r "${S}"/extensions/Scribunto/includes/engines/LuaStandalone/binaries || die "Failed to remove lua binaries"
39 src_install() {
40         webapp_src_preinst
42         # First we install docs and then copy everything left into htdocs dir
43         # to avoid bugs like #236411.
45         # We ensure the directories are prepared for writing.  The post-
46         # install instructions guide the user to enable the feature.
47         local DOCS="FAQ HISTORY INSTALL README.md RELEASE-NOTES-${PV:0:4} UPGRADE"
48         dodoc ${DOCS} docs/*.txt
49         docinto databases
50         dodoc docs/databases/*
51         # Clean everything not used at the site...
52         rm -r ${DOCS} COPYING tests docs || die
53         find . -name Makefile -delete || die
54         # and install
55         insinto "${MY_HTDOCSDIR}"
56         doins -r .
58         # If imagemagick is enabled then setup for image upload.
59         # We ensure the directory is prepared for writing.
60         if use imagemagick ; then
61                 webapp_serverowned "${MY_HTDOCSDIR}"/images
62         fi
64         webapp_postinst_txt en "${FILESDIR}/postinstall-1.18-en.txt"
65         webapp_postupgrade_txt en "${FILESDIR}/postupgrade-1.16-en.txt"
66         webapp_src_install
69 pkg_postinst() {
70         webapp_pkg_postinst
72         if [[ -n ${REPLACING_VERSIONS} ]]; then
73                 echo
74                 elog "=== Consult the release notes ==="
75                 elog "Before doing anything, stop and consult the release notes"
76                 elog "/usr/share/doc/${PF}/RELEASE-NOTES-${PV:0:4}.bz2"
77                 echo
78                 elog "These detail bug fixes, new features and functionality, and any"
79                 elog "particular points that may need to be noted during the upgrade procedure."
80                 echo
81                 elog "If you plan to use the Scribunto extension with Lua, make sure to configure"
82                 elog "path to Lua executable using this documentation:"
83                 elog "https://www.mediawiki.org/wiki/Extension:Scribunto#Lua_binary"
84                 echo
85                 ewarn "Back up existing files and the database before upgrade."
86                 ewarn "http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki"
87                 ewarn "provides an overview of the backup process."
88                 echo
89         fi