summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2012-03-12 11:34:44 +0000
committerAnthony G. Basile <blueness@gentoo.org>2012-03-12 11:34:44 +0000
commit831c843036b23094fc37d45384a0701f988c7a65 (patch)
treefa7db9cca922567de104e33eee1ae4014726c057 /www-apps
parentMask libXt-1.1.2 for bug #407889. (diff)
downloadhistorical-831c843036b23094fc37d45384a0701f988c7a65.tar.gz
historical-831c843036b23094fc37d45384a0701f988c7a65.tar.bz2
historical-831c843036b23094fc37d45384a0701f988c7a65.zip
Version bumps
Package-Manager: portage-2.1.10.44/cvs/Linux x86_64
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/moodle/ChangeLog11
-rw-r--r--www-apps/moodle/Manifest16
-rw-r--r--www-apps/moodle/moodle-1.9.17.ebuild122
-rw-r--r--www-apps/moodle/moodle-2.0.8.ebuild126
-rw-r--r--www-apps/moodle/moodle-2.1.5.ebuild126
-rw-r--r--www-apps/moodle/moodle-2.2.2.ebuild126
6 files changed, 522 insertions, 5 deletions
diff --git a/www-apps/moodle/ChangeLog b/www-apps/moodle/ChangeLog
index e4b45e5cc34e..cfb0135d8750 100644
--- a/www-apps/moodle/ChangeLog
+++ b/www-apps/moodle/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for www-apps/moodle
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v 1.20 2012/03/07 21:02:27 blueness Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v 1.21 2012/03/12 11:34:44 blueness Exp $
+
+*moodle-2.2.2 (12 Mar 2012)
+*moodle-2.1.5 (12 Mar 2012)
+*moodle-2.0.8 (12 Mar 2012)
+*moodle-1.9.17 (12 Mar 2012)
+
+ 12 Mar 2012; Anthony G. Basile <blueness@gentoo.org> +moodle-1.9.17.ebuild,
+ +moodle-2.0.8.ebuild, +moodle-2.1.5.ebuild, +moodle-2.2.2.ebuild:
+ Version bumps
07 Mar 2012; Anthony G. Basile <blueness@gentoo.org> -moodle-1.9.16.ebuild,
moodle-1.9.16-r1.ebuild, -moodle-2.0.7.ebuild, moodle-2.0.7-r1.ebuild,
diff --git a/www-apps/moodle/Manifest b/www-apps/moodle/Manifest
index b023bb0ef516..23aef55a64cf 100644
--- a/www-apps/moodle/Manifest
+++ b/www-apps/moodle/Manifest
@@ -5,19 +5,27 @@ 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.16.tgz 14052946 RMD160 4618557f3e8886010713ebfb1bbcd0042f3a1d10 SHA1 eec230b06cf94dfe45eb46e1e04dec78866d7869 SHA256 dbfc75a2fbac1b68520110989347174bd90982caa216a384190f627518bff8ac
+DIST moodle-1.9.17.tgz 14051409 RMD160 8b8b9495c2bbcf43f498b30e6aa1b284bf35b5a0 SHA1 8dc793f8189320f32363d4d8094f5076adfd699e SHA256 f721caea1a40534b26e59358dd6e9225110ffbf71406ba0209116c461318b704
DIST moodle-2.0.7.tgz 22512947 RMD160 7ab98f36da35d03aff85f74f4e3392daaecceca5 SHA1 8c2fe470bf3de2150d2ca5878b7deb4457110555 SHA256 6ac7ae83dc5827d2054ab58d6e70a980b18bb28def18704fa5831ca578c6fc12
+DIST moodle-2.0.8.tgz 22516992 RMD160 fcf6d0b9a1115ec6c83c6daf5b4100f311872e5b SHA1 1826d83370fb445b592e786471df6ee77490b06a SHA256 21793b5ba881343011822d4b170b4fce0a104a1bb0391e8754139e2e6b5d63c6
DIST moodle-2.1.4.tgz 23938102 RMD160 b6c3993cfcbecca25d2c39bac33dc37a91480055 SHA1 6d8032953d94803a92234b6fb2cc57dcfb1fbb51 SHA256 9d0fe131f6a5cee9ba98bfb5ac1dcef703bec43b77cf5f8e0d6377ea45d80cdb
+DIST moodle-2.1.5.tgz 23969954 RMD160 68cea7b0729b7dbf83170ee0c163cfc86e152f26 SHA1 f89cd907e8d60c8cb8d404a3036133efa7de6159 SHA256 2907976f1397370b189aa4f0f73b52347a525eec45c272f6a71f811d0fee4d10
DIST moodle-2.2.1.tgz 24892608 RMD160 d6d5e7c4b6c77ccee05fb794ccdfdfcb9029132e SHA1 051cdc4030b961585029302edc8417a096547c59 SHA256 863b8bc071c3999b2a61ffa86ee8fade6b4c121d4690a0fd74450648f57ac1fc
+DIST moodle-2.2.2.tgz 24930772 RMD160 54201c5574a2b147a9774bd42280e5049547366e SHA1 8fe80d63769a673460d7e31c969d9c421f9a8890 SHA256 4b316271906839a454c47edf72b00f30672c447f27b61442c8bd3d4b849348d0
EBUILD moodle-1.9.16-r1.ebuild 2986 RMD160 a839a22a6b33c7503ed524e56f04ce53058fac4e SHA1 3db4fb2ddd5d7a5bb8f5f7ece46e090e63b05c5b SHA256 ffbc5fbb58ccadabc5f2dac87ec1f438e788239d93513469e48769eefff1a9b4
+EBUILD moodle-1.9.17.ebuild 2983 RMD160 8e5ab83a1ab944c0b87f4e9a541f9e721d2f922b SHA1 c5000160ce340b060045c271590652cbbd534254 SHA256 27950e5363bb7657b33e25f71300e406c0bedf6b23fcf06e630a23149ccb2ce2
EBUILD moodle-2.0.7-r1.ebuild 3264 RMD160 ddf58ddcd6b12b01c22c6ebba1a8620a0a90d391 SHA1 968a3f803e87df0087c0760319e00103bb64dcb1 SHA256 67a827c23763c8d7cfd4f280008631ac39552e560a4ca23ede204cc864751eeb
+EBUILD moodle-2.0.8.ebuild 3261 RMD160 b3c70dab5352bdf9654774e0a4578e97ae5dc791 SHA1 3bb9606e1b4c663f8d99ffbaa553a3b0384e1490 SHA256 54d74bf28ed351cda7a07c64c35fbec4de94cddc452841b0c5ecb636e42cb582
EBUILD moodle-2.1.4-r1.ebuild 3264 RMD160 e7b589e2db1dd9a4bf404143ee343ebbd8d5a4f2 SHA1 d716dfe348854c0e23946acb5eb348ac728e6dd4 SHA256 c62ed51f3f489c61b7d18644512396447ebe9156cafdfe48e570c347cf5300dd
+EBUILD moodle-2.1.5.ebuild 3261 RMD160 600ec1ce646a01f9dac9ddcd5041531a06f0d059 SHA1 7b0ab3b52807b0d83b343d4ed876f286ea0c69c9 SHA256 15d8d3d06e3a9daf6713eb892b1b706a81335545690416884ad24f252fe2515d
EBUILD moodle-2.2.1-r1.ebuild 3264 RMD160 5adc91b4d649ca9f32d2caffa1180e81ce6ef25f SHA1 cc10311cd35e9354e083d0522b07dda8499dd743 SHA256 0ca6f2eced91f41cc95329b28a2f7abe8fb0f0e7a2cf23a9ad6133abcf76ec03
-MISC ChangeLog 4387 RMD160 e273d81f8b288897b36faeadff70e7d605e22308 SHA1 12b5d9d577a34ec89fb12f80fb0ce1fff94569bc SHA256 d0c11bba69c990446bb2a6a05700635474a499f0ad1def6fd02094f8313bac20
+EBUILD moodle-2.2.2.ebuild 3261 RMD160 634d99df25275c034583a38b459f82c23d68de37 SHA1 d65229b0c8831d1dcb17a679a201363257acc1bf SHA256 f556f005651722b7ec6c91d5381b3f93c079f405c0ad8a72f496bcd193e2994b
+MISC ChangeLog 4664 RMD160 2be4ce098e55de75a5187a346fbfb112d27fb7e4 SHA1 c9c346ffbd278520e69990198313f35c9506b9b8 SHA256 4dc550afaed6ec4a6865dfb33f597be06453409114d895afe33d812be0d1355f
MISC metadata.xml 256 RMD160 7cd5a16a6eade95f71d40edbb4729baadfbc7649 SHA1 809eeef12d97ae39db024aea151a70c7363475b7 SHA256 8230894d717ea9f2e42f9c7de54671126820f89bf05ca96ec5f03842b12378e1
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
-iEYEAREIAAYFAk9XzO4ACgkQl5yvQNBFVTW26ACcCit8SN23FPaq1iKlM+z82SIi
-Ai4AniyJ0/RxjT6yG+fC/uJOCwlayw/T
-=E1wP
+iEYEAREIAAYFAk9d30sACgkQl5yvQNBFVTV3lQCfZXLixBdphIAINPNePuJgEzQS
+MaIAoI90jXnKRLIE4QsDEfEfcTfdCDZw
+=+/Dm
-----END PGP SIGNATURE-----
diff --git a/www-apps/moodle/moodle-1.9.17.ebuild b/www-apps/moodle/moodle-1.9.17.ebuild
new file mode 100644
index 000000000000..e971092e2e57
--- /dev/null
+++ b/www-apps/moodle/moodle-1.9.17.ebuild
@@ -0,0 +1,122 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-1.9.17.ebuild,v 1.1 2012/03/12 11:34:44 blueness Exp $
+
+EAPI="4"
+
+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="ctype,curl,gd,iconv,session,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}]
+ 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[00m"
+ eerror "No database selected in your USE flags,"
+ eerror "You must select at least one."
+ eerror "\033[1;31m**************************************************\033[00m"
+ eerror
+ die
+ fi
+
+ if [[ ${DB_COUNT} -gt 1 ]]; then
+ MYDB=""
+ ewarn
+ ewarn "\033[1;33m**************************************************\033[00m"
+ ewarn "Multiple databases selected in your USE flags,"
+ ewarn "You will have to choose your database manually."
+ ewarn "\033[1;33m**************************************************\033[00m"
+ 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}
+ 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[00m"
+ einfo
+ einfo "To see the post install instructions, do"
+ einfo
+ einfo " webapp-config --show-postinst ${PN} ${PVR}"
+ einfo
+ einfo "\033[1;32m**************************************************\033[00m"
+ einfo
+}
diff --git a/www-apps/moodle/moodle-2.0.8.ebuild b/www-apps/moodle/moodle-2.0.8.ebuild
new file mode 100644
index 000000000000..3ed4af8df7c8
--- /dev/null
+++ b/www-apps/moodle/moodle-2.0.8.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.0.8.ebuild,v 1.1 2012/03/12 11:34:44 blueness Exp $
+
+EAPI="4"
+
+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_53="ctype,curl,iconv,json,session,simplexml,xml,zip"
+PHP_OPTIONAL_FLAGS_53="gd,intl,soap,ssl,tokenizer,xmlrpc"
+PHP_FLAGS_53="${PHP_REQUIRED_FLAGS_53},${PHP_OPTIONAL_FLAGS_53}"
+
+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.3*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_53}]
+ 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[00m"
+ eerror "No database selected in your USE flags,"
+ eerror "You must select at least one."
+ eerror "\033[1;31m**************************************************\033[00m"
+ eerror
+ die
+ fi
+
+ if [[ ${DB_COUNT} -gt 1 ]]; then
+ MYDB=""
+ ewarn
+ ewarn "\033[1;33m**************************************************\033[00m"
+ ewarn "Multiple databases selected in your USE flags,"
+ ewarn "You will have to choose your database manually."
+ ewarn "\033[1;33m**************************************************\033[00m"
+ 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}
+ 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[00m"
+ einfo
+ einfo "To see the post install instructions, do"
+ einfo
+ einfo " webapp-config --show-postinst ${PN} ${PVR}"
+ einfo
+ einfo "\033[1;32m**************************************************\033[00m"
+ einfo
+}
diff --git a/www-apps/moodle/moodle-2.1.5.ebuild b/www-apps/moodle/moodle-2.1.5.ebuild
new file mode 100644
index 000000000000..518a23842c70
--- /dev/null
+++ b/www-apps/moodle/moodle-2.1.5.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.1.5.ebuild,v 1.1 2012/03/12 11:34:44 blueness Exp $
+
+EAPI="4"
+
+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_53="ctype,curl,iconv,json,session,simplexml,xml,zip"
+PHP_OPTIONAL_FLAGS_53="gd,intl,soap,ssl,tokenizer,xmlrpc"
+PHP_FLAGS_53="${PHP_REQUIRED_FLAGS_53},${PHP_OPTIONAL_FLAGS_53}"
+
+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.3*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_53}]
+ 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[00m"
+ eerror "No database selected in your USE flags,"
+ eerror "You must select at least one."
+ eerror "\033[1;31m**************************************************\033[00m"
+ eerror
+ die
+ fi
+
+ if [[ ${DB_COUNT} -gt 1 ]]; then
+ MYDB=""
+ ewarn
+ ewarn "\033[1;33m**************************************************\033[00m"
+ ewarn "Multiple databases selected in your USE flags,"
+ ewarn "You will have to choose your database manually."
+ ewarn "\033[1;33m**************************************************\033[00m"
+ 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}
+ 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[00m"
+ einfo
+ einfo "To see the post install instructions, do"
+ einfo
+ einfo " webapp-config --show-postinst ${PN} ${PVR}"
+ einfo
+ einfo "\033[1;32m**************************************************\033[00m"
+ einfo
+}
diff --git a/www-apps/moodle/moodle-2.2.2.ebuild b/www-apps/moodle/moodle-2.2.2.ebuild
new file mode 100644
index 000000000000..f0d057d333a9
--- /dev/null
+++ b/www-apps/moodle/moodle-2.2.2.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.2.2.ebuild,v 1.1 2012/03/12 11:34:44 blueness Exp $
+
+EAPI="4"
+
+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_53="ctype,curl,iconv,json,session,simplexml,xml,zip"
+PHP_OPTIONAL_FLAGS_53="gd,intl,soap,ssl,tokenizer,xmlrpc"
+PHP_FLAGS_53="${PHP_REQUIRED_FLAGS_53},${PHP_OPTIONAL_FLAGS_53}"
+
+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.3*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_53}]
+ 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[00m"
+ eerror "No database selected in your USE flags,"
+ eerror "You must select at least one."
+ eerror "\033[1;31m**************************************************\033[00m"
+ eerror
+ die
+ fi
+
+ if [[ ${DB_COUNT} -gt 1 ]]; then
+ MYDB=""
+ ewarn
+ ewarn "\033[1;33m**************************************************\033[00m"
+ ewarn "Multiple databases selected in your USE flags,"
+ ewarn "You will have to choose your database manually."
+ ewarn "\033[1;33m**************************************************\033[00m"
+ 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}
+ 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[00m"
+ einfo
+ einfo "To see the post install instructions, do"
+ einfo
+ einfo " webapp-config --show-postinst ${PN} ${PVR}"
+ einfo
+ einfo "\033[1;32m**************************************************\033[00m"
+ einfo
+}