summaryrefslogtreecommitdiff
path: root/www-apps/moodle
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-06-21 17:50:24 +0100
committerV3n3RiX <venerix@redcorelinux.org>2020-06-21 17:50:24 +0100
commitfeb0daf81d888e9160f9f94502de09b66f2a63fd (patch)
treeb6e5c40ce2abef3da27ed50a023153f475e0ddef /www-apps/moodle
parent9452a6e87b6c2c70513bc47a2470bf9f1168920e (diff)
gentoo resync : 21.06.2020
Diffstat (limited to 'www-apps/moodle')
-rw-r--r--www-apps/moodle/Manifest2
-rw-r--r--www-apps/moodle/moodle-3.9.ebuild120
2 files changed, 122 insertions, 0 deletions
diff --git a/www-apps/moodle/Manifest b/www-apps/moodle/Manifest
index 6e087b297c4c..9423b24a6b62 100644
--- a/www-apps/moodle/Manifest
+++ b/www-apps/moodle/Manifest
@@ -6,8 +6,10 @@ DIST moodle-3.5.12.tgz 46771916 BLAKE2B cb22c3a1548d2e01b309375ef3e422faa1a1603c
DIST moodle-3.6.10.tgz 47830177 BLAKE2B f28ce1b32cc4cec2eb256a9a3ad37f224e637e5e4720af4914dff80eec07cdfe738546545e9fc3db7a88517b0c10fc16a942515b3aa011d4d7588fbc2c26fffe SHA512 1ac374b1805f3a2be253279384f81c11d717eb6d9598c42490254912fe3720cba22c31525f3435785d270eda5a4340c79db43070973ebac3059549a322cfdbce
DIST moodle-3.7.6.tgz 45867618 BLAKE2B 901a0d953e1a3329c817c032610ad797a34458fa9716ab9dcb51775faebdd30593596694ed72cbb0b0a45bb19eeee69a373f4792edce3aa530b3aeeb3cb551a3 SHA512 eaf8eeed256e9a942a5003f24bdd56ec3378d02fd33a4807b06fe2df083c5fe343014bda19d49791d20d038dbc3bc2a86e20a2e2f9fc25b45b3c00d8728c6ff1
DIST moodle-3.8.3.tgz 53221103 BLAKE2B 7bf36c7affbe71eab027954e6690eb45137a49bad136511efe90f843de00d31b94071cac37a8ddc3f22565df960454047b42f5839ef58177b18d2737317b9c84 SHA512 d68f99717e7283f95a050d39879bffec8fe210f83d970fd5b14655be6546bf0848b75fd44bca3376b1bb7aba274c05a58b0b01d430cfbffebc02355c4a2b3759
+DIST moodle-3.9.tgz 56958303 BLAKE2B 81b4a2adab014d9e67d2a400592db56777dcecf7b16f7495f941472a8a49af74acd732d4198f2821910a1771995c85d998e1fe58ba4d6db7fc3dd4e1892cda41 SHA512 693a77fdd66ecfa9e1418e01c543d575aa8468b267de0a1dcfb6df369adc5b73223c959e57947cb56fafa94d269fbd36fd652ddf0b84ed8d5397702501a86e01
EBUILD moodle-3.5.12.ebuild 2809 BLAKE2B 52d5a24a58a517e33ce4a4f99cb1262c015fc769e073403762d67d83524077c98a97f0c72f09dcf5c71c67d841f7e07a8b9905bd7479e8a0d0efee9cded87807 SHA512 f3d584a1c99f2ae1b8e7a855023a2c93c8e5fe0d372c8fb472ce3f7d9a16514cd5adb59ddca25846da01c8e4a1408d4aed21e2b8d443c5202134888041ac510a
EBUILD moodle-3.6.10.ebuild 2809 BLAKE2B 52d5a24a58a517e33ce4a4f99cb1262c015fc769e073403762d67d83524077c98a97f0c72f09dcf5c71c67d841f7e07a8b9905bd7479e8a0d0efee9cded87807 SHA512 f3d584a1c99f2ae1b8e7a855023a2c93c8e5fe0d372c8fb472ce3f7d9a16514cd5adb59ddca25846da01c8e4a1408d4aed21e2b8d443c5202134888041ac510a
EBUILD moodle-3.7.6.ebuild 2809 BLAKE2B 9f61ee05c8031f69e3585fcaba03e0e9d0a7b8a2c51e37b03575ed8759ecc51a32e7ca316bb0b2941df19dc48a15a55c86512dfcd8cf66621dd1520eb799f37a SHA512 414bdbd09cc39280b99ce545d16ec3f9014cc86350da422806c441b15fa83e2bdb60809c5506786ca79650512a5d3af463005db250910579baba4c5bba4f064d
EBUILD moodle-3.8.3.ebuild 2809 BLAKE2B 9f61ee05c8031f69e3585fcaba03e0e9d0a7b8a2c51e37b03575ed8759ecc51a32e7ca316bb0b2941df19dc48a15a55c86512dfcd8cf66621dd1520eb799f37a SHA512 414bdbd09cc39280b99ce545d16ec3f9014cc86350da422806c441b15fa83e2bdb60809c5506786ca79650512a5d3af463005db250910579baba4c5bba4f064d
+EBUILD moodle-3.9.ebuild 2809 BLAKE2B 9dffc324aa9b154d95215344eec2c4ed22b197adb34b5d38eee3d4b54970f89f61beb3c64bf8751e8c6adb0c52660bed373c9edbd149ef4aa41ae24e0c3fc976 SHA512 6206687130349734f1731a74ec00419f20c6c34828b76c2b33cc2385a4b09a26efa172b023608252b815de014bd1d7c732d92f52268073e5c357275dc954a437
MISC metadata.xml 355 BLAKE2B 68d10d39dd24da3d570f13edec9c4adae89b7620bb455c1c30377c3cebe56c4961d1548360adedc96fce780067b308193fdb7560478a60ab56c364b774b1984a SHA512 f02e5404a714cb20207e494f635fb0e98870576c4b5f6affc4dc27fccfcabdd1af1c7411a83cfd4e01b51ecc24d11944d1e612757ff45ab4405f6099ed9b1278
diff --git a/www-apps/moodle/moodle-3.9.ebuild b/www-apps/moodle/moodle-3.9.ebuild
new file mode 100644
index 000000000000..1012b291cbc9
--- /dev/null
+++ b/www-apps/moodle/moodle-3.9.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit webapp
+
+MY_BRANCH="stable$(ver_cut 1)$(ver_cut 2)"
+
+DESCRIPTION="The Moodle Course Management System"
+HOMEPAGE="https://moodle.org"
+SRC_URI="https://download.moodle.org/${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.2[${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
+}