diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2016-12-10 12:52:35 -0500 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2016-12-10 12:53:28 -0500 |
commit | adc331022749381c99cf558793dd9accd7cd3ad1 (patch) | |
tree | 7779fe62c2c02992526d57bf8d338bc9daad6529 /www-apps/moodle | |
parent | sys-apps/util-linux: fix ncurses detection to use pkg-config #601530 (diff) | |
download | gentoo-adc331022749381c99cf558793dd9accd7cd3ad1.tar.gz gentoo-adc331022749381c99cf558793dd9accd7cd3ad1.tar.bz2 gentoo-adc331022749381c99cf558793dd9accd7cd3ad1.zip |
www-apps/moodle: version bump to 3.2
Package-Manager: portage-2.3.0
Diffstat (limited to 'www-apps/moodle')
-rw-r--r-- | www-apps/moodle/Manifest | 1 | ||||
-rw-r--r-- | www-apps/moodle/moodle-3.2.ebuild | 122 |
2 files changed, 123 insertions, 0 deletions
diff --git a/www-apps/moodle/Manifest b/www-apps/moodle/Manifest index d17134a3d122..ace85f2e86f0 100644 --- a/www-apps/moodle/Manifest +++ b/www-apps/moodle/Manifest @@ -2,3 +2,4 @@ DIST moodle-2.7.17.tgz 35006140 SHA256 02ccedeca9e33d5ffb5554e12a5c85f0c44fbc853 DIST moodle-2.9.9.tgz 36587881 SHA256 c7aab8387f88111923dd1063964e70c88f1a883b2820f28f273ff572634f5c3b SHA512 3dae5c35f5d1149288fb5f94509204910e66e288ab3f67d5fd93d098fc0d6ae5adda5340eef23ea907b397a4bde5bc8fe1d99b48b5358f2bf605f2c84bc566fb WHIRLPOOL 46ee8e6a2fa5ae878b6a29e68824432a1024420d92033f3055d9ed9cdd80b2d99e7420017541944acf3890819c7bf6a1f518a2ca1bb2bc2627fee615a228b86e DIST moodle-3.0.7.tgz 38213543 SHA256 6d4f97fd6f8431a8a79eb8d49bdaf54b197c667d7b6d6185c4d7e568d69092b0 SHA512 5182190ae2075a83a1e01b8f2a678a718741ebdcd76db8ee6b154fb9ead044f1e341f7ac52967796938b9dad3fc3dc45d3110fe1b30cb75487592c1dbab6a194 WHIRLPOOL 3e3349873ce11154633258a02a46ab491e53d8a99306b352c11ccab899349caf221beecb48835103c02a5e40a4282f697bd742a7ec30a04321281627f6c6b18d DIST moodle-3.1.3.tgz 37558330 SHA256 c0a4924ef66000fc1ac203276260789a43aab6a88283a45f1ce01002370a8ab2 SHA512 fe6d4a09ec1808d2e8b74a5a092417531cac82e644d9481b417944d8174c07d7aa573892ed6bb8c881eb4aee133dcd85b9f6ce0ff90aa86d183ec5dcd2796e76 WHIRLPOOL 5608a20b39faf6f7ca1e88036498818183f3995dc3e54c23adbf7b29d415d06fab6f5e1f883841e1152026a7ed44a40986db6cfdff922e4b85b8b9446680e3dc +DIST moodle-3.2.tgz 38923254 SHA256 ae6dcfdc0d300bcba518f10be7978049f0c4e400b4f2e4420f3b31c011cbeb41 SHA512 6eca98c02cd42809dbb39b2a6197e984c6f110b33d1c15cb6399966af0bf7eeb0436f65f3ceb06e3bbf21a27551867ed5eaec6706fdf5624550d9aa96907cc58 WHIRLPOOL aa8ff0cff234875fec990d15a84b9ac229a772f65fcc7628ed3647cb5a436d8b13da1b4f35f2a7ef4453c465553e702c7be80f4e64d82387b74302b1c5feda92 diff --git a/www-apps/moodle/moodle-3.2.ebuild b/www-apps/moodle/moodle-3.2.ebuild new file mode 100644 index 000000000000..916d01f341bc --- /dev/null +++ b/www-apps/moodle/moodle-3.2.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit versionator webapp + +AVC=( $(get_version_components) ) +MY_BRANCH="stable${AVC[0]}${AVC[1]}" + +DESCRIPTION="The Moodle Course Management System" +HOMEPAGE="http://moodle.org" +SRC_URI="http://download.moodle.org/${MY_BRANCH}/${P}.tgz" +S="${WORKDIR}/${PN}" + +LICENSE="GPL-2" +KEYWORDS="~alpha ~amd64 ~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" +REQUIRED_USE="|| ( ${DB_TYPES} )" + +# 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-5.6.5[${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 + + # REQUIRED_USE above guarantees that ${DB_COUNT} cannot be zero + #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 +} + +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 +} |