mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-16 14:29:05 -07:00
www-apps/moodle: version bump to 3.8
Package-Manager: Portage-2.3.76, Repoman-2.3.16 Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
DIST moodle-3.5.9.tgz 46748268 BLAKE2B 41c1b9f47f088438fddaa3bbf913091610d8b5aece8413944d79ba67381a50c510c257eab56c8a41f755335417549107c4e349134f3d0c39579329efd04cee34 SHA512 262449f3c424655d86746c13548187e412575ba4abe5d4bac2bcd64aa8f2ce4ea3fd3663bba8a61c10c9bd9192d5fb1ee19d75484340972a909284bc5d923a2c
|
||||
DIST moodle-3.6.7.tgz 47805595 BLAKE2B 567d179d3f2c600960c979dc54a92de9bf95e0710de20f6dcb304d8d6a528d929b60183f56e707a3254a2c98060c2c3ced62272360912716d8a1cf2fa7bd3b98 SHA512 b406fccb8ea572cf14cb8c06e746778b1ce92a170537ed4cd17e1a0977d30e5b8711a7cb36f7d845acc1af31a348faf7cf3b8beca815c1caa8ac0b2c2cf48ae4
|
||||
DIST moodle-3.7.3.tgz 45782119 BLAKE2B 2732e0269d65f213b71e32231f7fff8ba06f2456466f8fa00f9e7f204f0f7160b3552763c555f952a35cbb9344c9494e7122bd9a6f9ecea8b9ca18a8a9d90e07 SHA512 e9cb7d633be57ed9a66f54f33d2b2827a0ee18d3e7d48f463e8526b817e470d9d1930dbef557f84d94c1dc20a2543874e3bbbae4ac89eeda62217ac2bbddb14d
|
||||
DIST moodle-3.8.tgz 53109307 BLAKE2B 833160d06cb1068eda5474a4bba5bfb05a80b857c32a92eea2c92eb1bd6fec91fd1098f7172d643a9f0a8a7c567afda395f91d884446ff8c5113eac1d441e79a SHA512 c67803b62d25d3031ea58afea8820d746da144b0ef5c41f659fe0d9a99aeef5f287c4582b3766ec28452495bea03aed78509acd71a203edf990328d31f185bf3
|
||||
|
||||
123
www-apps/moodle/moodle-3.8.ebuild
Normal file
123
www-apps/moodle/moodle-3.8.ebuild
Normal file
@@ -0,0 +1,123 @@
|
||||
# Copyright 1999-2019 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
EAPI="6"
|
||||
|
||||
inherit versionator webapp
|
||||
|
||||
AVC=( $(get_version_components) )
|
||||
MY_BRANCH="stable${AVC[0]}${AVC[1]}"
|
||||
|
||||
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-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-7.1[${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
|
||||
|
||||
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
|
||||
}
|
||||
Reference in New Issue
Block a user