summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2022-07-14 01:39:55 +0100
committerSam James <sam@gentoo.org>2022-07-14 01:40:24 +0100
commit5a4e089eb718040ca8110e9e7c9c8b45c97b4ca3 (patch)
treeb450f88ce5083661628fdafc008e7fa2b6f32203 /www-apps
parentdev-util/meson: drop 0.60.3, 0.61.4-r2, 0.62.1 (diff)
downloadgentoo-5a4e089eb718040ca8110e9e7c9c8b45c97b4ca3.tar.gz
gentoo-5a4e089eb718040ca8110e9e7c9c8b45c97b4ca3.tar.bz2
gentoo-5a4e089eb718040ca8110e9e7c9c8b45c97b4ca3.zip
www-apps/moodle: fix downloaded version
Closes: https://bugs.gentoo.org/857873 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/moodle/Manifest1
-rw-r--r--www-apps/moodle/moodle-4.0.2-r1.ebuild121
2 files changed, 122 insertions, 0 deletions
diff --git a/www-apps/moodle/Manifest b/www-apps/moodle/Manifest
index 707534601b9a..94408feab15a 100644
--- a/www-apps/moodle/Manifest
+++ b/www-apps/moodle/Manifest
@@ -1,3 +1,4 @@
DIST moodle-3.11.8.tgz 60299874 BLAKE2B 315e22a3080b90cb946074c2c53a97ddfdb13f942a41e21d8f21e8520fa7442e85ec4485b5230dbdd1e2b8a8bc69371280c32f36d5819abe4e600eed18bb0ade SHA512 b866eb08d2744ec39eed3d1cd11b98b459785a72dabb2f5069fdea3a333146646bddea5dbb7765ee67d604501253371e8a02b38a7aa5b76dd1750aa8dc4f30b2
DIST moodle-3.9.15.tgz 56746257 BLAKE2B f912749d568ea20a432ca9312e4e689cd38462b6737377af01655fc7fe13b7345f34eb1651c70d6584675089694f78c66de0523dd3fcfa26228c1b5eedaafb8a SHA512 fc61f82455faa1d6fee5f3e99574c1d69c9e967e8f85dcbc06a53db4b3d57d56af37c1c4f90338d081e76e40a938902cce8787f9e14c959a1088d2b8936fd74c
+DIST moodle-4.0.2.tgz 61878566 BLAKE2B 6711f1a9d41b797bafd2ee7e5ceb0851bdec3c817c26af5c70cb030c7df65975bfec13306b995fe73431e77924e90cea59a64d6709f2f8f6d33e2dfbc9110f10 SHA512 f485c8b609a47de26406df5d19441da0b7762759b4b59eb06855a80495c6617f19f60d758541dba71c92a89df77f68db6e2026ee284bda8104fbfd1331eaf2a0
DIST moodle-4.0.tgz 61778671 BLAKE2B 426b0977d9c78055465fd752ea20a29c0f9c715cc513d3cb377f74e58cd3b3be01cafe93e2ba77222f097f2f13594ff645b5150d31b50493556b899587798400 SHA512 a104cfcc3616cb5d97382cf387ef13d89ea73e7b0a2f71f0bbd8cabc1df5828476091f0ab0a2e3f5962f4c8bb9d3019e3f226ec808fad670c5777cc87bd3d70c
diff --git a/www-apps/moodle/moodle-4.0.2-r1.ebuild b/www-apps/moodle/moodle-4.0.2-r1.ebuild
new file mode 100644
index 000000000000..db15d5ab03ce
--- /dev/null
+++ b/www-apps/moodle/moodle-4.0.2-r1.ebuild
@@ -0,0 +1,121 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit webapp
+
+DESCRIPTION="The Moodle Course Management System"
+HOMEPAGE="https://moodle.org"
+
+MY_BRANCH="stable$(ver_cut 1)$(ver_cut 2)0"
+#SRC_URI="https://download.moodle.org/download.php/direct/stable400/moodle-4.0.tgz"
+SRC_URI="https://download.moodle.org/download.php/direct/${MY_BRANCH}/${P}.tgz"
+S="${WORKDIR}/${PN}"
+
+LICENSE="GPL-3+"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
+#SLOT empty due to webapp
+
+DB_FLAGS="mysqli?,mssql?,postgres?"
+DB_TYPES=${DB_FLAGS//\?/}
+DB_TYPES=${DB_TYPES//,/ }
+
+AUTHENTICATION_FLAGS="imap?,ldap?,odbc?"
+AUTHENTICATION_MODES=${AUTHENTICATION_FLAGS//\?/}
+AUTHENTICATION_MODES=${AUTHENTICATION_MODES//,/ }
+
+PHP_REQUIRED_FLAGS="ctype,curl,iconv,json(+),session,simplexml,xml,zip"
+PHP_OPTIONAL_FLAGS="gd,intl,soap,ssl,tokenizer,xmlrpc"
+PHP_FLAGS="${PHP_REQUIRED_FLAGS},${PHP_OPTIONAL_FLAGS}"
+
+IUSE="${DB_TYPES} ${AUTHENTICATION_MODES} vhosts"
+
+# No forced dependency on
+# mssql? - lives on a windows server
+# mysql? ( virtual/mysql )
+# postgres? ( dev-db/postgresql-server-9* )
+# which may live on another server. These USE flags affect the configuration
+# file and the dependency on php. However other dbs are possible. See config.php
+# and the moodle documentation for other possibilities.
+DEPEND=""
+RDEPEND="
+ >=dev-lang/php-7.3[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS}]
+ virtual/httpd-php
+ virtual/cron"
+
+pkg_setup() {
+ webapp_pkg_setup
+
+ # How many dbs were selected? If one and only one, which one is it?
+ MYDB=""
+ DB_COUNT=0
+ for db in ${DB_TYPES}; do
+ if use ${db}; then
+ MYDB=${db}
+ DB_COUNT=$(($DB_COUNT+1))
+ fi
+ done
+
+ if [[ ${DB_COUNT} -eq 0 ]]; then
+ eerror
+ eerror "No database selected in your USE flags,"
+ eerror "You must select at least one."
+ eerror
+ die
+ fi
+
+ if [[ ${DB_COUNT} -gt 1 ]]; then
+ MYDB=""
+ ewarn
+ ewarn "Multiple databases selected in your USE flags,"
+ ewarn "You will have to choose your database manually."
+ ewarn
+ fi
+}
+
+src_prepare() {
+ rm COPYING.txt
+ cp "${FILESDIR}"/config-r1.php config.php
+
+ # Moodle expect pgsql, not postgres
+ MYDB=${MYDB/postgres/pgsql}
+
+ if [[ ${DB_COUNT} -eq 1 ]] ; then
+ sed -i -e "s|mydb|${MYDB}|" config.php
+ fi
+
+ eapply_user
+}
+
+src_install() {
+ webapp_src_preinst
+
+ local MOODLEDATA="${MY_HOSTROOTDIR}"/moodle
+ dodir ${MOODLEDATA}
+ webapp_serverowned -R "${MOODLEDATA}"
+
+ local MOODLEROOT="${MY_HTDOCSDIR}"
+ insinto ${MOODLEROOT}
+ doins -r *
+
+ webapp_configfile "${MOODLEROOT}"/config.php
+
+ if [[ ${DB_COUNT} -eq 1 ]]; then
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
+ else
+ webapp_postinst_txt en "${FILESDIR}"/postinstall-nodb-en.txt
+ fi
+
+ webapp_src_install
+}
+
+pkg_postinst() {
+ einfo
+ einfo
+ einfo "To see the post install instructions, do"
+ einfo
+ einfo " webapp-config --show-postinst ${PN} ${PVR}"
+ einfo
+ einfo
+}