summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2011-08-02 09:55:37 +0000
committerAnthony G. Basile <blueness@gentoo.org>2011-08-02 09:55:37 +0000
commit076a266f208c3a1622d27978bd1bc46e8dfea5be (patch)
treeff3c9115aa2052695c826c592dd39552b5409dba
parentRemoved stale patch. (diff)
downloadhistorical-076a266f208c3a1622d27978bd1bc46e8dfea5be.tar.gz
historical-076a266f208c3a1622d27978bd1bc46e8dfea5be.tar.bz2
historical-076a266f208c3a1622d27978bd1bc46e8dfea5be.zip
Version bumps
Package-Manager: portage-2.1.10.3/cvs/Linux x86_64
-rw-r--r--www-apps/moodle/ChangeLog10
-rw-r--r--www-apps/moodle/Manifest14
-rw-r--r--www-apps/moodle/moodle-1.9.13.ebuild126
-rw-r--r--www-apps/moodle/moodle-2.0.4.ebuild139
-rw-r--r--www-apps/moodle/moodle-2.1.1.ebuild139
5 files changed, 423 insertions, 5 deletions
diff --git a/www-apps/moodle/ChangeLog b/www-apps/moodle/ChangeLog
index ec8c99fce443..7763f344bd63 100644
--- a/www-apps/moodle/ChangeLog
+++ b/www-apps/moodle/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for www-apps/moodle
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v 1.9 2011/07/12 21:11:45 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v 1.10 2011/08/02 09:55:37 blueness Exp $
+
+*moodle-2.1.1 (02 Aug 2011)
+*moodle-2.0.4 (02 Aug 2011)
+*moodle-1.9.13 (02 Aug 2011)
+
+ 02 Aug 2011; Anthony G. Basile <blueness@gentoo.org> +moodle-1.9.13.ebuild,
+ +moodle-2.0.4.ebuild, +moodle-2.1.1.ebuild:
+ Version bumps
12 Jul 2011; Anthony G. Basile <blueness@gentoo.org> moodle-1.9.12.ebuild,
moodle-2.0.3.ebuild, moodle-2.1.ebuild:
diff --git a/www-apps/moodle/Manifest b/www-apps/moodle/Manifest
index 15ff8e097cc0..3809736a12bd 100644
--- a/www-apps/moodle/Manifest
+++ b/www-apps/moodle/Manifest
@@ -5,17 +5,23 @@ AUX config.php 718 RMD160 9e4b97aafca65da8648466d11728c457fff439ab SHA1 d71fc861
AUX postinstall-en.txt 6524 RMD160 d3799bc5cdc283e787c1b5d08935a8d7851d0c8d SHA1 097744447c046848611bfe53d5191518465f1c6d SHA256 dad8831abc23179ebcd2c2431f11d83346c142175c59da47cf5f913c928de667
AUX postinstall-nodb-en.txt 171 RMD160 88ff71d95c63f1b5d76e398c3566ada75954cdf4 SHA1 26748e5f24207ef5cb145e3668e1f17cdcddf699 SHA256 f39ff660a1cafbbd96ce18c46f056450ace04df5ac401eeccaf16441d54f3b6a
DIST moodle-1.9.12.tgz 14044589 RMD160 32054256881037026454c41e7dd4c3683cc361b2 SHA1 838d2fb9c17903c1835aee2154527158e5c7a83d SHA256 fc4fbe600102fc0fc878f6db423d5bac5ef9362aba8d97720939f1078f905f80
+DIST moodle-1.9.13.tgz 14051097 RMD160 60bc74df57f1a4133c892e6480fd2dc86442c175 SHA1 e7d9f9bb8ae5085361253a8971c5652a0863be9e SHA256 d5cad85b5a2edffca26f0a7948a4572f0a7b43ed9424de3777217142e6c9f1a5
DIST moodle-2.0.3.tgz 22438221 RMD160 e204249cb439754ed7c484815b763a4515c14ff0 SHA1 3dc8b1a46f94b54442b907461daaf453b955d1e6 SHA256 91ffa120a2674d835a0f087d472c789ddeaac305181c80c8a0af33351d065945
+DIST moodle-2.0.4.tgz 22459220 RMD160 f156edde9a0db2e504071e2d2b3879e5a5fe4f7c SHA1 0b6b93fe9a0cffc12c03a98104014651aef97060 SHA256 8e234bbd200f8faec1d3134df7d2a3ceb346e3891e157299265b65e9bdad2cfb
+DIST moodle-2.1.1.tgz 23139062 RMD160 7f4f5a974c7db95b652191318090f3d3b417a56b SHA1 9b23b6219a6bf72736d9a7f25d906062aa69b012 SHA256 8931b07ee90436bdc510c35754d0154d4c554f0e51d22f3bdb3223096e22ca30
DIST moodle-2.1.tgz 23128617 RMD160 ed0758ffd1534c907ff27f5b9c5d1b285e499239 SHA1 9d7830f7b16621c22813634f19baae56cd565315 SHA256 8739ab133be99736ae7d9f004b4163b332dfd135c064899f84b24b8867ea2810
EBUILD moodle-1.9.12.ebuild 3169 RMD160 674882ad09b4f4b3bfe783c9be00e388ebca44d2 SHA1 bdc89ccccee6cbcc2b9d7186564f842668815195 SHA256 153b9ed55861a4a40cc74895e00339da0d12c981ddad094d04ad15f02a322ed8
+EBUILD moodle-1.9.13.ebuild 3176 RMD160 af70d48ccc9aae3804b73d1c434e5a79f4357395 SHA1 deab6b447843a3baa4fac798e2777ad8c9f255eb SHA256 fb0b820a8ae0b9404e87e16e25a408f5317773e372a18b695db24e63a15e7cf2
EBUILD moodle-2.0.3.ebuild 4021 RMD160 ee8084b7c255684df396446a108323dc0d736a4c SHA1 c5c89d477ec3d50734239f5100dc82bce73a39c1 SHA256 c292ec7cb897669c2640f92a6a3946856c5f8ff4c2b246fc5a7016f350b72df7
+EBUILD moodle-2.0.4.ebuild 4021 RMD160 6055be84fec508d31275fa7fd6f5d8476524a9a4 SHA1 6c8d3a04fa1bb9186292a22c47341576c2e50e23 SHA256 616953530adf3e2d78086a06308988dbe405145248c720793b438db1e577ce1e
+EBUILD moodle-2.1.1.ebuild 4021 RMD160 b38b2aff9f05d1be0363207131038d359fdc52d7 SHA1 ac23f07cd66302d7846d64b36824192755b4fe68 SHA256 6081e1e09bf8fb2b843062f0e7251a1ff46949b9f409e2400f5efc78de47c91d
EBUILD moodle-2.1.ebuild 4019 RMD160 34cc310c46499a536cc2133990813cc0f3f298ed SHA1 c8fd8fbcd4cd4f00cee40a31a4c9a191219843a5 SHA256 23e250c693bd2e1b5e4cb8b88eb6da042d14bc4b7a47ace842e2255a690d951b
-MISC ChangeLog 1990 RMD160 16a8cb2a0f1e0edd3787c8270d27524be52876c0 SHA1 1cacebe9c69529345272463ea24c1d2301fb085f SHA256 6d5b6d9ba50b771d526175fbacaf105b77d213c2bcf30bd261dad1b440cc14c6
+MISC ChangeLog 2218 RMD160 88ccc1af15f8bf914cb0e2f1b4ea2ec78777754b SHA1 595019cbe0502897d93dd1fd226de904f172f2ef SHA256 dada1df2a53263dc2f178542543cabbf7c9aae0092030969575c1bec40503a84
MISC metadata.xml 256 RMD160 7cd5a16a6eade95f71d40edbb4729baadfbc7649 SHA1 809eeef12d97ae39db024aea151a70c7363475b7 SHA256 8230894d717ea9f2e42f9c7de54671126820f89bf05ca96ec5f03842b12378e1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iEYEAREIAAYFAk4cuJwACgkQl5yvQNBFVTUOMACcDV8dcfwbFeDkrRCx9ACEGlbm
-rm0AoKOoucZP30KL1703ZJaLerQNIa8R
-=evbm
+iEYEAREIAAYFAk43yaUACgkQl5yvQNBFVTWTfQCaAv3zBH4reO/udk594qwWNMVu
+I7YAn1kKSnFbHYLIIIB5rmJqbabU00JM
+=O0Y8
-----END PGP SIGNATURE-----
diff --git a/www-apps/moodle/moodle-1.9.13.ebuild b/www-apps/moodle/moodle-1.9.13.ebuild
new file mode 100644
index 000000000000..fcbbdf23b658
--- /dev/null
+++ b/www-apps/moodle/moodle-1.9.13.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-1.9.13.ebuild,v 1.1 2011/08/02 09:55:37 blueness Exp $
+
+EAPI="2"
+
+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 ~ppc ~ppc64 ~sparc ~x86"
+#SLOT empty due to webapp
+
+DBFLAGS="mysql?,postgres?"
+DBTYPES=${DBFLAGS//\?/}
+DBTYPES=${DBTYPES//,/ }
+
+AUTHFLAGS="imap?,ldap?,odbc?"
+AUTHMODES=${AUTHFLAGS//\?/}
+AUTHMODES=${AUTHMODES//,/ }
+
+PHPFLAGS_A="ctype,curl,gd,iconv,ssl,tokenizer,xml,xmlrpc,zlib"
+PHPFLAGS_B="ctype,curl,gd-external,iconv,ssl,tokenizer,xml,xmlrpc,zlib"
+
+IUSE="${DBTYPES} ${AUTHMODES} vhosts"
+
+# No forced dependency on
+# mysql? ( virtual/mysql )
+# postgres? ( dev-db/postgresql-server-7* )
+# which may live on another server
+DEPEND=""
+RDEPEND="
+ || (
+ >=dev-lang/php-4.3.0[${DBFLAGS},${AUTHFLAGS},${PHPFLAGS_A}]
+ >=dev-lang/php-4.3.0[${DBFLAGS},${AUTHFLAGS},${PHPFLAGS_B}]
+ )
+ 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 ${DBTYPES}; do
+ if use ${db}; then
+ MYDB=${db}
+ DB_COUNT=$(($DB_COUNT+1))
+ fi
+ done
+
+ if [[ ${DB_COUNT} -eq 0 ]]; then
+ eerror
+ eerror "\033[1;31m**************************************************\033[1;31m"
+ eerror "No database selected in your USE flags,"
+ eerror "You must select at least one."
+ eerror "\033[1;31m**************************************************\033[1;31m"
+ eerror
+ die
+ fi
+
+ if [[ ${DB_COUNT} -gt 1 ]]; then
+ MYDB=""
+ ewarn
+ ewarn "\033[1;33m**************************************************\033[1;33m"
+ ewarn "Multiple databases selected in your USE flags,"
+ ewarn "You will have to choose your database manually."
+ ewarn "\033[1;33m**************************************************\033[1;33m"
+ ewarn
+ fi
+}
+
+src_prepare() {
+ rm COPYING.txt
+ cp "${FILESDIR}"/config.php .
+
+ #
+ # Moodle expect postgres7, not postgres
+ #
+ MYDB=${MYDB/postgres/postgres7}
+ 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} || die "Unable to 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 "\033[1;32m**************************************************\033[1;32m"
+ einfo
+ einfo "To see the post install instructions, do"
+ einfo
+ einfo " webapp-config --show-postinst ${PN} ${PVR}"
+ einfo
+ einfo "\033[1;32m**************************************************\033[1;32m"
+ einfo
+}
diff --git a/www-apps/moodle/moodle-2.0.4.ebuild b/www-apps/moodle/moodle-2.0.4.ebuild
new file mode 100644
index 000000000000..e50771b0561a
--- /dev/null
+++ b/www-apps/moodle/moodle-2.0.4.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.0.4.ebuild,v 1.1 2011/08/02 09:55:37 blueness Exp $
+
+EAPI="2"
+
+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 ~ppc ~ppc64 ~sparc ~x86"
+#SLOT empty due to webapp
+
+DB_FLAGS="mysqli?,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_52="ctype,curl,iconv,json,pcre,simplexml,spl,xml,zip"
+PHP_OPTIONAL_FLAGS_52_A="gd,soap,ssl,tokenizer,xmlrpc"
+PHP_OPTIONAL_FLAGS_52_B="gd-external,soap,ssl,tokenizer,xmlrpc"
+PHP_FLAGS_52_A="${PHP_REQUIRED_FLAGS_52},${PHP_OPTIONAL_FLAGS_52_A}"
+PHP_FLAGS_52_B="${PHP_REQUIRED_FLAGS_52},${PHP_OPTIONAL_FLAGS_52_B}"
+
+PHP_REQUIRED_FLAGS_53="ctype,curl,iconv,json,simplexml,xml,zip"
+PHP_OPTIONAL_FLAGS_53_A="gd,intl,soap,ssl,tokenizer,xmlrpc"
+PHP_OPTIONAL_FLAGS_53_B="gd-external,intl,soap,ssl,tokenizer,xmlrpc"
+PHP_FLAGS_53_A="${PHP_REQUIRED_FLAGS_53},${PHP_OPTIONAL_FLAGS_53_A}"
+PHP_FLAGS_53_B="${PHP_REQUIRED_FLAGS_53},${PHP_OPTIONAL_FLAGS_53_B}"
+
+IUSE="${DB_TYPES} ${AUTHENTICATION_MODES} vhosts"
+
+# No forced dependency on
+# mysql? ( virtual/mysql )
+# postgres? ( dev-db/postgresql-server-7* )
+# which may live on another server
+DEPEND=""
+RDEPEND="
+ || (
+ =dev-lang/php-5.2*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_52_A}]
+ =dev-lang/php-5.2*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_52_B}]
+ =dev-lang/php-5.3*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_53_A}]
+ =dev-lang/php-5.3*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_53_B}]
+ )
+ 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 "\033[1;31m**************************************************\033[1;31m"
+ eerror "No database selected in your USE flags,"
+ eerror "You must select at least one."
+ eerror "\033[1;31m**************************************************\033[1;31m"
+ eerror
+ die
+ fi
+
+ if [[ ${DB_COUNT} -gt 1 ]]; then
+ MYDB=""
+ ewarn
+ ewarn "\033[1;33m**************************************************\033[1;33m"
+ ewarn "Multiple databases selected in your USE flags,"
+ ewarn "You will have to choose your database manually."
+ ewarn "\033[1;33m**************************************************\033[1;33m"
+ ewarn
+ fi
+}
+
+src_prepare() {
+ rm COPYING.txt
+ cp "${FILESDIR}"/config.php .
+
+ # Moodle expect postgres7, not postgres
+ MYDB=${MYDB/postgres/postgres7}
+
+ # Moodle expects mysql, not mysqli
+ MYDB=${MYDB/mysqli/mysql}
+
+ 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} || die "Unable to 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 "\033[1;32m**************************************************\033[1;32m"
+ einfo
+ einfo "To see the post install instructions, do"
+ einfo
+ einfo " webapp-config --show-postinst ${PN} ${PVR}"
+ einfo
+ einfo "\033[1;32m**************************************************\033[1;32m"
+ einfo
+}
diff --git a/www-apps/moodle/moodle-2.1.1.ebuild b/www-apps/moodle/moodle-2.1.1.ebuild
new file mode 100644
index 000000000000..a5b934ebec80
--- /dev/null
+++ b/www-apps/moodle/moodle-2.1.1.ebuild
@@ -0,0 +1,139 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.1.1.ebuild,v 1.1 2011/08/02 09:55:37 blueness Exp $
+
+EAPI="2"
+
+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 ~ppc ~ppc64 ~sparc ~x86"
+#SLOT empty due to webapp
+
+DB_FLAGS="mysqli?,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_52="ctype,curl,iconv,json,pcre,simplexml,spl,xml,zip"
+PHP_OPTIONAL_FLAGS_52_A="gd,soap,ssl,tokenizer,xmlrpc"
+PHP_OPTIONAL_FLAGS_52_B="gd-external,soap,ssl,tokenizer,xmlrpc"
+PHP_FLAGS_52_A="${PHP_REQUIRED_FLAGS_52},${PHP_OPTIONAL_FLAGS_52_A}"
+PHP_FLAGS_52_B="${PHP_REQUIRED_FLAGS_52},${PHP_OPTIONAL_FLAGS_52_B}"
+
+PHP_REQUIRED_FLAGS_53="ctype,curl,iconv,json,simplexml,xml,zip"
+PHP_OPTIONAL_FLAGS_53_A="gd,intl,soap,ssl,tokenizer,xmlrpc"
+PHP_OPTIONAL_FLAGS_53_B="gd-external,intl,soap,ssl,tokenizer,xmlrpc"
+PHP_FLAGS_53_A="${PHP_REQUIRED_FLAGS_53},${PHP_OPTIONAL_FLAGS_53_A}"
+PHP_FLAGS_53_B="${PHP_REQUIRED_FLAGS_53},${PHP_OPTIONAL_FLAGS_53_B}"
+
+IUSE="${DB_TYPES} ${AUTHENTICATION_MODES} vhosts"
+
+# No forced dependency on
+# mysql? ( virtual/mysql )
+# postgres? ( dev-db/postgresql-server-7* )
+# which may live on another server
+DEPEND=""
+RDEPEND="
+ || (
+ =dev-lang/php-5.2*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_52_A}]
+ =dev-lang/php-5.2*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_52_B}]
+ =dev-lang/php-5.3*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_53_A}]
+ =dev-lang/php-5.3*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_53_B}]
+ )
+ 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 "\033[1;31m**************************************************\033[1;31m"
+ eerror "No database selected in your USE flags,"
+ eerror "You must select at least one."
+ eerror "\033[1;31m**************************************************\033[1;31m"
+ eerror
+ die
+ fi
+
+ if [[ ${DB_COUNT} -gt 1 ]]; then
+ MYDB=""
+ ewarn
+ ewarn "\033[1;33m**************************************************\033[1;33m"
+ ewarn "Multiple databases selected in your USE flags,"
+ ewarn "You will have to choose your database manually."
+ ewarn "\033[1;33m**************************************************\033[1;33m"
+ ewarn
+ fi
+}
+
+src_prepare() {
+ rm COPYING.txt
+ cp "${FILESDIR}"/config.php .
+
+ # Moodle expect postgres7, not postgres
+ MYDB=${MYDB/postgres/postgres7}
+
+ # Moodle expects mysql, not mysqli
+ MYDB=${MYDB/mysqli/mysql}
+
+ 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} || die "Unable to 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 "\033[1;32m**************************************************\033[1;32m"
+ einfo
+ einfo "To see the post install instructions, do"
+ einfo
+ einfo " webapp-config --show-postinst ${PN} ${PVR}"
+ einfo
+ einfo "\033[1;32m**************************************************\033[1;32m"
+ einfo
+}