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