diff options
Diffstat (limited to 'www-apps')
-rw-r--r-- | www-apps/moodle/ChangeLog | 8 | ||||
-rw-r--r-- | www-apps/moodle/Manifest | 5 | ||||
-rw-r--r-- | www-apps/moodle/files/postinstall-en.txt | 8 | ||||
-rw-r--r-- | www-apps/moodle/moodle-1.9.9-r1.ebuild | 121 |
4 files changed, 137 insertions, 5 deletions
diff --git a/www-apps/moodle/ChangeLog b/www-apps/moodle/ChangeLog index cc9c86ec7d99..fe7e799efb47 100644 --- a/www-apps/moodle/ChangeLog +++ b/www-apps/moodle/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for www-apps/moodle # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v 1.1 2010/07/19 14:05:32 blueness Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v 1.2 2010/08/13 19:04:30 blueness Exp $ + +*moodle-1.9.9-r1 (13 Aug 2010) + + 13 Aug 2010; Anthony G. Basile <blueness@gentoo.org> + +moodle-1.9.9-r1.ebuild, files/postinstall-en.txt: + Ported to EAPI 2 USE deps. Bug #332165 *moodle-1.9.9 (19 Jul 2010) diff --git a/www-apps/moodle/Manifest b/www-apps/moodle/Manifest index c85abf66af70..3f7cf126dfa4 100644 --- a/www-apps/moodle/Manifest +++ b/www-apps/moodle/Manifest @@ -1,7 +1,8 @@ AUX config.php 718 RMD160 9e4b97aafca65da8648466d11728c457fff439ab SHA1 d71fc86158e82f706ca2cdfe1efe2e8de62cc607 SHA256 c62a37c0d81043ee4ca7fc4d7610d19dc2df426d556eb3285d7b1fe367a44a8d -AUX postinstall-en.txt 4855 RMD160 f0c6dd27094e53bdadf21c4f3489b9d7802b68b7 SHA1 7e8be07898d76910b23c7b28cc3a82decfc8ee15 SHA256 e6d7f05a462eb2e23dc2b7d7226bff8c3acfc0624c38b90b5fdb1816b2f09c1d +AUX postinstall-en.txt 4959 RMD160 6a8a6d2b3205d9c7e7e87907c9d91d203071d1ab SHA1 768be257b43cdb43da8f4e11bba04bbd47ebd364 SHA256 75abb103eb3aeb71d7688580873c05c295f42dd5624bf18d0cf15759bf022434 AUX postinstall-nodb-en.txt 171 RMD160 88ff71d95c63f1b5d76e398c3566ada75954cdf4 SHA1 26748e5f24207ef5cb145e3668e1f17cdcddf699 SHA256 f39ff660a1cafbbd96ce18c46f056450ace04df5ac401eeccaf16441d54f3b6a DIST moodle-1.9.9.tgz 14017622 RMD160 a44406d71829c88d5ad21a3368b62c76c420c7e7 SHA1 936eaa405cef8722c31f6a0a385fee7fa9999919 SHA256 20e16da64c70f61c4c49f08aa359499a4ef500c3f8de477dc70721c07b8ec49d +EBUILD moodle-1.9.9-r1.ebuild 2989 RMD160 024a627adb5e66375197355e0023623d67a91abf SHA1 c48d6ec8cd0e83db1ccf4015ee126d9a2c9800c1 SHA256 cd58281cf72b2eb0e892e8e7ad7452519b9e53fc487fbbb66bc18bc3d2cfa238 EBUILD moodle-1.9.9.ebuild 2993 RMD160 136c99c12160d195ed2f20ec2477f9af45bb85e4 SHA1 ff62ae9fcc4c94d6e20dabc543c873e0297e7ddf SHA256 1c420d8cf32105b7cc0486410a7dc528253cef54ae9496651cf1e7354d84ec2d -MISC ChangeLog 456 RMD160 380fa2689a6f1159fb97837756451dfe73a91eb0 SHA1 8a3d9b767d850404c5bf1895454e4d6844f37c9c SHA256 b8f894db43c7171b31a4e08ccc1c4cace8a969429b1792542c8997f11df4a3e6 +MISC ChangeLog 638 RMD160 156f85d0ae2a4327c206d43193aa9c34007e910d SHA1 c22fd7a3d120735dbd8d2410775303c1d56e8706 SHA256 a7dcda3a309f789174b2513d8996a07be2e8c393e96e38f7898b76becdc8c77a MISC metadata.xml 256 RMD160 7cd5a16a6eade95f71d40edbb4729baadfbc7649 SHA1 809eeef12d97ae39db024aea151a70c7363475b7 SHA256 8230894d717ea9f2e42f9c7de54671126820f89bf05ca96ec5f03842b12378e1 diff --git a/www-apps/moodle/files/postinstall-en.txt b/www-apps/moodle/files/postinstall-en.txt index 5fe772f27e38..c46bfcc25eb4 100644 --- a/www-apps/moodle/files/postinstall-en.txt +++ b/www-apps/moodle/files/postinstall-en.txt @@ -5,7 +5,9 @@ NEW INSTALLS see a directory in there called moodle. If it didn't install it manually: - webapp-config -d moodle -I moodle 1.9.9 + webapp-config -d moodle -I moodle X.Y.Z + + Replace X.Y.Z with whatever version you just emerged. 1 Edit the config.php file found at @@ -49,7 +51,9 @@ NEW INSTALLS psql -c "create database moodle_db with encoding 'unicode';" -U moodle_user template1 psql -c "alter user moodle_user nocreatedb;" template1 su - root - /etc/init.d/postgresql-8.4 reload + /etc/init.d/postgresql-X.Y reload + + Replace X.Y with your version postgresql. NOTE: Moodle docs say that moodle only works with postgresql-7, but I've used it with 8 no problems. diff --git a/www-apps/moodle/moodle-1.9.9-r1.ebuild b/www-apps/moodle/moodle-1.9.9-r1.ebuild new file mode 100644 index 000000000000..2265cc72b499 --- /dev/null +++ b/www-apps/moodle/moodle-1.9.9-r1.ebuild @@ -0,0 +1,121 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-1.9.9-r1.ebuild,v 1.1 2010/08/13 19:04:30 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="~amd64 ~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,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="" + DBCOUNT=0 + for db in ${DBTYPES}; do + if use ${db}; then + MYDB=${db} + DBCOUNT=$(($DBCOUNT+1)) + fi + done + + if [[ ${DBCOUNT} -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 [[ ${DBCOUNT} -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 [[ ${DBCOUNT} -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 [[ ${DBCOUNT} -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 +} |