diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2022-04-25 13:23:56 -0400 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2022-04-25 13:24:09 -0400 |
commit | 3b928fd98c6600c8ecd1e137f89c96a3bc5fc50b (patch) | |
tree | 12974d48307d176e70fdc6fddc5010a967d6a7de /www-apps | |
parent | dev-ml/ppx_stable: 0.15.0 bump (diff) | |
download | gentoo-3b928fd98c6600c8ecd1e137f89c96a3bc5fc50b.tar.gz gentoo-3b928fd98c6600c8ecd1e137f89c96a3bc5fc50b.tar.bz2 gentoo-3b928fd98c6600c8ecd1e137f89c96a3bc5fc50b.zip |
www-apps/moodle: version bump to 4.0
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
Diffstat (limited to 'www-apps')
-rw-r--r-- | www-apps/moodle/Manifest | 1 | ||||
-rw-r--r-- | www-apps/moodle/moodle-4.0.ebuild | 121 |
2 files changed, 122 insertions, 0 deletions
diff --git a/www-apps/moodle/Manifest b/www-apps/moodle/Manifest index aa74df0ca836..80c61362c5c0 100644 --- a/www-apps/moodle/Manifest +++ b/www-apps/moodle/Manifest @@ -1,3 +1,4 @@ DIST moodle-3.10.10.tgz 58340957 BLAKE2B 1bcdd93802657729ac83f0eb7c9d25901ed71e0ba50940f3739875735d9fe4b4575c13680ea7b3acd1f578a6267813a011404f0cbbc2d93d0c9d79cf0c4beafc SHA512 fd5d2902a85a3e41cfa2eae1673e783aa55c78690a184664d554f5079a99ea7cf699a7b2c6f398daea7effa56c46533a5d475a25e805e9ae61b1cee0f0663fdb DIST moodle-3.11.6.tgz 60192360 BLAKE2B a9761a1056325ed952ed446ba35ddf7a09be2faec297609253424cd340fb89c7aa99caa5474a22d230e49321963f489539e4ec764983ebbe352cbd3c7b9c742f SHA512 1ceed02ace4bb506e2d3a2565af37956f9b89024478a32010699efde602220dde598938343566b018feb0d779182cdea4199db63b3671b0a15d4336646ef57f3 DIST moodle-3.9.13.tgz 56738890 BLAKE2B 3e894c30a480dc74d6ef332052a545be885f93057025a43065ccbc86d81ad3cc7d7f339a98189d3833b28ba13432fb3a30c6335d1d87d4056fc841f4ce11c8e2 SHA512 824572f01b185e0e722524620b08e623fb5827e972f7a3adc2ec6b4c023675f03ff46a0973e418aa6ff3d7c3efd8acccbb866750e760ef2499c3352f3b9dad21 +DIST moodle-4.0.tgz 61778671 BLAKE2B 426b0977d9c78055465fd752ea20a29c0f9c715cc513d3cb377f74e58cd3b3be01cafe93e2ba77222f097f2f13594ff645b5150d31b50493556b899587798400 SHA512 a104cfcc3616cb5d97382cf387ef13d89ea73e7b0a2f71f0bbd8cabc1df5828476091f0ab0a2e3f5962f4c8bb9d3019e3f226ec808fad670c5777cc87bd3d70c diff --git a/www-apps/moodle/moodle-4.0.ebuild b/www-apps/moodle/moodle-4.0.ebuild new file mode 100644 index 000000000000..7712f6dc98aa --- /dev/null +++ b/www-apps/moodle/moodle-4.0.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)" +#SRC_URI="https://download.moodle.org/downlaod.php/direct/${MY_BRANCH}/${P}.tgz" +SRC_URI="https://download.moodle.org/download.php/direct/stable400/moodle-4.0.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 +} |