diff options
author | Anthony G. Basile <blueness@gentoo.org> | 2013-09-08 16:43:14 +0000 |
---|---|---|
committer | Anthony G. Basile <blueness@gentoo.org> | 2013-09-08 16:43:14 +0000 |
commit | 1011e2a3f0a41d131dbf2b7333d1733c8b8d6076 (patch) | |
tree | e8a792755c69a14cfcfe96f0994c3dd8042def4c /www-apps/moodle | |
parent | Add stlink support to 0.6.1 ebuild per #482162 (diff) | |
download | historical-1011e2a3f0a41d131dbf2b7333d1733c8b8d6076.tar.gz historical-1011e2a3f0a41d131dbf2b7333d1733c8b8d6076.tar.bz2 historical-1011e2a3f0a41d131dbf2b7333d1733c8b8d6076.zip |
Version bumps, remove deprecated 2.2 branch
Package-Manager: portage-2.1.12.2/cvs/Linux x86_64
Manifest-Sign-Key: 0xF52D4BBA
Diffstat (limited to 'www-apps/moodle')
-rw-r--r-- | www-apps/moodle/ChangeLog | 10 | ||||
-rw-r--r-- | www-apps/moodle/Manifest | 36 | ||||
-rw-r--r-- | www-apps/moodle/moodle-2.3.9.ebuild (renamed from www-apps/moodle/moodle-2.2.11.ebuild) | 2 | ||||
-rw-r--r-- | www-apps/moodle/moodle-2.4.6.ebuild | 128 | ||||
-rw-r--r-- | www-apps/moodle/moodle-2.5.2.ebuild | 128 |
5 files changed, 286 insertions, 18 deletions
diff --git a/www-apps/moodle/ChangeLog b/www-apps/moodle/ChangeLog index 6e1a0c0bc354..ce7d1325b122 100644 --- a/www-apps/moodle/ChangeLog +++ b/www-apps/moodle/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for www-apps/moodle # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v 1.46 2013/07/28 23:56:01 blueness Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v 1.47 2013/09/08 16:43:03 blueness Exp $ + +*moodle-2.3.9 (08 Sep 2013) +*moodle-2.5.2 (08 Sep 2013) +*moodle-2.4.6 (08 Sep 2013) + + 08 Sep 2013; Anthony G. Basile <blueness@gentoo.org> +moodle-2.3.9.ebuild, + +moodle-2.4.6.ebuild, +moodle-2.5.2.ebuild, -moodle-2.2.11.ebuild: + Version bumps, remove deprecated 2.2 branch 28 Jul 2013; Anthony G. Basile <blueness@gentoo.org> moodle-2.5.1.ebuild: Fix dependence on php, bug #478186 diff --git a/www-apps/moodle/Manifest b/www-apps/moodle/Manifest index 3f2c4e233f18..177af9a8c9c2 100644 --- a/www-apps/moodle/Manifest +++ b/www-apps/moodle/Manifest @@ -4,30 +4,34 @@ Hash: SHA256 AUX config.php 718 SHA256 c62a37c0d81043ee4ca7fc4d7610d19dc2df426d556eb3285d7b1fe367a44a8d SHA512 38347d3a275397074abe3cc8cd1521c7fe2deb45f4702d7a8a3e3c30ab6e2c1c51fa2c1f58d7fc99f0b72f2dcd243b8dcfdd7b3641c22c41399705aab6b59479 WHIRLPOOL 51daeca50711e6cda7ef3703be71fd59bd7abeb2bfa4b0c7b42924dea5d0cbb9d4fac478aeb13bc655d097bbed3ddb99e35e43c6b2f800cabcf916142996bbb8 AUX postinstall-en.txt 6524 SHA256 dad8831abc23179ebcd2c2431f11d83346c142175c59da47cf5f913c928de667 SHA512 bb3e5187db6be49707801cfde15ebced065f2d4b8c1a04fef2f4ced0a67dab2440b8e79d110685056cad84647f8ebb587c697452df8e2b0eab07b015d01b92cf WHIRLPOOL 6ed4f9db76238db6e0a2afd98b8877a1de4e06311d77a6153bb9d8bbc559fd226190c7bf4a8053e35000fcb24babf154021a42d1b58ba92c3ee86bb5dfae1894 AUX postinstall-nodb-en.txt 171 SHA256 f39ff660a1cafbbd96ce18c46f056450ace04df5ac401eeccaf16441d54f3b6a SHA512 b0cf4787351f904caf06573c5bc50275b6a11361170b4006acc24224f44efde69cfe3a9b6340d6787c5805c605dc89f07072bf992b0ee255c97fba90e5d5617e WHIRLPOOL 3f91b917e8c92866d570c0af2dabbb11eb6bdf7d4cf3e9e8984649b5c147736f267156c490ab51fcd7fda9e7b3ac2ead8259231b20e74e349fb143ed44b08616 -DIST moodle-2.2.11.tgz 24563836 SHA256 bf278714d074d0c3a4a6797b5c8560dc5f95d2c331e0683d29c2a6e2d92f5d43 SHA512 a447d98545fe8ebbab351815014a029af9b1ffa899b2cc808ebe995bd575519ffc3e72cfd92d65c35383054d1aff2cef2ec1c903ae33c83ebacd984b809b6d98 WHIRLPOOL 06a3de9a6a72eecece719f81cdd1876ff79da98e307157e363c9d0d25f65edb5a7c88679c7e421c9980c38140ee09ecffb1e18e153fae51ef57f122ac0bbb079 DIST moodle-2.3.8.tgz 28283396 SHA256 7e119d5fa46de6d254f1ee3c1402e60b08ba9ddb112c302470c4f24720a35571 SHA512 def840728ab3df50ee9175b235436f3fd951855db6a40ffe3817d3f1695953847a89273a0b4358cc45079fd7905e3a4443a5ebcfa593d7c05bd9b6d4e547a3b1 WHIRLPOOL cc5e3acdc8c4742be4b70737ed993bfd8e891ad184aa57e5502cbfbc526b9a63cef50914cdc4dfdb794b7149b2cb3c89b4e0731f36c61502029852e4b9659be9 +DIST moodle-2.3.9.tgz 28294017 SHA256 5a6467f7e2ad6b2d61df76389af13b691694e417762906dff5fc886a211a1573 SHA512 cb14da103630119f774a3d73067773a696d0892b04589adc3a0376048efc31c584d297ac9bfe266ce5c52088a9ffa81947ce0ed34a9168b2dbbf2c46d2f897c1 WHIRLPOOL 8ded48bc91a77235fdf936e69eac0e5633d506611984ad84b813e3734f609d424d2648f0207475c9ea11493b7269ee2697614ef8d58fe583e49e1bd90d5ea439 DIST moodle-2.4.5.tgz 30435468 SHA256 f1f29b6b76222d022f924e3d9da29fe91316535ab3ec3251f715dd3b2c481b4d SHA512 26c19fa8711439681f4fdaa826087a503a6bdd4222b254568aa7bf455b23f4324d2f196f831f016b4ac5ed00aa42683593109d9df03a8c629bc4d5a7c3979a25 WHIRLPOOL c9af4d74da9b9c2093fc08e79b3e7fbeecb3b1f893ce230f48601cf9686471c63e41e195c201bf89c4b3542cb6286e34878a1dd492ec9948c381e4132faf262e +DIST moodle-2.4.6.tgz 30455947 SHA256 7de616da3a14135f53d22838b1294018df47e389205cbbdb4dafb7b6af3c98e4 SHA512 335ed818da10b5e74f0e377472d3ce3e22f1fc66b4d670ca0165d6ebf3f9c1adeeeed8b34d591072e93cba2bd980f67f1e84cd6b4defdb8813442357a033df41 WHIRLPOOL 70268323853f337b06071f542533ffc58ae76a21e4a03e3cea57fa0c202225b7cf9527d8ed9e7456e1ea7d2197b852bf8ed366fe2a052f08e075d6bb0257a3d1 DIST moodle-2.5.1.tgz 31884008 SHA256 7bb285ba3537334fd3d996b26c84cfa4a08ade2709e598e854ff78b3ba7621ad SHA512 c4c08c63abae2c256fb7b5037ee96a032251fdf10df36ed74d813a767dbd8cc79ec7e5c7a715d9be193d0125d662138294664a69d08d7f288c53b60d849ef82b WHIRLPOOL c8d7b8e8172eca449bed5f75d797ff981968bf8500be51909bcaf68044846fc21932d499110e3ee16ab9d978ca9f155bed89d15be45ed6ad75d9e75400787e52 -EBUILD moodle-2.2.11.ebuild 3376 SHA256 b77e6e23106b9061debc14cfd21f2075eec1a03bba802504d56654d98a17063f SHA512 430f719b8812460daf2bae2bc8631d17248c7f69cfd9e819f2081fc5ef810093be76d3919d1ec7b38e7527ea3006e0ee3b351fab4d908ef35aac1b59bf4f680d WHIRLPOOL bd00700d381988a01b645de7e8c6798079f32a9d9113200d5b902d2aabebc428d8cffb61fae3d0ede9c799f58c9e866a19f4507165262e21963865d617359b55 +DIST moodle-2.5.2.tgz 31927126 SHA256 e07e00ea48c62c76f0fa05eccf394632e14b790c3449f135573a56888f89cd95 SHA512 b44cf2de1aeb167843e14a46bc87dbc14fb779cfc81d4d1f1d2de01447d5265da4396a24b2aa116cc73f61aa7c4985ce4192696f0d8870f800c9773235219af7 WHIRLPOOL c8299bf5ade04a35f0ff82345abf7035f3155801c3f369d10dae2038251b5c68d6ba9a82cc9793b505b0aa828def0aeaf1804073b0f0678e1cda49f950f2aef0 EBUILD moodle-2.3.8.ebuild 3375 SHA256 d3c0cd0d46cfb061b9866bbfb266fbe957eb99d546e796d11703b906e41a423b SHA512 b627fbc35d14341e6debc9c0a007f1d0b58c5e4469077dc1fbe71a41ba3f27fd3f32d5fb10b572406b9e5dc82b8629bad36ddea5003527e9e0e9f43d9ae043db WHIRLPOOL 37d13da28f4d69c0ff555b6d76be7ec2c25fb1abc0ed2cae77a9fa8bcca42d751ba80c1ff91928a1ee2d8ecce8674f02134e16d1ddf2d89ecd880ede271fe43c +EBUILD moodle-2.3.9.ebuild 3375 SHA256 9a6570ec4bd26c26a318efa3e64dcf814f58232752e0fa65461c65bb1ad2e762 SHA512 6086fe74610fc962a29ebc15e880a5a06cc1f6a2f48dc038396de95c06c5135dcf0701e1a702cdb00c671b3263cf08a70258b238ce779514f01ee744c51e5fe1 WHIRLPOOL fc110f4e39edc1f92bf70256e75e8710ebbad271637b0d1bec57ca47b68a4d91cba6e89445da7b59ff3fa9eef163d3c62c5aaa38c600ff7fce33e05b4cbac101 EBUILD moodle-2.4.5.ebuild 3357 SHA256 6135e84ea12c5112e5fc51853d5d91a123d59f7fa4a880d5396a3dc7e8b7db03 SHA512 621d18a2771db5327b40c4d002cfef7c546233eccc4f6333fc71508f6bbc3ae2c41884a6d770a15762945496421f51159cf6bbb8cdf5fee7dc61a421d1bc1f0e WHIRLPOOL b92aa6b9f7d2ebc6d7d5c33a2eb8d16133f3cfb7160a6b6e0a3262fadf792f7863508ec94413fe00adf5879b28a2482233e2b92973e7dbdabecf4d8cd44a867d +EBUILD moodle-2.4.6.ebuild 3357 SHA256 d76f4f53f85e90d929971e46d56a7bc79b95959eb5e9e811785c78beac6a9981 SHA512 df45610fcf10174b72b43859d38c2fd4d073640d3f72190ab54da6dc62d6dbef3a127665ffaf31ac1942756f020afd0414aff7577d5de622d0a6c9ba7cedc2f2 WHIRLPOOL 2fdb07879d6f3c40764f0ad8b21e608e5a2dc034a96ab02213590f8154d7493bd785853ef2d5b61ad0ae37be3bbdab47301eb07284f80100f2d13b25575fc289 EBUILD moodle-2.5.1.ebuild 3359 SHA256 c27c335ba575f60d03d8a673b4602a70d90b37a8551e9efed5c87f2d749ef1e0 SHA512 865d675943c3150982ba805fd9f1f80a6817e5bc4c8056d931d353562b6a1f3ab7eb5196b9be037c4a41c3b933fd75e29b9fdc9c29817e787d870b90c58a7655 WHIRLPOOL f70a84309a51a2e714df935769f267acba65735ed82b9907df936a10c23a4bb596dafc16077eecccfab9ab576782c0f4797f1bf01a9c489a20960ec3f5fb877a -MISC ChangeLog 9721 SHA256 3d0df755efa52f9903aefcea1a6dadc2b73bab1922ca3fc52093363be86103dd SHA512 dd478486b688947abf51968ad6feb9998eb839828d3c3ae6ab11cb40cb4e2fee86ee72d51f2a7fb0266e917152a537de46a4eb580b1b1b5d8654cdc06d3e1280 WHIRLPOOL 7e52e7b99af48a0f7cbff5c763bfa032c72b986a6b6c40532d6d164d1bebe250c13ce8509c359ae159649797a566ae3e636c7414e80079db1d8e752a809978ca +EBUILD moodle-2.5.2.ebuild 3359 SHA256 8cf380a526e60a7ec4f5c5911ead70fb4492bb6367af9c759684661c5e0d6d0d SHA512 d20da35d6975133645aebaebc8de5893f0f1313705688c469cf48a8b94850d0a4eba35f95cc594a78f8de49ca76ba11444cff0de609e471c83e476f8d5b1e1c8 WHIRLPOOL 247f035274203f06b604218c20f41b9ab1fc36cca74643bcb0a352d660d3161e20fd817b969f2ddda1c6c3f05313ddf1ff16ef51265397572b5e786b6ef09461 +MISC ChangeLog 9999 SHA256 faa472b83b085de9886f1bf8ace97b2d464206e55f79b949da24f4051a957b80 SHA512 80727e6babf1daf038f1b8bcdd9b0e664d6856b76c5e281116b84c09caa418a73c82b753860c8b3a696da4efb28bb328395e8a6fb5b56500ec1070083b008b70 WHIRLPOOL a39c54d5cfc7e6d96628513ac67b45de3fef2e86251533754b4a4b9688fd413812ae05b150cad406f34c221e64b7a0735f59ea8e70e71390812ed39698fbfe02 MISC metadata.xml 256 SHA256 8230894d717ea9f2e42f9c7de54671126820f89bf05ca96ec5f03842b12378e1 SHA512 b94120ce0ef0ab704cecc6b00d1e0460fe60159b4b7d2fedeefbc9e7b0917ead1637ba2cbe598c67cb9b86d7b0874603e555333f4bba1959e228d33a4cd1b2a5 WHIRLPOOL 8269d207868c3ea1efbf1aed77209b809488b66dc46d6304401435747aa527907fd37be2887d09e116409f1dd56f235d3812a6a7898d25701131a8305a6db5c9 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) -iQIcBAEBCAAGBQJR9bA9AAoJEJOE+m71LUu6LoMP/3c0SJrzmwbZQuAhcuF6Dldw -sCdKQVnWypi6J8r6olfhSNtTGhLV5HLtga5Ebg2sJ7gDQaTMkDls6zGQr3C9SHYC -iDuJ3jsUbxnkdJe7uzjEpFO69o09jpYa9HcfZuLTWi3S58ZWHhD2Mb1jB4kKq97S -U5xowX88RetLh2NTJmiizV8kQy1m7wqjw2mxTYET2+vuKY74y1qy7ijjEhEOt0mW -u8tuMsy4P1jBeWjxb+OqoIdbcIUYSvShNyMGUdTMy8KCm3o9YwMQj6GmAfAFgmVK -q8hQoY0rPQYVKpXAI0LNIhfMSECf7k5jHtgqyKcN5jxPT6vzMYZrRvbbb0+SEiGe -3iUlBevzqiwQG6NSp0WcTcy6lARAwmaGIE9mTE7vR6nytJ3ZVpC5upvBPgfD4TpO -IcyTGNfJhCK7iusa1fiTjv0QVT94Vz5IIkLs3a85j9xMNlqqs0x8HN3b3SMg/E5e -jJvJ4kWsxebaCEsyXlXmHnAZait6YkmtaZQsuZfvz6WhtccYPvLlfHT3B7Ox0IAQ -k3/oRzSiL5cHiL4rrQFo9rtaSAx6WIZgcs6EO3GgCEZzGXlq0GxEibdylJIkHjCw -TEZ5nq2ODnz4whmOUhWurflsuxI4oE7UjW2oWIMUdXeh+/EGl7ArIgEYfK2tl58F -goVj85ZyNVpFzy/M3BHl -=DuIr +iQIcBAEBCAAGBQJSLKkpAAoJEJOE+m71LUu66C4QAILUI6c85C2OTgFDYobudrJO +JLmCXA/dU11swXQAXGnvOMmqL7bco6igvyDiW9o/ZaDoQKI6rCOjIqaCfBqC8ite +/O9ZmY6LuVfP7tjL37jdwz7DwZUoH8cQ1jKtTYc4IOAAVo+rSNnZLCuCxPyoDAxR +NGnE7WSANHRlVzOI0tEcZpVtpN8fl39CWugO3aG6Tuzox3SyMBQ+HWq7tSdjQHRu +isia2y/L6Xhpp5lElX17t3Q00GlzJDoFdOgUoFH/LXmjEpK4ALfaBLEAlRwFr8Ed +dsrgBMGJUmhSGKu0611LzXr+jgTY8V7Idwzyk5Hl082+D2fP1njP7ulZEryZ6cmh +BtVHtvCzXs48L47WKNRpljLF7iU+5ZwVHw5CLw2QeYR4f+Vc/Djwbz15OOiVZHS2 +GDkNc58SD/UAS3Daadw2qFYZgN1jp+HNKm5wGamO5KBBmDRam5pLCtqyldTGNBfE +jHNvNA0g61a8zrC396UN49l7LpUOuZNKIrLyRV02zqSCS8RSIcx0zymYWIXLBE5i +dhDJduonZnXi7H6CbvKzI+Lq5FPZBbHoQmLeJD5IzXw1+eLQRn7UmuNDIEv1VQFU +ghLsyOz37BnA+kY/1WwomHIthsq3eGo+V0IoRySasuqjuaFZLimBCVG1ngTgAS7i +q7UsTxCPAf3DZ8vWW97p +=y1rI -----END PGP SIGNATURE----- diff --git a/www-apps/moodle/moodle-2.2.11.ebuild b/www-apps/moodle/moodle-2.3.9.ebuild index 5882334c43f0..3b6a4457d256 100644 --- a/www-apps/moodle/moodle-2.2.11.ebuild +++ b/www-apps/moodle/moodle-2.3.9.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.2.11.ebuild,v 1.1 2013/07/07 17:38:17 blueness Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.3.9.ebuild,v 1.1 2013/09/08 16:43:03 blueness Exp $ EAPI="4" diff --git a/www-apps/moodle/moodle-2.4.6.ebuild b/www-apps/moodle/moodle-2.4.6.ebuild new file mode 100644 index 000000000000..2b0ea224cffe --- /dev/null +++ b/www-apps/moodle/moodle-2.4.6.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.4.6.ebuild,v 1.1 2013/09/08 16:43:03 blueness Exp $ + +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?,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 +# 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}] + 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 "\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.5.2.ebuild b/www-apps/moodle/moodle-2.5.2.ebuild new file mode 100644 index 000000000000..e94bbc9fd5e2 --- /dev/null +++ b/www-apps/moodle/moodle-2.5.2.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.5.2.ebuild,v 1.1 2013/09/08 16:43:03 blueness Exp $ + +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?,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 +# mysql? ( virtual/mysql ) +# postgres? ( dev-db/postgresql-server-7* ) +# which may live on another server +DEPEND="" +RDEPEND=" + >=dev-lang/php-5.3.3[${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 "\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 +} |