summaryrefslogtreecommitdiff
path: root/www-apps
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-11-15 17:13:45 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-11-15 17:13:45 +0000
commite2d84e38284aeb9d522a7e935554340ddf0e4a6f (patch)
tree5a7444ee5f2af59431481999f729676090b1e0f3 /www-apps
parent519e4d5d99fc43d5c9a038098c029dc4ef9d6792 (diff)
gentoo resync : 15.11.2017
Diffstat (limited to 'www-apps')
-rw-r--r--www-apps/gitea/Manifest2
-rw-r--r--www-apps/gitea/gitea-1.2.3.ebuild71
-rw-r--r--www-apps/moodle/Manifest14
-rw-r--r--www-apps/moodle/moodle-3.1.9.ebuild (renamed from www-apps/moodle/moodle-3.1.8.ebuild)0
-rw-r--r--www-apps/moodle/moodle-3.2.6.ebuild (renamed from www-apps/moodle/moodle-3.2.5.ebuild)0
-rw-r--r--www-apps/moodle/moodle-3.3.3.ebuild (renamed from www-apps/moodle/moodle-3.3.2.ebuild)0
-rw-r--r--www-apps/moodle/moodle-3.4.ebuild123
7 files changed, 204 insertions, 6 deletions
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
index 1f493bf4fbbe..7780ef10c735 100644
--- a/www-apps/gitea/Manifest
+++ b/www-apps/gitea/Manifest
@@ -3,6 +3,8 @@ AUX gitea.initd 681 SHA256 d54242e9f1f8854f97cc0acf47242a2ace8ee388c9af7d152ef83
AUX gitea.logrotated 87 SHA256 19538aff00c6ad5377df593391f33f59b28333ebe7a95eb9848ce663a6f7c9ba SHA512 798f3fc33026f19dd31ffa78b9b1ed313d7b82b19c047f509e896c1798b2925a1bb7c4998d98a6b47e728979bf7132fb1c2a80eb7fda096a763d6791631cb6d4 WHIRLPOOL 7d8d3dea943948757803a4091a6950a2f9b2859570ee5783bf524c248557e72625042ecdaa9d694177c9a6e3e942dacf5a06e1298994ba009269d3417c299026
DIST gitea-1.1.4.tar.gz 13018104 SHA256 36ac983bb3b3f7b1edb8a86acbd6f73f3fabcd2ecf1554b86fe212318b4234d7 SHA512 4427c4c1a588dcf201f707c3e2827fd702a0f8c0add63c6a5eff0d6ef8d21fdaaaf275f8e790017751f161431d563df22f71a6ea046085f9fb1d57da99f20524 WHIRLPOOL 14ad4d092348f8058ccb2438a9bca4dd3223305a9e8575aac808ef5bf15d1b27fc8c54b6a0b890244fe28761c31a633c7050d77b63410086fb1e03cba3e3d569
DIST gitea-1.2.2.tar.gz 14326451 SHA256 865f4c7c785de15cf496d58088b10aa84c4d260ebc9ae8b0cfb8cfa2001a96d8 SHA512 a0efca25a13d157c5d56308f6febdc7b70e5438a74f68de76a44444dac1f38cec3e3c4484c7f69c3773ffff0d6790ab2da29e1d9198d65a84c1802c9848fb2a5 WHIRLPOOL 35eedc2556b80f8468086d5cfffe38b2959baa316a95e14daa27fad7b564510f249a56b0df651a71ab92feb0aa8a759164af00833de5a3e5d937a425a6551056
+DIST gitea-1.2.3.tar.gz 14336812 SHA256 cea707156393a52bc77cb493467b7f04c8b6e7d1fd92cd775a8b587f9c35340e SHA512 b519bb2fae20da75444a9cb971ab1db0aed04261c6522464feb2e0bad28bc5b8fff3ce8a85f8d26e9cfe79b41c29e540b3ff0aa0c3e99ce90e9e9a1ec26a165e WHIRLPOOL 512cc1b05792ec070f7a8d3427e53121eae535dbd7ddc1795908b85a20f11ebc19ec0e3f21ec73d50b233fd466dc0fdb7fcc67a5df913cf88c34b66fc314b7fd
EBUILD gitea-1.1.4.ebuild 2450 SHA256 4b51128b604e09398d5d3f8d5ad571b12f1606566ca3713b409ebb4a2803ad99 SHA512 4d86c3afe45be17bda6d2818b68e7337b744e564acbe1e6c448da766a438e7279fef8932874cd9c885f388382e21fc540d81b8256ef2e2e629e7f5b7536ad354 WHIRLPOOL 659198061e9f8216608a399c5453ab5e82606f18d1432d20791bb45062dbbf7188f5c9696967f9d1358b795052261eeda4a46a07152c5bb2b04e7c2c1b925f9d
EBUILD gitea-1.2.2.ebuild 2450 SHA256 9d5c76701ebce68c044e9dc214dc244cb0baa1bb36a16fdb21749772cc8782ab SHA512 6c2af2db4b1067b548f6affe27e11b266a8287db84920b95c2165b97ed263cc2af19311fc8105d28130494f828865237482d686ec42f5935d5859ed9b317b22e WHIRLPOOL 87d57d54b2ba8915fc55a21e51080192a0bdc9912f3bb9ce91318b04d3443f2a17a6ae9a01dae2e0761530e4a6ae995aaca2c862acc259de80cc6469707d406e
+EBUILD gitea-1.2.3.ebuild 2450 SHA256 c74a056c8c6e4ecd49ccba67433423a0822978a4b385d110d5a0ab79d6330a43 SHA512 f873a3a5f85ff38331e21eb14efe3e2db57bc68ef4d831d214a8aecfe48b101629909408db916614d80d72ea54afe4e93774db7d83b3d2d8baeaef485656cb7f WHIRLPOOL 9815285063b351ecc5b68f345d0a2d263285dc7306d1988f50c71afc468e6457be0b85b1f56521b259979afac3187c48b55098bd50ade277357c0fc2ef1c08e1
MISC metadata.xml 324 SHA256 cf95cc2d754abaf77062d71409b6cb4bc9cd630637518db74d8f8af0bfa1effd SHA512 7b0e56ffe4652157a5126ae7cb7cc6b557ec8367dac02c28f69243181147855dc0e96fe09dd7ff507052a7f5382445deb98090175e06d030fe635990812820ee WHIRLPOOL 4694b3b159f487e2fbeccadd34cb56080888a5422fd8bd0c39db9e18b82bbd0ea1772ba6c2a068968f80c02babd74780e158b790b9b2d260d0ff466a2808e3db
diff --git a/www-apps/gitea/gitea-1.2.3.ebuild b/www-apps/gitea/gitea-1.2.3.ebuild
new file mode 100644
index 000000000000..7aa9e07d1af9
--- /dev/null
+++ b/www-apps/gitea/gitea-1.2.3.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+inherit user golang-build golang-vcs-snapshot
+
+EGO_PN="code.gitea.io/gitea"
+GIT_COMMIT="09bd057"
+ARCHIVE_URI="https://github.com/go-gitea/gitea/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+KEYWORDS="~amd64 ~arm"
+
+DESCRIPTION="A painless self-hosted Git service, written in Go"
+HOMEPAGE="https://github.com/go-gitea/gitea"
+SRC_URI="${ARCHIVE_URI}"
+
+LICENSE="MIT"
+SLOT="0"
+IUSE=""
+
+DEPEND="dev-go/go-bindata"
+RDEPEND="dev-vcs/git"
+
+pkg_setup() {
+ enewgroup git
+ enewuser git -1 /bin/bash /var/lib/gitea git
+}
+
+src_prepare() {
+ default
+ local GITEA_PREFIX=${EPREFIX}/var/lib/gitea
+ sed -i -e "s/git rev-parse --short HEAD/echo ${GIT_COMMIT}/"\
+ -e "s/\"main.Version.*$/\"main.Version=${PV}\"/"\
+ -e "s/-ldflags '-s/-ldflags '/" src/${EGO_PN}/Makefile || die
+ sed -i -e "s#^APP_DATA_PATH = data#APP_DATA_PATH = ${GITEA_PREFIX}/data#"\
+ -e "s#^PATH = data/gitea.db#PATH = ${GITEA_PREFIX}/data/gitea.db#"\
+ -e "s#^PROVIDER_CONFIG = data/sessions#PROVIDER_CONFIG = ${GITEA_PREFIX}/data/sessions#"\
+ -e "s#^AVATAR_UPLOAD_PATH = data/avatars#AVATAR_UPLOAD_PATH = ${GITEA_PREFIX}/data/avatars#"\
+ -e "s#^TEMP_PATH = data/tmp/uploads#TEMP_PATH = ${GITEA_PREFIX}/data/tmp/uploads#"\
+ -e "s#^PATH = data/attachments#PATH = ${GITEA_PREFIX}/data/attachments#"\
+ -e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#"\
+ -e "s#^ISSUE_INDEXER_PATH =#ISSUE_INDEXER_PATH = ${GITEA_PREFIX}/indexers/issues.bleve#"\
+ src/${EGO_PN}/conf/app.ini || die
+}
+
+src_compile() {
+ GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/${EGO_PN} generate
+ TAGS="bindata pam sqlite" LDFLAGS="" CGO_LDFLAGS="-fno-PIC" GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)" emake -C src/${EGO_PN} build
+}
+
+src_install() {
+ pushd src/${EGO_PN} || die
+ dobin gitea
+ insinto /var/lib/gitea/conf
+ newins conf/app.ini app.ini.example
+ popd || die
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/gitea.logrotated gitea
+ newinitd "${FILESDIR}"/gitea.initd gitea
+ newconfd "${FILESDIR}"/gitea.confd gitea
+ keepdir /var/log/gitea /var/lib/gitea/data
+ fowners -R git:git /var/log/gitea /var/lib/gitea/
+}
+
+pkg_postinst() {
+ if [[ ! -e ${EROOT}/var/lib/gitea/conf/app.ini ]]; then
+ elog "No app.ini found, copying the example over"
+ cp "${EROOT}"/var/lib/gitea/conf/app.ini{.example,} || die
+ else
+ elog "app.ini found, please check example file for possible changes"
+ fi
+}
diff --git a/www-apps/moodle/Manifest b/www-apps/moodle/Manifest
index 70df4d868470..d7283ebb91d3 100644
--- a/www-apps/moodle/Manifest
+++ b/www-apps/moodle/Manifest
@@ -2,12 +2,14 @@ AUX config-r1.php 1780 SHA256 b97d05c5701dda71fd8edd62b38c9f0d2c9d8b35fb8700d3b0
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-3.1.8.tgz 38015937 SHA256 5209cdda1eaf3f88eb7e9eb852217ad5918607077251dab7fe29f088c76db35d SHA512 e35912f10fa98bdb0e392f2020fa48c21d077608a6877f4a35c019c34963cc14522664f6bf88a7e98f01e42d0c171c9dbd2f4403d330baab321645fdb1d60fe2 WHIRLPOOL f31973f6845203bad40d6cad6ab560263fa972a38d697d4bd8fae85d10ab63474472055365d90f1566c97cf299efcfeb07d7913af8b5e9660e2e8689c8689d41
-DIST moodle-3.2.5.tgz 39902419 SHA256 53a381988fc0aa0169c4e2af2364406614bc3cf0948631a1f3008df3ccbfa3c4 SHA512 f1773d0c118c4e0952ce2606d6982af2641d13d4a4d6630d8a4cb4d5ccaee6c8ecd8fb9d596e7b0947c3ca893efdd5ea4baf35b52832f71c021703b9cbfe2f4c WHIRLPOOL 7c9d48d6c0a28a47e6dd6f848cf07cf36efcc0b7ca2c5bd5e566213ac7928567afbec4e222ac01e56eb496acb6cd665c235ff84ce551d569f4f5a2114848bfb8
-DIST moodle-3.3.2.tgz 44171663 SHA256 1a34c8e85d05bb693a1f4f5e70b63f527cac655101236ab1e474aa295843fbf1 SHA512 58b97f3e8f9f5c8956acce77be1e75dcc49ca27bb7032bdc70e386d6dc39dfc843b450ade27061a547f766073ec21564767af50140ac18915ab6cf92a0250973 WHIRLPOOL b69714dae5305f140a6beb441414b79ee5040e58fd8e60e2c958314b5758dd352fdbfaf3e3df38dc2e3185494474eaabee83ad7e51e4fb19eda35996b696e9e5
-EBUILD moodle-3.1.8.ebuild 2938 SHA256 8d3c9fb81b567167c73879b281dd7aae053c20d18c349c040373e7cd7f5485bb SHA512 23ecf21df367beff9762d4c5c68b405b80093c39803aeced955a0e8b57e721b1dd130bc61a79e60c684aba03ab0e93c119e1556e91aaeac68a12c48dfe82d1ab WHIRLPOOL 4c58da7fcf33ec298c719865ed1f9c3f6f2c6004440f82a1f1a6347a091954d4b1b2fce2a03228202c913940971c1ed80caf77a684a1aded75e1d0046594d02f
-EBUILD moodle-3.2.5.ebuild 2938 SHA256 b56a953c19cba3208774fe3d0fac7ad972022ada1da09bdf7673838ae67090b9 SHA512 3fafaef718e9069a1487643e2ba3f2274755d1463b11b13bcf35fdaebcce0eddad6267d1c097af983dec514845fcb4d924ba35fda6a824745b9c86aa83d0a3d4 WHIRLPOOL 849b3ccab219c56c6dbbcba719a6517aa7507bd33d9b997367efc6fee418f5d2d22dd4d7cac857bc720b18801e53a029c8a41ef80acc5dd5ed62a8a0dca92f1c
-EBUILD moodle-3.3.2.ebuild 2952 SHA256 de68154143d4a6f1cbfab0a47424ced8bbf438bb2b03ff82d7661631086d0747 SHA512 21597a42153160cef4a7e5c1ae7cc59ad319a5b61afaf5f2bd372d8ef4848f0d1d57e3f729246f3f03266278c437b757255697dcbc1dad90be35203f0874aa2d WHIRLPOOL 767ddbe80771941052bb4fce8858b17e446b6d2c3e43ab053a6ae81c9220335b7831af574383498c861ed9ef57f22631eb0eadf086b4db557aad90138179becd
+DIST moodle-3.1.9.tgz 38020777 SHA256 6c4b0afb71a96c9d0f532783e826ddc3f74df583b6c72fc30835c7f466f10be6 SHA512 c65e7373db49f98fe4493b9f6aa39bee46c2d49dd3b4cf1bad82e28a71a9932fff2ac24e9a1b9562d66deca28e354da41cd7c282ffba942f50c2b849ef003aef WHIRLPOOL ad586ec1132e340b0128c927b89f6d310dc66760e03bd6cfe98bca4cee078481ddaa3ad718eb6cd3ab67ec07e6b7dc26bac35e489b06f32cc3e1c40e1b380592
+DIST moodle-3.2.6.tgz 40314104 SHA256 d5372913c4b4920e55fdf16d93f6902d0517d30b10eb8f54c2912c927105f02c SHA512 afeacaf965ca6d80c7c4121ba4a74c15f1255175d0a4b056bd59e738180ff80dc431587ed98897602527a39f1f9a32a76a2dbd868445ba901fb8b7c0c3c48096 WHIRLPOOL 682ed6d551b68ce448282ba47201a6a7a149a84ab4190dfedd79d61a51daa1b13db1ad6c2030f5bf3eb3bc0e1dd80fbfad2045bc219230b50347bf564de248d9
+DIST moodle-3.3.3.tgz 44238027 SHA256 2c7acf7b8011bfb958ea558e6c33f2f5ccc95cf3f57a90f85d57303a8f766066 SHA512 9d0097b081b4f6ad4e5d4951696d552bf097e22f807bcf9ad3112388716fcc16ca4c5bd79074739689205c8f193901874f892b29f15c1cf4545cdcc38fc7c4c7 WHIRLPOOL 39c4fe73faca6092d0b9f71493ae7f441d2e4e30b1e38015f6c30645dce6a3ef0ee35429b8d3187bb6f5d532836c2f9beb2eb8efa8360f1f037a889f9fd98703
+DIST moodle-3.4.tgz 44875575 SHA256 06888238944d951009f19d2705c2fe8ed64fe6f5e526310f52646a4129612277 SHA512 72cc62864c7b8020af5b48d7af47afe763ce593f96749d149c3dcfd39f9eb3f8de383bc4684c6591ad5ad157c85f0ffea54eb70489e8312b8b09c63a73f32dba WHIRLPOOL 211118a71cac3ac412d246058112c50dc3708e14f07508a72e698b663124739a32035ba127a51288d3568af583620d26a77167a8950a3601b6cc0342a649c427
+EBUILD moodle-3.1.9.ebuild 2938 SHA256 8d3c9fb81b567167c73879b281dd7aae053c20d18c349c040373e7cd7f5485bb SHA512 23ecf21df367beff9762d4c5c68b405b80093c39803aeced955a0e8b57e721b1dd130bc61a79e60c684aba03ab0e93c119e1556e91aaeac68a12c48dfe82d1ab WHIRLPOOL 4c58da7fcf33ec298c719865ed1f9c3f6f2c6004440f82a1f1a6347a091954d4b1b2fce2a03228202c913940971c1ed80caf77a684a1aded75e1d0046594d02f
+EBUILD moodle-3.2.6.ebuild 2938 SHA256 b56a953c19cba3208774fe3d0fac7ad972022ada1da09bdf7673838ae67090b9 SHA512 3fafaef718e9069a1487643e2ba3f2274755d1463b11b13bcf35fdaebcce0eddad6267d1c097af983dec514845fcb4d924ba35fda6a824745b9c86aa83d0a3d4 WHIRLPOOL 849b3ccab219c56c6dbbcba719a6517aa7507bd33d9b997367efc6fee418f5d2d22dd4d7cac857bc720b18801e53a029c8a41ef80acc5dd5ed62a8a0dca92f1c
+EBUILD moodle-3.3.3.ebuild 2952 SHA256 de68154143d4a6f1cbfab0a47424ced8bbf438bb2b03ff82d7661631086d0747 SHA512 21597a42153160cef4a7e5c1ae7cc59ad319a5b61afaf5f2bd372d8ef4848f0d1d57e3f729246f3f03266278c437b757255697dcbc1dad90be35203f0874aa2d WHIRLPOOL 767ddbe80771941052bb4fce8858b17e446b6d2c3e43ab053a6ae81c9220335b7831af574383498c861ed9ef57f22631eb0eadf086b4db557aad90138179becd
+EBUILD moodle-3.4.ebuild 2950 SHA256 646911f56ee0ac91226df8cff183524f4e0621d704aaf33a6fd06820e3f7ea76 SHA512 b9e712db50c5de3bccaac98820b08f0e72cd67d090be396b5e6d03b9b4096d635d6301d85f679dddfa9adf6605fb460e6db70ef4a55ba3ec19a369f6fa6a84c0 WHIRLPOOL a19a2b95b776e71c6be6076e8da8f2d8101cc1d06e6b7e680284258cea14d0cd46acfb85ac2a88c66190d18c39a6b375f05daaa6d84f958849f39ff876a57280
MISC ChangeLog 7896 SHA256 6183f3a0804cc92846de2339dd60ff161ca606fa7be90da9313d3fb4c4fddc42 SHA512 222887f0493de055e1c8e49dc03bc69f30b555dfce2045a9f63f1269c11dafbe76482132e69716cf1caef2a9837159b462934dd29c29e5c169782c6a1e97319a WHIRLPOOL 9a85ab66a99824f3f7c03f71ad70bb2deff922f50abf3d4a83d135cd18e556db25f06ade0792e1512ee666632f85bf0c2fd90369d51083c71ab2bc0f1536b330
MISC ChangeLog-2015 15602 SHA256 45d1f3f87b701e5d375ada783942fc71d9177e4a556529c26023a46ca854f3d4 SHA512 e8015060bac7193532bf3e07838d98343aa4cbc16ac17aaa4ee8ea14ea523e1a13a314de9fbbd8387c6b5efe3e30f61801d88a67fe2c0f32b816bd60bed523d4 WHIRLPOOL be463e538a949e84f839e6914a6a85910cb67238bc05c6f6e591c2bebc1dd967f610c1edec541938a53138d2218588072eae1c4b6829f9e2bae3ccadc38bd88c
MISC metadata.xml 355 SHA256 c08ccdedfceddf97da2e834f710935dd59f46048c9d7fb825dea53fcbe8c7a8d SHA512 f02e5404a714cb20207e494f635fb0e98870576c4b5f6affc4dc27fccfcabdd1af1c7411a83cfd4e01b51ecc24d11944d1e612757ff45ab4405f6099ed9b1278 WHIRLPOOL a641aebe6ebee8f61064622cc7caf8e2d75c2df10426b6c3a49d3a379f7e8ec5fc99a57bd6856ecbb9966e49101b3d55725ae6328871621d6fd4f4dc4ced7135
diff --git a/www-apps/moodle/moodle-3.1.8.ebuild b/www-apps/moodle/moodle-3.1.9.ebuild
index c64ab1ffbc71..c64ab1ffbc71 100644
--- a/www-apps/moodle/moodle-3.1.8.ebuild
+++ b/www-apps/moodle/moodle-3.1.9.ebuild
diff --git a/www-apps/moodle/moodle-3.2.5.ebuild b/www-apps/moodle/moodle-3.2.6.ebuild
index 37b176d93c22..37b176d93c22 100644
--- a/www-apps/moodle/moodle-3.2.5.ebuild
+++ b/www-apps/moodle/moodle-3.2.6.ebuild
diff --git a/www-apps/moodle/moodle-3.3.2.ebuild b/www-apps/moodle/moodle-3.3.3.ebuild
index 4c2d978ef8a6..4c2d978ef8a6 100644
--- a/www-apps/moodle/moodle-3.3.2.ebuild
+++ b/www-apps/moodle/moodle-3.3.3.ebuild
diff --git a/www-apps/moodle/moodle-3.4.ebuild b/www-apps/moodle/moodle-3.4.ebuild
new file mode 100644
index 000000000000..01e29039a3f8
--- /dev/null
+++ b/www-apps/moodle/moodle-3.4.ebuild
@@ -0,0 +1,123 @@
+# Copyright 1999-2017 Gentoo Foundation
+# 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="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?,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.0[${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
+}