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: ChangeLog moodle-1.9.11.ebuild moodle-2.0.2.ebuild
Date: Tue, 22 Feb 2011 16:22:23
Message-Id: 20110222162208.85A2B20057@flycatcher.gentoo.org
1 blueness 11/02/22 16:22:08
2
3 Modified: ChangeLog
4 Added: moodle-1.9.11.ebuild moodle-2.0.2.ebuild
5 Log:
6 Version bumps.
7
8 (Portage version: 2.1.9.25/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.5 www-apps/moodle/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/ChangeLog?rev=1.5&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/ChangeLog?rev=1.5&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/ChangeLog?r1=1.4&r2=1.5
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v
20 retrieving revision 1.4
21 retrieving revision 1.5
22 diff -u -r1.4 -r1.5
23 --- ChangeLog 8 Jan 2011 23:21:15 -0000 1.4
24 +++ ChangeLog 22 Feb 2011 16:22:08 -0000 1.5
25 @@ -1,6 +1,13 @@
26 # ChangeLog for www-apps/moodle
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v 1.4 2011/01/08 23:21:15 blueness Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/ChangeLog,v 1.5 2011/02/22 16:22:08 blueness Exp $
30 +
31 +*moodle-2.0.2 (22 Feb 2011)
32 +*moodle-1.9.11 (22 Feb 2011)
33 +
34 + 22 Feb 2011; Anthony G. Basile <blueness@g.o>
35 + +moodle-1.9.11.ebuild, +moodle-2.0.2.ebuild, files/postinstall-en.txt:
36 + Version bumps.
37
38 *moodle-2.0.1 (08 Jan 2011)
39
40
41
42
43 1.1 www-apps/moodle/moodle-1.9.11.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/moodle-1.9.11.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/moodle-1.9.11.ebuild?rev=1.1&content-type=text/plain
47
48 Index: moodle-1.9.11.ebuild
49 ===================================================================
50 # Copyright 1999-2011 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-1.9.11.ebuild,v 1.1 2011/02/22 16:22:08 blueness Exp $
53
54 EAPI="2"
55
56 inherit versionator webapp
57
58 AVC=( $(get_version_components) )
59 MY_BRANCH="stable${AVC[0]}${AVC[1]}"
60
61 DESCRIPTION="The Moodle Course Management System"
62 HOMEPAGE="http://moodle.org"
63 SRC_URI="http://download.moodle.org/${MY_BRANCH}/${P}.tgz"
64 S="${WORKDIR}/${PN}"
65
66 LICENSE="GPL-2"
67 KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86"
68 #SLOT empty due to webapp
69
70 DBFLAGS="mysql?,postgres?"
71 DBTYPES=${DBFLAGS//\?/}
72 DBTYPES=${DBTYPES//,/ }
73
74 AUTHFLAGS="imap?,ldap?,odbc?"
75 AUTHMODES=${AUTHFLAGS//\?/}
76 AUTHMODES=${AUTHMODES//,/ }
77
78 PHPFLAGS="ctype,curl,gd,iconv,ssl,tokenizer,xml,xmlrpc,zlib"
79
80 IUSE="${DBTYPES} ${AUTHMODES} vhosts"
81
82 # No forced dependency on
83 # mysql? ( virtual/mysql )
84 # postgres? ( dev-db/postgresql-server-7* )
85 # which may live on another server
86 DEPEND=""
87 RDEPEND=">=dev-lang/php-4.3.0[${DBFLAGS},${AUTHFLAGS},${PHPFLAGS}]
88 virtual/httpd-php
89 virtual/cron"
90
91 pkg_setup() {
92 webapp_pkg_setup
93
94 # How many dbs were selected? If one and only one, which one is it?
95 MYDB=""
96 DBCOUNT=0
97 for db in ${DBTYPES}; do
98 if use ${db}; then
99 MYDB=${db}
100 DBCOUNT=$(($DBCOUNT+1))
101 fi
102 done
103
104 if [[ ${DBCOUNT} -eq 0 ]]; then
105 eerror
106 eerror "\033[1;31m**************************************************\033[1;31m"
107 eerror "No database selected in your USE flags,"
108 eerror "You must select at least one."
109 eerror "\033[1;31m**************************************************\033[1;31m"
110 eerror
111 die
112 fi
113
114 if [[ ${DBCOUNT} -gt 1 ]]; then
115 MYDB=""
116 ewarn
117 ewarn "\033[1;33m**************************************************\033[1;33m"
118 ewarn "Multiple databases selected in your USE flags,"
119 ewarn "You will have to choose your database manually."
120 ewarn "\033[1;33m**************************************************\033[1;33m"
121 ewarn
122 fi
123 }
124
125 src_prepare() {
126 rm COPYING.txt
127 cp "${FILESDIR}"/config.php .
128
129 #
130 # Moodle expect postgres7, not postgres
131 #
132 MYDB=${MYDB/postgres/postgres7}
133 if [[ ${DBCOUNT} -eq 1 ]] ; then
134 sed -i -e "s|mydb|${MYDB}|" config.php
135 fi
136 }
137
138 src_install() {
139 webapp_src_preinst
140
141 local MOODLEDATA="${MY_HOSTROOTDIR}"/moodle
142 dodir ${MOODLEDATA}
143 webapp_serverowned -R "${MOODLEDATA}"
144
145 local MOODLEROOT="${MY_HTDOCSDIR}"
146 insinto ${MOODLEROOT} || die "Unable to insinto ${MOODLEROOT}"
147 doins -r *
148
149 webapp_configfile "${MOODLEROOT}"/config.php
150
151 if [[ ${DBCOUNT} -eq 1 ]]; then
152 webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
153 else
154 webapp_postinst_txt en "${FILESDIR}"/postinstall-nodb-en.txt
155 fi
156
157 webapp_src_install
158 }
159
160 pkg_postinst() {
161 einfo
162 einfo "\033[1;32m**************************************************\033[1;32m"
163 einfo
164 einfo "To see the post install instructions, do"
165 einfo
166 einfo " webapp-config --show-postinst ${PN} ${PVR}"
167 einfo
168 einfo "\033[1;32m**************************************************\033[1;32m"
169 einfo
170 }
171
172
173
174 1.1 www-apps/moodle/moodle-2.0.2.ebuild
175
176 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/moodle-2.0.2.ebuild?rev=1.1&view=markup
177 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-apps/moodle/moodle-2.0.2.ebuild?rev=1.1&content-type=text/plain
178
179 Index: moodle-2.0.2.ebuild
180 ===================================================================
181 # Copyright 1999-2011 Gentoo Foundation
182 # Distributed under the terms of the GNU General Public License v2
183 # $Header: /var/cvsroot/gentoo-x86/www-apps/moodle/moodle-2.0.2.ebuild,v 1.1 2011/02/22 16:22:08 blueness Exp $
184
185 EAPI="2"
186
187 inherit versionator webapp
188
189 AVC=( $(get_version_components) )
190 MY_BRANCH="stable${AVC[0]}${AVC[1]}"
191
192 DESCRIPTION="The Moodle Course Management System"
193 HOMEPAGE="http://moodle.org"
194 SRC_URI="http://download.moodle.org/${MY_BRANCH}/${P}.tgz"
195 S="${WORKDIR}/${PN}"
196
197 LICENSE="GPL-2"
198 KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
199 #SLOT empty due to webapp
200
201 DB_FLAGS="mysqli?,postgres?"
202 DB_TYPES=${DB_FLAGS//\?/}
203 DB_TYPES=${DB_TYPES//,/ }
204
205 AUTHENTICATION_FLAGS="imap?,ldap?,odbc?"
206 AUTHENTICATION_MODES=${AUTHENTICATION_FLAGS//\?/}
207 AUTHENTICATION_MODES=${AUTHENTICATION_MODES//,/ }
208
209 PHP_REQUIRED_FLAGS_52="ctype,curl,iconv,json,pcre,simplexml,spl,xml,zip"
210 PHP_OPTIONAL_FLAGS_52="gd,soap,ssl,tokenizer,xmlrpc"
211 PHP_FLAGS_52="${PHP_REQUIRED_FLAGS_52},${PHP_OPTIONAL_FLAGS_52}"
212
213 PHP_REQUIRED_FLAGS_53="ctype,curl,iconv,json,simplexml,xml,zip"
214 PHP_OPTIONAL_FLAGS_53="gd,intl,soap,ssl,tokenizer,xmlrpc"
215 PHP_FLAGS_53="${PHP_REQUIRED_FLAGS_53},${PHP_OPTIONAL_FLAGS_53}"
216
217 IUSE="${DB_TYPES} ${AUTHENTICATION_MODES} vhosts"
218
219 # No forced dependency on
220 # mysql? ( virtual/mysql )
221 # postgres? ( dev-db/postgresql-server-7* )
222 # which may live on another server
223 DEPEND=""
224 RDEPEND="
225 || (
226 =dev-lang/php-5.2*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_52}]
227 =dev-lang/php-5.3*[${DB_FLAGS},${AUTHENTICATION_FLAGS},${PHP_FLAGS_53}]
228 )
229 virtual/httpd-php
230 virtual/cron"
231
232 pkg_setup() {
233 webapp_pkg_setup
234
235 # How many dbs were selected? If one and only one, which one is it?
236 MYDB=""
237 DB_COUNT=0
238 for db in ${DB_TYPES}; do
239 if use ${db}; then
240 MYDB=${db}
241 DB_COUNT=$(($DB_COUNT+1))
242 fi
243 done
244
245 if [[ ${DB_COUNT} -eq 0 ]]; then
246 eerror
247 eerror "\033[1;31m**************************************************\033[1;31m"
248 eerror "No database selected in your USE flags,"
249 eerror "You must select at least one."
250 eerror "\033[1;31m**************************************************\033[1;31m"
251 eerror
252 die
253 fi
254
255 if [[ ${DB_COUNT} -gt 1 ]]; then
256 MYDB=""
257 ewarn
258 ewarn "\033[1;33m**************************************************\033[1;33m"
259 ewarn "Multiple databases selected in your USE flags,"
260 ewarn "You will have to choose your database manually."
261 ewarn "\033[1;33m**************************************************\033[1;33m"
262 ewarn
263 fi
264 }
265
266 src_prepare() {
267 rm COPYING.txt
268 cp "${FILESDIR}"/config.php .
269
270 # Moodle expect postgres7, not postgres
271 MYDB=${MYDB/postgres/postgres7}
272
273 # Moodle expects mysql, not mysqli
274 MYDB=${MYDB/mysqli/mysql}
275
276 if [[ ${DB_COUNT} -eq 1 ]] ; then
277 sed -i -e "s|mydb|${MYDB}|" config.php
278 fi
279 }
280
281 src_install() {
282 webapp_src_preinst
283
284 local MOODLEDATA="${MY_HOSTROOTDIR}"/moodle
285 dodir ${MOODLEDATA}
286 webapp_serverowned -R "${MOODLEDATA}"
287
288 local MOODLEROOT="${MY_HTDOCSDIR}"
289 insinto ${MOODLEROOT} || die "Unable to insinto ${MOODLEROOT}"
290 doins -r *
291
292 webapp_configfile "${MOODLEROOT}"/config.php
293
294 if [[ ${DB_COUNT} -eq 1 ]]; then
295 webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt
296 else
297 webapp_postinst_txt en "${FILESDIR}"/postinstall-nodb-en.txt
298 fi
299
300 webapp_src_install
301 }
302
303 pkg_postinst() {
304 einfo
305 einfo "\033[1;32m**************************************************\033[1;32m"
306 einfo
307 einfo "To see the post install instructions, do"
308 einfo
309 einfo " webapp-config --show-postinst ${PN} ${PVR}"
310 einfo
311 einfo "\033[1;32m**************************************************\033[1;32m"
312 einfo
313 }