Gentoo Archives: gentoo-commits

From: "Miroslav Šulc" <fordfrog@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-servers/tomcat/
Date: Fri, 01 Jun 2018 09:19:26
Message-Id: 1527844721.e4a71f65206a796ee020fbd6540da52faeadfe1f.fordfrog@gentoo
1 commit: e4a71f65206a796ee020fbd6540da52faeadfe1f
2 Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 1 09:18:41 2018 +0000
4 Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 1 09:18:41 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4a71f65
7
8 www-servers/tomcat: version bumps
9
10 Package-Manager: Portage-2.3.40, Repoman-2.3.9
11
12 www-servers/tomcat/Manifest | 3 +
13 www-servers/tomcat/tomcat-7.0.88.ebuild | 147 +++++++++++++++++++++++++++++
14 www-servers/tomcat/tomcat-8.0.52.ebuild | 158 ++++++++++++++++++++++++++++++++
15 www-servers/tomcat/tomcat-8.5.31.ebuild | 158 ++++++++++++++++++++++++++++++++
16 4 files changed, 466 insertions(+)
17
18 diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest
19 index 61fd077a15f..f50dacf90f9 100644
20 --- a/www-servers/tomcat/Manifest
21 +++ b/www-servers/tomcat/Manifest
22 @@ -1,4 +1,7 @@
23 DIST apache-tomcat-7.0.85-src.tar.gz 4718223 BLAKE2B 3067709eb143feee5cc1f31cdd8d41c58fb96ed1330560a4064ac3b3eeb030c76ff066c2a2f950d6f2c1576bde214f963f1a12342536a8e2ab8ac179dd166bfb SHA512 f95383b2c77670845cce577161ecf326c3e0f49d456792a53305640289d049b0de80f4b6901bcda52bc4967895f97772591eee525affee1a1d07aac2e60d2044
24 +DIST apache-tomcat-7.0.88-src.tar.gz 4733229 BLAKE2B 2e2009f64ae8f027e93bd7f3cec21f98fbb1f5c741b6525da1638c6188ebe44aa8b43d984abd769385992a997226392c59ec059e408873261a04d9e96a4603c3 SHA512 2ad5c11ec7c5e8e68fba6c0427b0479969a56e7ccb3f0b1ee6c6f139d5f2b718ee9c56f044e982013108ee6e06c43037d0061e539203e95453e9cae7cb38711d
25 DIST apache-tomcat-8.0.50-src.tar.gz 5023017 BLAKE2B 862799b7f6a227217c93e1b65aacc49a765b6d11886d0f2278a860c3f4e2b89692cfb724e323d3afe074ad3af3ef8cfd780e4be1ad2f55fee381e5054fbb1941 SHA512 c46efe03cfaadbc2b89063c05c5ec9f315a4eeacdfbf6dd43691c3d23a87d75b23b6679550518d825f8ec7ed853a899ca88cc54c61da9983b025ec7042c3bfff
26 +DIST apache-tomcat-8.0.52-src.tar.gz 5039683 BLAKE2B 36318d0ae50fbca3f2a97e0210d0a8da8314f1ef79d0b047971bca30a5b0cc937faf013b5090f6e6b8aec4127b6185dc54ae589f5b57143b62c71c09f8bd5e9d SHA512 6d846213db0b15f9add8d80f30f304afdaf879ab6d7f85d212183a93f4f360ebfeeb079813bdea83cbd13f507504473028bbf8279e89b800b6f150b83086fa56
27 DIST apache-tomcat-8.5.30-src.tar.gz 5143270 BLAKE2B 3bdcff663ca509efc3b2ee92ce140a3a22abf7fc0e32b5fa9a0ee713bdc1065ebde0b77cf624cedc2e0893194518d10e1f5df5b2f41edf76cb61157ac4d02862 SHA512 53729cfd1859872109f816df2642e3cd776a7faf8c55b1d50df0459f12958aacbf36debe6e8f10c19ab0a5bb2973fa63a2fec57f83ecaf19f4cf9d82e4a20265
28 +DIST apache-tomcat-8.5.31-src.tar.gz 5154531 BLAKE2B cce0388e5c8c5fb5fcb3dba3b5961dc21d9f19d9a2f6177660a41410bddf241f73dda1e52c3875e28cfa13041c85a458a92c9a23c509b645f042cfa472081fde SHA512 659137ef4809af329ae4dd6f5825a603c1408ef3e48153abe7480a722e7f4bebef68a64af9cbef4a4ad9a7e8da76494f825035bbadbb983a097525f476f32f33
29 DIST apache-tomcat-9.0.7-src.tar.gz 5106551 BLAKE2B b4552146a40c2e7cbb2e454fb5ec9169425db5c08cf269c391ec3144425ad388a2b6f003a7c05f59a9fd724fb5c848102890a24fcfd43d5fea3d881141aa7798 SHA512 cb7dc5547671d94f7c7fb0b58eeb94d05128349cdabf576fc8ad837a4bf3ea655a8eab3342245dfa84a9db23f1cbee2918846eedd48e3ca372eecebfef13c5b2
30
31 diff --git a/www-servers/tomcat/tomcat-7.0.88.ebuild b/www-servers/tomcat/tomcat-7.0.88.ebuild
32 new file mode 100644
33 index 00000000000..8ed5c13fa74
34 --- /dev/null
35 +++ b/www-servers/tomcat/tomcat-7.0.88.ebuild
36 @@ -0,0 +1,147 @@
37 +# Copyright 1999-2018 Gentoo Foundation
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=6
41 +
42 +JAVA_PKG_IUSE="doc source test"
43 +
44 +inherit eutils java-pkg-2 java-ant-2 prefix user
45 +
46 +MY_P="apache-${P}-src"
47 +
48 +DESCRIPTION="Tomcat Servlet-3.0/JSP-2.2 Container"
49 +HOMEPAGE="https://tomcat.apache.org/"
50 +SRC_URI="mirror://apache/${PN}/tomcat-7/v${PV}/src/${MY_P}.tar.gz"
51 +
52 +LICENSE="Apache-2.0"
53 +SLOT="7"
54 +KEYWORDS="~amd64 ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-solaris"
55 +IUSE="extra-webapps websockets"
56 +
57 +RESTRICT="test" # can we run them on a production system?
58 +
59 +ECJ_SLOT="4.5"
60 +SAPI_SLOT="3.0"
61 +
62 +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}
63 + dev-java/tomcat-servlet-api:${SAPI_SLOT}"
64 +RDEPEND="${COMMON_DEP}
65 + virtual/jre
66 + !<dev-java/tomcat-native-1.1.24"
67 +DEPEND="${COMMON_DEP}
68 + virtual/jdk:1.8
69 + test? ( dev-java/ant-junit:0 )"
70 +
71 +S=${WORKDIR}/${MY_P}
72 +
73 +pkg_setup() {
74 + java-pkg-2_pkg_setup
75 + enewgroup tomcat 265
76 + enewuser tomcat 265 -1 /dev/null tomcat
77 +}
78 +
79 +src_prepare() {
80 + default
81 +
82 + # Remove bundled servlet-api
83 + rm -rv java/javax/{el,servlet} || die
84 +
85 + java-pkg_clean
86 +
87 + eapply "${FILESDIR}/${PN}-7.0.84-build.xml.patch"
88 +
89 + # For use of catalina.sh in netbeans
90 + sed -i -e "/^# ----- Execute The Requested Command/ a\
91 + CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \
92 + bin/catalina.sh || die
93 +
94 + java-pkg-2_src_prepare
95 +}
96 +
97 +JAVA_ANT_REWRITE_CLASSPATH="true"
98 +
99 +EANT_BUILD_TARGET="deploy"
100 +EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}"
101 +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
102 +EANT_NEEDS_TOOLS="true"
103 +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false"
104 +
105 +# revisions of the scripts
106 +IM_REV="-r1"
107 +INIT_REV="-r1"
108 +
109 +src_compile() {
110 + use websockets && EANT_EXTRA_ARGS+=" -Djava.7.home=${JAVA_HOME}"
111 + EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
112 + java-pkg-2_src_compile
113 +}
114 +
115 +src_test() {
116 + java-pkg-2_src_test
117 +}
118 +
119 +src_install() {
120 + local dest="/usr/share/${PN}-${SLOT}"
121 +
122 + java-pkg_jarinto "${dest}"/bin
123 + java-pkg_dojar output/build/bin/*.jar
124 + exeinto "${dest}"/bin
125 + doexe output/build/bin/*.sh
126 +
127 + java-pkg_jarinto "${dest}"/lib
128 + java-pkg_dojar output/build/lib/*.jar
129 +
130 + dodoc RELEASE-NOTES RUNNING.txt
131 + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api
132 + use source && java-pkg_dosrc java/*
133 +
134 + ### Webapps ###
135 +
136 + insinto "${dest}"/webapps
137 + doins -r output/build/webapps/{host-manager,manager,ROOT}
138 + use extra-webapps && doins -r output/build/webapps/{docs,examples}
139 +
140 + ### Config ###
141 +
142 + # create "logs" directory in $CATALINA_BASE
143 + # and set correct perms, see #458890
144 + dodir "${dest}"/logs
145 + fperms 0750 "${dest}"/logs
146 +
147 + # replace the default pw with a random one, see #92281
148 + local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15)
149 + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
150 +
151 + # prepend gentoo.classpath to common.loader, see #453212
152 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die
153 +
154 + insinto "${dest}"
155 + doins -r output/build/conf
156 +
157 + ### rc ###
158 +
159 + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die
160 + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash}
161 + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die
162 +
163 + insinto "${dest}"/gentoo
164 + doins "${T}"/tomcat.conf
165 + exeinto "${dest}"/gentoo
166 + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init
167 + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash
168 +}
169 +
170 +pkg_postinst() {
171 + elog "New ebuilds of Tomcat support running multiple instances. If you used prior version"
172 + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat."
173 + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat"
174 +
175 + elog "To manage Tomcat instances, run:"
176 + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help"
177 +
178 + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar"
179 + ewarn "from upstream binary if you need it. Gentoo Bug # 144276"
180 +
181 + einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and"
182 + einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information."
183 +}
184
185 diff --git a/www-servers/tomcat/tomcat-8.0.52.ebuild b/www-servers/tomcat/tomcat-8.0.52.ebuild
186 new file mode 100644
187 index 00000000000..46de488be6f
188 --- /dev/null
189 +++ b/www-servers/tomcat/tomcat-8.0.52.ebuild
190 @@ -0,0 +1,158 @@
191 +# Copyright 1999-2018 Gentoo Foundation
192 +# Distributed under the terms of the GNU General Public License v2
193 +
194 +EAPI=6
195 +
196 +JAVA_PKG_IUSE="doc source test"
197 +
198 +inherit eutils java-pkg-2 java-ant-2 prefix user
199 +
200 +MY_P="apache-${P}-src"
201 +
202 +DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1 Container"
203 +HOMEPAGE="https://tomcat.apache.org/"
204 +SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz"
205 +
206 +LICENSE="Apache-2.0"
207 +SLOT="8"
208 +KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
209 +IUSE="extra-webapps"
210 +
211 +RESTRICT="test" # can we run them on a production system?
212 +
213 +ECJ_SLOT="4.5"
214 +SAPI_SLOT="3.1"
215 +
216 +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}
217 + dev-java/tomcat-servlet-api:${SAPI_SLOT}"
218 +RDEPEND="${COMMON_DEP}
219 + !<dev-java/tomcat-native-1.1.24
220 + >=virtual/jre-1.7"
221 +DEPEND="${COMMON_DEP}
222 + app-admin/pwgen
223 + >=virtual/jdk-1.7
224 + test? (
225 + >=dev-java/ant-junit-1.9:0
226 + dev-java/easymock:3.2
227 + )"
228 +
229 +S=${WORKDIR}/${MY_P}
230 +
231 +pkg_setup() {
232 + java-pkg-2_pkg_setup
233 + enewgroup tomcat 265
234 + enewuser tomcat 265 -1 /dev/null tomcat
235 +}
236 +
237 +src_prepare() {
238 + default
239 +
240 + find -name '*.jar' -type f -delete -print || die
241 +
242 + # Remove bundled servlet-api
243 + rm -rv java/javax/{el,servlet} || die
244 +
245 + eapply "${FILESDIR}/${PN}-8.0.49-build.xml.patch"
246 +
247 + # For use of catalina.sh in netbeans
248 + sed -i -e "/^# ----- Execute The Requested Command/ a\
249 + CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \
250 + bin/catalina.sh || die
251 +
252 + java-pkg-2_src_prepare
253 +}
254 +
255 +JAVA_ANT_REWRITE_CLASSPATH="true"
256 +
257 +EANT_BUILD_TARGET="deploy"
258 +EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}"
259 +EANT_TEST_GENTOO_CLASSPATH="easymock-3.2"
260 +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
261 +EANT_NEEDS_TOOLS="true"
262 +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false"
263 +
264 +# revisions of the scripts
265 +IM_REV="-r2"
266 +INIT_REV="-r1"
267 +
268 +src_compile() {
269 + EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
270 + java-pkg-2_src_compile
271 +}
272 +
273 +src_test() {
274 + java-pkg-2_src_test
275 +}
276 +
277 +src_install() {
278 + local dest="/usr/share/${PN}-${SLOT}"
279 +
280 + java-pkg_jarinto "${dest}"/bin
281 + java-pkg_dojar output/build/bin/*.jar
282 + exeinto "${dest}"/bin
283 + doexe output/build/bin/*.sh
284 +
285 + java-pkg_jarinto "${dest}"/lib
286 + java-pkg_dojar output/build/lib/*.jar
287 +
288 + dodoc RELEASE-NOTES RUNNING.txt
289 + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api
290 + use source && java-pkg_dosrc java/*
291 +
292 + ### Webapps ###
293 +
294 + # add missing docBase
295 + local apps="host-manager manager"
296 + for app in ${apps}; do
297 + sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \
298 + output/build/webapps/${app}/META-INF/context.xml || die
299 + done
300 +
301 + insinto "${dest}"/webapps
302 + doins -r output/build/webapps/{host-manager,manager,ROOT}
303 + use extra-webapps && doins -r output/build/webapps/{docs,examples}
304 +
305 + ### Config ###
306 +
307 + # create "logs" directory in $CATALINA_BASE
308 + # and set correct perms, see #458890
309 + dodir "${dest}"/logs
310 + fperms 0750 "${dest}"/logs
311 +
312 + # replace the default pw with a random one, see #92281
313 + local randpw="$(pwgen -s -B 15 1)"
314 + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
315 +
316 + # prepend gentoo.classpath to common.loader, see #453212
317 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die
318 +
319 + insinto "${dest}"
320 + doins -r output/build/conf
321 +
322 + ### rc ###
323 +
324 + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die
325 + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash}
326 + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die
327 +
328 + insinto "${dest}"/gentoo
329 + doins "${T}"/tomcat.conf
330 + exeinto "${dest}"/gentoo
331 + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init
332 + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash
333 +}
334 +
335 +pkg_postinst() {
336 + elog "New ebuilds of Tomcat support running multiple instances. If you used prior version"
337 + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat."
338 + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat"
339 +
340 + elog "To manage Tomcat instances, run:"
341 + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help"
342 +
343 + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar"
344 + ewarn "from upstream binary if you need it. Gentoo Bug # 144276"
345 +
346 + einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and"
347 + einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information."
348 +}
349
350 diff --git a/www-servers/tomcat/tomcat-8.5.31.ebuild b/www-servers/tomcat/tomcat-8.5.31.ebuild
351 new file mode 100644
352 index 00000000000..00cb33f8cfc
353 --- /dev/null
354 +++ b/www-servers/tomcat/tomcat-8.5.31.ebuild
355 @@ -0,0 +1,158 @@
356 +# Copyright 1999-2018 Gentoo Foundation
357 +# Distributed under the terms of the GNU General Public License v2
358 +
359 +EAPI=6
360 +
361 +JAVA_PKG_IUSE="doc source test"
362 +
363 +inherit eutils java-pkg-2 java-ant-2 prefix user
364 +
365 +MY_P="apache-${P}-src"
366 +
367 +DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container"
368 +HOMEPAGE="https://tomcat.apache.org/"
369 +SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz"
370 +
371 +LICENSE="Apache-2.0"
372 +SLOT="8.5"
373 +KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
374 +IUSE="extra-webapps"
375 +
376 +RESTRICT="test" # can we run them on a production system?
377 +
378 +ECJ_SLOT="4.5"
379 +SAPI_SLOT="3.1"
380 +
381 +COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT}
382 + >=dev-java/tomcat-servlet-api-${SLOT}:${SAPI_SLOT}"
383 +RDEPEND="${COMMON_DEP}
384 + !<dev-java/tomcat-native-1.1.24
385 + >=virtual/jre-1.7"
386 +DEPEND="${COMMON_DEP}
387 + app-admin/pwgen
388 + >=virtual/jdk-1.7
389 + test? (
390 + >=dev-java/ant-junit-1.9:0
391 + dev-java/easymock:3.2
392 + )"
393 +
394 +S=${WORKDIR}/${MY_P}
395 +
396 +pkg_setup() {
397 + java-pkg-2_pkg_setup
398 + enewgroup tomcat 265
399 + enewuser tomcat 265 -1 /dev/null tomcat
400 +}
401 +
402 +src_prepare() {
403 + default
404 +
405 + find -name '*.jar' -type f -delete -print || die
406 +
407 + # Remove bundled servlet-api
408 + rm -rv java/javax/{el,servlet} || die
409 +
410 + eapply "${FILESDIR}/${PN}-8.5.27-build.xml.patch"
411 +
412 + # For use of catalina.sh in netbeans
413 + sed -i -e "/^# ----- Execute The Requested Command/ a\
414 + CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \
415 + bin/catalina.sh || die
416 +
417 + java-pkg-2_src_prepare
418 +}
419 +
420 +JAVA_ANT_REWRITE_CLASSPATH="true"
421 +
422 +EANT_BUILD_TARGET="deploy"
423 +EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}"
424 +EANT_TEST_GENTOO_CLASSPATH="easymock-3.2"
425 +EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes"
426 +EANT_NEEDS_TOOLS="true"
427 +EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false -Dexecute.validate=false"
428 +
429 +# revisions of the scripts
430 +IM_REV="-r2"
431 +INIT_REV="-r1"
432 +
433 +src_compile() {
434 + EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)"
435 + java-pkg-2_src_compile
436 +}
437 +
438 +src_test() {
439 + java-pkg-2_src_test
440 +}
441 +
442 +src_install() {
443 + local dest="/usr/share/${PN}-${SLOT}"
444 +
445 + java-pkg_jarinto "${dest}"/bin
446 + java-pkg_dojar output/build/bin/*.jar
447 + exeinto "${dest}"/bin
448 + doexe output/build/bin/*.sh
449 +
450 + java-pkg_jarinto "${dest}"/lib
451 + java-pkg_dojar output/build/lib/*.jar
452 +
453 + dodoc RELEASE-NOTES RUNNING.txt
454 + use doc && java-pkg_dojavadoc output/dist/webapps/docs/api
455 + use source && java-pkg_dosrc java/*
456 +
457 + ### Webapps ###
458 +
459 + # add missing docBase
460 + local apps="host-manager manager"
461 + for app in ${apps}; do
462 + sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \
463 + output/build/webapps/${app}/META-INF/context.xml || die
464 + done
465 +
466 + insinto "${dest}"/webapps
467 + doins -r output/build/webapps/{host-manager,manager,ROOT}
468 + use extra-webapps && doins -r output/build/webapps/{docs,examples}
469 +
470 + ### Config ###
471 +
472 + # create "logs" directory in $CATALINA_BASE
473 + # and set correct perms, see #458890
474 + dodir "${dest}"/logs
475 + fperms 0750 "${dest}"/logs
476 +
477 + # replace the default pw with a random one, see #92281
478 + local randpw="$(pwgen -s -B 15 1)"
479 + sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die
480 +
481 + # prepend gentoo.classpath to common.loader, see #453212
482 + sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die
483 +
484 + insinto "${dest}"
485 + doins -r output/build/conf
486 +
487 + ### rc ###
488 +
489 + cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die
490 + eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash}
491 + sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die
492 +
493 + insinto "${dest}"/gentoo
494 + doins "${T}"/tomcat.conf
495 + exeinto "${dest}"/gentoo
496 + newexe "${T}"/tomcat${INIT_REV}.init tomcat.init
497 + newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash
498 +}
499 +
500 +pkg_postinst() {
501 + elog "New ebuilds of Tomcat support running multiple instances. If you used prior version"
502 + elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat."
503 + elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat"
504 +
505 + elog "To manage Tomcat instances, run:"
506 + elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help"
507 +
508 + ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar"
509 + ewarn "from upstream binary if you need it. Gentoo Bug # 144276"
510 +
511 + einfo "Please read https://wiki.gentoo.org/wiki/Apache_Tomcat and"
512 + einfo "https://wiki.gentoo.org/wiki/Project:Java/Tomcat_6_Guide for more information."
513 +}