Gentoo Archives: gentoo-commits

From: "Anthony G. Basile (blueness)" <blueness@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-apps/moodle: moodle-2.1.7.ebuild moodle-2.0.10.ebuild moodle-1.9.19.ebuild moodle-2.3.1.ebuild ChangeLog moodle-2.2.4.ebuild
Date: Fri, 06 Jul 2012 09:28:06
Message-Id: 20120706092748.D09D92004B@flycatcher.gentoo.org
1 blueness 12/07/06 09:27:48
2
3 Modified: ChangeLog
4 Added: moodle-2.1.7.ebuild moodle-2.0.10.ebuild
5 moodle-1.9.19.ebuild moodle-2.3.1.ebuild
6 moodle-2.2.4.ebuild
7 Log:
8 Version bump
9
10 (Portage version: 2.1.10.65/cvs/Linux x86_64)
11
12 Revision Changes Path
13 1.26 www-apps/moodle/ChangeLog
14
15 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/ChangeLog?rev=1.26&view=markup
16 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/ChangeLog?rev=1.26&content-type=text/plain
17 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/ChangeLog?r1=1.25&r2=1.26
18
19 Index: ChangeLog
20 ===================================================================
21 RCS file: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v
22 retrieving revision 1.25
23 retrieving revision 1.26
24 diff -u -r1.25 -r1.26
25 --- ChangeLog 26 Jun 2012 14:55:03 -0000 1.25
26 +++ ChangeLog 6 Jul 2012 09:27:48 -0000 1.26
27 @@ -1,6 +1,17 @@
28 # ChangeLog for www-apps/moodle
29 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
30 -# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v 1.25 2012/06/26 14:55:03 blueness Exp $
31 +# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v 1.26 2012/07/06 09:27:48 blueness Exp $
32 +
33 +*moodle-2.3.1 (06 Jul 2012)
34 +*moodle-2.2.4 (06 Jul 2012)
35 +*moodle-2.1.7 (06 Jul 2012)
36 +*moodle-2.0.10 (06 Jul 2012)
37 +*moodle-1.9.19 (06 Jul 2012)
38 +
39 + 06 Jul 2012; Anthony G. Basile <blueness@g.o> +moodle-1.9.19.ebuild,
40 + +moodle-2.0.10.ebuild, +moodle-2.1.7.ebuild, +moodle-2.2.4.ebuild,
41 + +moodle-2.3.1.ebuild:
42 + Version bump
43
44 *moodle-2.3 (26 Jun 2012)
45
46
47
48
49 1.1 www-apps/moodle/moodle-2.1.7.ebuild
50
51 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/moodle-2.1.7.ebuild?rev=1.1&view=markup
52 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/moodle-2.1.7.ebuild?rev=1.1&content-type=text/plain
53
54 Index: moodle-2.1.7.ebuild
55 ===================================================================
56 # Copyright 1999-2012 Gentoo Foundation
57 # Distributed under the terms of the GNU General Public License v2
58 # $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.1.7.ebuild,v 1.1 2012/07/06 09:27:48 blueness Exp $
59
60 EAPI="4"
61
62 inherit versionator webapp
63
64 AVC=( $(get_version_components) )
65 MY_BRANCH="stable${AVC[0]}${AVC[1]}"
66
67 DESCRIPTION="The Moodle Course Management System"
68 HOMEPAGE="http://moodle.org"
69 SRC_URI="http://download.moodle.org/${MY_BRANCH}/${P}.tgz"
70 S="${WORKDIR}/${PN}"
71
72 LICENSE="GPL-2"
73 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
74 #SLOT empty due to webapp
75
76 DB_FLAGS="mysqli?,postgres?"
77 DB_TYPES=${DB_FLAGS//\?/}
78 DB_TYPES=${DB_TYPES//,/ }
79
80 AUTHENTICATION_FLAGS="imap?,ldap?,odbc?"
81 AUTHENTICATION_MODES=${AUTHENTICATION_FLAGS//\?/}
82 AUTHENTICATION_MODES=${AUTHENTICATION_MODES//,/ }
83
84 PHP_REQUIRED_FLAGS_53="ctype,curl,iconv,json,session,simplexml,xml,zip"
85 PHP_OPTIONAL_FLAGS_53="gd,intl,soap,ssl,tokenizer,xmlrpc"
86 PHP_FLAGS_53="${PHP_REQUIRED_FLAGS_53},${PHP_OPTIONAL_FLAGS_53}"
87
88 IUSE="${DB_TYPES} ${AUTHENTICATION_MODES} vhosts"
89
90 # No forced dependency on
91 # mysql? ( virtual/mysql )
92 # postgres? ( dev-db/postgresql-server-7* )
93 # which may live on another server
94 DEPEND=""
95 RDEPEND="
96 =dev-lang/php-5.3*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_53}]
97 virtual/httpd-php
98 virtual/cron"
99
100 pkg_setup() {
101 webapp_pkg_setup
102
103 # How many dbs were selected? If one and only one, which one is it?
104 MYDB=""
105 DB_COUNT=0
106 for db in ${DB_TYPES}; do
107 if use ${db}; then
108 MYDB=${db}
109 DB_COUNT=$(($DB_COUNT+1))
110 fi
111 done
112
113 if [[ ${DB_COUNT} -eq 0 ]]; then
114 eerror
115 eerror "\033[1;31m**************************************************\033[00m"
116 eerror "No database selected in your USE flags,"
117 eerror "You must select at least one."
118 eerror "\033[1;31m**************************************************\033[00m"
119 eerror
120 die
121 fi
122
123 if [[ ${DB_COUNT} -gt 1 ]]; then
124 MYDB=""
125 ewarn
126 ewarn "\033[1;33m**************************************************\033[00m"
127 ewarn "Multiple databases selected in your USE flags,"
128 ewarn "You will have to choose your database manually."
129 ewarn "\033[1;33m**************************************************\033[00m"
130 ewarn
131 fi
132 }
133
134 src_prepare() {
135 rm COPYING.txt
136 cp "${FILESDIR}"/config.php .
137
138 # Moodle expect postgres7, not postgres
139 MYDB=${MYDB/postgres/postgres7}
140
141 # Moodle expects mysql, not mysqli
142 MYDB=${MYDB/mysqli/mysql}
143
144 if [[ ${DB_COUNT} -eq 1 ]] ; then
145 sed -i -e "s|mydb|${MYDB}|" config.php
146 fi
147 }
148
149 src_install() {
150 webapp_src_preinst
151
152 local MOODLEDATA="${MY_HOSTROOTDIR}"/moodle
153 dodir ${MOODLEDATA}
154 webapp_serverowned -R "${MOODLEDATA}"
155
156 local MOODLEROOT="${MY_HTDOCSDIR}"
157 insinto ${MOODLEROOT}
158 doins -r *
159
160 webapp_configfile "${MOODLEROOT}"/config.php
161
162 if [[ ${DB_COUNT} -eq 1 ]]; then
163 webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
164 else
165 webapp_postinst_txt en "${FILESDIR}"/postinstall-nodb-en.txt
166 fi
167
168 webapp_src_install
169 }
170
171 pkg_postinst() {
172 einfo
173 einfo "\033[1;32m**************************************************\033[00m"
174 einfo
175 einfo "To see the post install instructions, do"
176 einfo
177 einfo " webapp-config --show-postinst ${PN} ${PVR}"
178 einfo
179 einfo "\033[1;32m**************************************************\033[00m"
180 einfo
181 }
182
183
184
185 1.1 www-apps/moodle/moodle-2.0.10.ebuild
186
187 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/moodle-2.0.10.ebuild?rev=1.1&view=markup
188 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/moodle-2.0.10.ebuild?rev=1.1&content-type=text/plain
189
190 Index: moodle-2.0.10.ebuild
191 ===================================================================
192 # Copyright 1999-2012 Gentoo Foundation
193 # Distributed under the terms of the GNU General Public License v2
194 # $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.0.10.ebuild,v 1.1 2012/07/06 09:27:48 blueness Exp $
195
196 EAPI="4"
197
198 inherit versionator webapp
199
200 AVC=( $(get_version_components) )
201 MY_BRANCH="stable${AVC[0]}${AVC[1]}"
202
203 DESCRIPTION="The Moodle Course Management System"
204 HOMEPAGE="http://moodle.org"
205 SRC_URI="http://download.moodle.org/${MY_BRANCH}/${P}.tgz"
206 S="${WORKDIR}/${PN}"
207
208 LICENSE="GPL-2"
209 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
210 #SLOT empty due to webapp
211
212 DB_FLAGS="mysqli?,postgres?"
213 DB_TYPES=${DB_FLAGS//\?/}
214 DB_TYPES=${DB_TYPES//,/ }
215
216 AUTHENTICATION_FLAGS="imap?,ldap?,odbc?"
217 AUTHENTICATION_MODES=${AUTHENTICATION_FLAGS//\?/}
218 AUTHENTICATION_MODES=${AUTHENTICATION_MODES//,/ }
219
220 PHP_REQUIRED_FLAGS_53="ctype,curl,iconv,json,session,simplexml,xml,zip"
221 PHP_OPTIONAL_FLAGS_53="gd,intl,soap,ssl,tokenizer,xmlrpc"
222 PHP_FLAGS_53="${PHP_REQUIRED_FLAGS_53},${PHP_OPTIONAL_FLAGS_53}"
223
224 IUSE="${DB_TYPES} ${AUTHENTICATION_MODES} vhosts"
225
226 # No forced dependency on
227 # mysql? ( virtual/mysql )
228 # postgres? ( dev-db/postgresql-server-7* )
229 # which may live on another server
230 DEPEND=""
231 RDEPEND="
232 =dev-lang/php-5.3*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_53}]
233 virtual/httpd-php
234 virtual/cron"
235
236 pkg_setup() {
237 webapp_pkg_setup
238
239 # How many dbs were selected? If one and only one, which one is it?
240 MYDB=""
241 DB_COUNT=0
242 for db in ${DB_TYPES}; do
243 if use ${db}; then
244 MYDB=${db}
245 DB_COUNT=$(($DB_COUNT+1))
246 fi
247 done
248
249 if [[ ${DB_COUNT} -eq 0 ]]; then
250 eerror
251 eerror "\033[1;31m**************************************************\033[00m"
252 eerror "No database selected in your USE flags,"
253 eerror "You must select at least one."
254 eerror "\033[1;31m**************************************************\033[00m"
255 eerror
256 die
257 fi
258
259 if [[ ${DB_COUNT} -gt 1 ]]; then
260 MYDB=""
261 ewarn
262 ewarn "\033[1;33m**************************************************\033[00m"
263 ewarn "Multiple databases selected in your USE flags,"
264 ewarn "You will have to choose your database manually."
265 ewarn "\033[1;33m**************************************************\033[00m"
266 ewarn
267 fi
268 }
269
270 src_prepare() {
271 rm COPYING.txt
272 cp "${FILESDIR}"/config.php .
273
274 # Moodle expect postgres7, not postgres
275 MYDB=${MYDB/postgres/postgres7}
276
277 # Moodle expects mysql, not mysqli
278 MYDB=${MYDB/mysqli/mysql}
279
280 if [[ ${DB_COUNT} -eq 1 ]] ; then
281 sed -i -e "s|mydb|${MYDB}|" config.php
282 fi
283 }
284
285 src_install() {
286 webapp_src_preinst
287
288 local MOODLEDATA="${MY_HOSTROOTDIR}"/moodle
289 dodir ${MOODLEDATA}
290 webapp_serverowned -R "${MOODLEDATA}"
291
292 local MOODLEROOT="${MY_HTDOCSDIR}"
293 insinto ${MOODLEROOT}
294 doins -r *
295
296 webapp_configfile "${MOODLEROOT}"/config.php
297
298 if [[ ${DB_COUNT} -eq 1 ]]; then
299 webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
300 else
301 webapp_postinst_txt en "${FILESDIR}"/postinstall-nodb-en.txt
302 fi
303
304 webapp_src_install
305 }
306
307 pkg_postinst() {
308 einfo
309 einfo "\033[1;32m**************************************************\033[00m"
310 einfo
311 einfo "To see the post install instructions, do"
312 einfo
313 einfo " webapp-config --show-postinst ${PN} ${PVR}"
314 einfo
315 einfo "\033[1;32m**************************************************\033[00m"
316 einfo
317 }
318
319
320
321 1.1 www-apps/moodle/moodle-1.9.19.ebuild
322
323 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/moodle-1.9.19.ebuild?rev=1.1&view=markup
324 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/moodle-1.9.19.ebuild?rev=1.1&content-type=text/plain
325
326 Index: moodle-1.9.19.ebuild
327 ===================================================================
328 # Copyright 1999-2012 Gentoo Foundation
329 # Distributed under the terms of the GNU General Public License v2
330 # $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-1.9.19.ebuild,v 1.1 2012/07/06 09:27:48 blueness Exp $
331
332 EAPI="4"
333
334 inherit versionator webapp
335
336 AVC=( $(get_version_components) )
337 MY_BRANCH="stable${AVC[0]}${AVC[1]}"
338
339 DESCRIPTION="The Moodle Course Management System"
340 HOMEPAGE="http://moodle.org"
341 SRC_URI="http://download.moodle.org/${MY_BRANCH}/${P}.tgz"
342 S="${WORKDIR}/${PN}"
343
344 LICENSE="GPL-2"
345 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
346 #SLOT empty due to webapp
347
348 DBFLAGS="mysql?,postgres?"
349 DBTYPES=${DBFLAGS//\?/}
350 DBTYPES=${DBTYPES//,/ }
351
352 AUTHFLAGS="imap?,ldap?,odbc?"
353 AUTHMODES=${AUTHFLAGS//\?/}
354 AUTHMODES=${AUTHMODES//,/ }
355
356 PHPFLAGS="ctype,curl,gd,iconv,session,ssl,tokenizer,xml,xmlrpc,zlib"
357
358 IUSE="${DBTYPES} ${AUTHMODES} vhosts"
359
360 # No forced dependency on
361 # mysql? ( virtual/mysql )
362 # postgres? ( dev-db/postgresql-server-7* )
363 # which may live on another server
364 DEPEND=""
365 RDEPEND="
366 >=dev-lang/php-4.3.0[${DBFLAGS},${AUTHFLAGS},${PHPFLAGS}]
367 virtual/httpd-php
368 virtual/cron"
369
370 pkg_setup() {
371 webapp_pkg_setup
372
373 # How many dbs were selected? If one and only one, which one is it?
374 MYDB=""
375 DB_COUNT=0
376 for db in ${DBTYPES}; do
377 if use ${db}; then
378 MYDB=${db}
379 DB_COUNT=$(($DB_COUNT+1))
380 fi
381 done
382
383 if [[ ${DB_COUNT} -eq 0 ]]; then
384 eerror
385 eerror "\033[1;31m**************************************************\033[00m"
386 eerror "No database selected in your USE flags,"
387 eerror "You must select at least one."
388 eerror "\033[1;31m**************************************************\033[00m"
389 eerror
390 die
391 fi
392
393 if [[ ${DB_COUNT} -gt 1 ]]; then
394 MYDB=""
395 ewarn
396 ewarn "\033[1;33m**************************************************\033[00m"
397 ewarn "Multiple databases selected in your USE flags,"
398 ewarn "You will have to choose your database manually."
399 ewarn "\033[1;33m**************************************************\033[00m"
400 ewarn
401 fi
402 }
403
404 src_prepare() {
405 rm COPYING.txt
406 cp "${FILESDIR}"/config.php .
407
408 #
409 # Moodle expect postgres7, not postgres
410 #
411 MYDB=${MYDB/postgres/postgres7}
412 if [[ ${DB_COUNT} -eq 1 ]] ; then
413 sed -i -e "s|mydb|${MYDB}|" config.php
414 fi
415 }
416
417 src_install() {
418 webapp_src_preinst
419
420 local MOODLEDATA="${MY_HOSTROOTDIR}"/moodle
421 dodir ${MOODLEDATA}
422 webapp_serverowned -R "${MOODLEDATA}"
423
424 local MOODLEROOT="${MY_HTDOCSDIR}"
425 insinto ${MOODLEROOT}
426 doins -r *
427
428 webapp_configfile "${MOODLEROOT}"/config.php
429
430 if [[ ${DB_COUNT} -eq 1 ]]; then
431 webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
432 else
433 webapp_postinst_txt en "${FILESDIR}"/postinstall-nodb-en.txt
434 fi
435
436 webapp_src_install
437 }
438
439 pkg_postinst() {
440 einfo
441 einfo "\033[1;32m**************************************************\033[00m"
442 einfo
443 einfo "To see the post install instructions, do"
444 einfo
445 einfo " webapp-config --show-postinst ${PN} ${PVR}"
446 einfo
447 einfo "\033[1;32m**************************************************\033[00m"
448 einfo
449 }
450
451
452
453 1.1 www-apps/moodle/moodle-2.3.1.ebuild
454
455 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/moodle-2.3.1.ebuild?rev=1.1&view=markup
456 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/moodle-2.3.1.ebuild?rev=1.1&content-type=text/plain
457
458 Index: moodle-2.3.1.ebuild
459 ===================================================================
460 # Copyright 1999-2012 Gentoo Foundation
461 # Distributed under the terms of the GNU General Public License v2
462 # $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.3.1.ebuild,v 1.1 2012/07/06 09:27:48 blueness Exp $
463
464 EAPI="4"
465
466 inherit versionator webapp
467
468 AVC=( $(get_version_components) )
469 MY_BRANCH="stable${AVC[0]}${AVC[1]}"
470
471 DESCRIPTION="The Moodle Course Management System"
472 HOMEPAGE="http://moodle.org"
473 SRC_URI="http://download.moodle.org/${MY_BRANCH}/${P}.tgz"
474 S="${WORKDIR}/${PN}"
475
476 LICENSE="GPL-2"
477 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
478 #SLOT empty due to webapp
479
480 DB_FLAGS="mysqli?,postgres?"
481 DB_TYPES=${DB_FLAGS//\?/}
482 DB_TYPES=${DB_TYPES//,/ }
483
484 AUTHENTICATION_FLAGS="imap?,ldap?,odbc?"
485 AUTHENTICATION_MODES=${AUTHENTICATION_FLAGS//\?/}
486 AUTHENTICATION_MODES=${AUTHENTICATION_MODES//,/ }
487
488 PHP_REQUIRED_FLAGS_53="ctype,curl,iconv,json,session,simplexml,xml,zip"
489 PHP_OPTIONAL_FLAGS_53="gd,intl,soap,ssl,tokenizer,xmlrpc"
490 PHP_FLAGS_53="${PHP_REQUIRED_FLAGS_53},${PHP_OPTIONAL_FLAGS_53}"
491
492 IUSE="${DB_TYPES} ${AUTHENTICATION_MODES} vhosts"
493
494 # No forced dependency on
495 # mysql? ( virtual/mysql )
496 # postgres? ( dev-db/postgresql-server-7* )
497 # which may live on another server
498 DEPEND=""
499 RDEPEND="
500 =dev-lang/php-5.3*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_53}]
501 virtual/httpd-php
502 virtual/cron"
503
504 pkg_setup() {
505 webapp_pkg_setup
506
507 # How many dbs were selected? If one and only one, which one is it?
508 MYDB=""
509 DB_COUNT=0
510 for db in ${DB_TYPES}; do
511 if use ${db}; then
512 MYDB=${db}
513 DB_COUNT=$(($DB_COUNT+1))
514 fi
515 done
516
517 if [[ ${DB_COUNT} -eq 0 ]]; then
518 eerror
519 eerror "\033[1;31m**************************************************\033[00m"
520 eerror "No database selected in your USE flags,"
521 eerror "You must select at least one."
522 eerror "\033[1;31m**************************************************\033[00m"
523 eerror
524 die
525 fi
526
527 if [[ ${DB_COUNT} -gt 1 ]]; then
528 MYDB=""
529 ewarn
530 ewarn "\033[1;33m**************************************************\033[00m"
531 ewarn "Multiple databases selected in your USE flags,"
532 ewarn "You will have to choose your database manually."
533 ewarn "\033[1;33m**************************************************\033[00m"
534 ewarn
535 fi
536 }
537
538 src_prepare() {
539 rm COPYING.txt
540 cp "${FILESDIR}"/config.php .
541
542 # Moodle expect postgres7, not postgres
543 MYDB=${MYDB/postgres/postgres7}
544
545 # Moodle expects mysql, not mysqli
546 MYDB=${MYDB/mysqli/mysql}
547
548 if [[ ${DB_COUNT} -eq 1 ]] ; then
549 sed -i -e "s|mydb|${MYDB}|" config.php
550 fi
551 }
552
553 src_install() {
554 webapp_src_preinst
555
556 local MOODLEDATA="${MY_HOSTROOTDIR}"/moodle
557 dodir ${MOODLEDATA}
558 webapp_serverowned -R "${MOODLEDATA}"
559
560 local MOODLEROOT="${MY_HTDOCSDIR}"
561 insinto ${MOODLEROOT}
562 doins -r *
563
564 webapp_configfile "${MOODLEROOT}"/config.php
565
566 if [[ ${DB_COUNT} -eq 1 ]]; then
567 webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
568 else
569 webapp_postinst_txt en "${FILESDIR}"/postinstall-nodb-en.txt
570 fi
571
572 webapp_src_install
573 }
574
575 pkg_postinst() {
576 einfo
577 einfo "\033[1;32m**************************************************\033[00m"
578 einfo
579 einfo "To see the post install instructions, do"
580 einfo
581 einfo " webapp-config --show-postinst ${PN} ${PVR}"
582 einfo
583 einfo "\033[1;32m**************************************************\033[00m"
584 einfo
585 }
586
587
588
589 1.1 www-apps/moodle/moodle-2.2.4.ebuild
590
591 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/moodle-2.2.4.ebuild?rev=1.1&view=markup
592 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/moodle-2.2.4.ebuild?rev=1.1&content-type=text/plain
593
594 Index: moodle-2.2.4.ebuild
595 ===================================================================
596 # Copyright 1999-2012 Gentoo Foundation
597 # Distributed under the terms of the GNU General Public License v2
598 # $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.2.4.ebuild,v 1.1 2012/07/06 09:27:48 blueness Exp $
599
600 EAPI="4"
601
602 inherit versionator webapp
603
604 AVC=( $(get_version_components) )
605 MY_BRANCH="stable${AVC[0]}${AVC[1]}"
606
607 DESCRIPTION="The Moodle Course Management System"
608 HOMEPAGE="http://moodle.org"
609 SRC_URI="http://download.moodle.org/${MY_BRANCH}/${P}.tgz"
610 S="${WORKDIR}/${PN}"
611
612 LICENSE="GPL-2"
613 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
614 #SLOT empty due to webapp
615
616 DB_FLAGS="mysqli?,postgres?"
617 DB_TYPES=${DB_FLAGS//\?/}
618 DB_TYPES=${DB_TYPES//,/ }
619
620 AUTHENTICATION_FLAGS="imap?,ldap?,odbc?"
621 AUTHENTICATION_MODES=${AUTHENTICATION_FLAGS//\?/}
622 AUTHENTICATION_MODES=${AUTHENTICATION_MODES//,/ }
623
624 PHP_REQUIRED_FLAGS_53="ctype,curl,iconv,json,session,simplexml,xml,zip"
625 PHP_OPTIONAL_FLAGS_53="gd,intl,soap,ssl,tokenizer,xmlrpc"
626 PHP_FLAGS_53="${PHP_REQUIRED_FLAGS_53},${PHP_OPTIONAL_FLAGS_53}"
627
628 IUSE="${DB_TYPES} ${AUTHENTICATION_MODES} vhosts"
629
630 # No forced dependency on
631 # mysql? ( virtual/mysql )
632 # postgres? ( dev-db/postgresql-server-7* )
633 # which may live on another server
634 DEPEND=""
635 RDEPEND="
636 =dev-lang/php-5.3*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_53}]
637 virtual/httpd-php
638 virtual/cron"
639
640 pkg_setup() {
641 webapp_pkg_setup
642
643 # How many dbs were selected? If one and only one, which one is it?
644 MYDB=""
645 DB_COUNT=0
646 for db in ${DB_TYPES}; do
647 if use ${db}; then
648 MYDB=${db}
649 DB_COUNT=$(($DB_COUNT+1))
650 fi
651 done
652
653 if [[ ${DB_COUNT} -eq 0 ]]; then
654 eerror
655 eerror "\033[1;31m**************************************************\033[00m"
656 eerror "No database selected in your USE flags,"
657 eerror "You must select at least one."
658 eerror "\033[1;31m**************************************************\033[00m"
659 eerror
660 die
661 fi
662
663 if [[ ${DB_COUNT} -gt 1 ]]; then
664 MYDB=""
665 ewarn
666 ewarn "\033[1;33m**************************************************\033[00m"
667 ewarn "Multiple databases selected in your USE flags,"
668 ewarn "You will have to choose your database manually."
669 ewarn "\033[1;33m**************************************************\033[00m"
670 ewarn
671 fi
672 }
673
674 src_prepare() {
675 rm COPYING.txt
676 cp "${FILESDIR}"/config.php .
677
678 # Moodle expect postgres7, not postgres
679 MYDB=${MYDB/postgres/postgres7}
680
681 # Moodle expects mysql, not mysqli
682 MYDB=${MYDB/mysqli/mysql}
683
684 if [[ ${DB_COUNT} -eq 1 ]] ; then
685 sed -i -e "s|mydb|${MYDB}|" config.php
686 fi
687 }
688
689 src_install() {
690 webapp_src_preinst
691
692 local MOODLEDATA="${MY_HOSTROOTDIR}"/moodle
693 dodir ${MOODLEDATA}
694 webapp_serverowned -R "${MOODLEDATA}"
695
696 local MOODLEROOT="${MY_HTDOCSDIR}"
697 insinto ${MOODLEROOT}
698 doins -r *
699
700 webapp_configfile "${MOODLEROOT}"/config.php
701
702 if [[ ${DB_COUNT} -eq 1 ]]; then
703 webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
704 else
705 webapp_postinst_txt en "${FILESDIR}"/postinstall-nodb-en.txt
706 fi
707
708 webapp_src_install
709 }
710
711 pkg_postinst() {
712 einfo
713 einfo "\033[1;32m**************************************************\033[00m"
714 einfo
715 einfo "To see the post install instructions, do"
716 einfo
717 einfo " webapp-config --show-postinst ${PN} ${PVR}"
718 einfo
719 einfo "\033[1;32m**************************************************\033[00m"
720 einfo
721 }