1 |
commit: 202b44b3f90b48b7256f09476c234e35cf95ba8d |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed May 25 20:09:55 2016 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed May 25 20:10:14 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=202b44b3 |
7 |
|
8 |
www-servers/tomcat: version bump |
9 |
|
10 |
Package-Manager: portage-2.3.0_rc1 |
11 |
|
12 |
www-servers/tomcat/Manifest | 1 + |
13 |
.../tomcat/files/tomcat-8.0.35-build.xml.patch | 265 +++++++++++++++++++++ |
14 |
www-servers/tomcat/tomcat-8.0.35.ebuild | 154 ++++++++++++ |
15 |
3 files changed, 420 insertions(+) |
16 |
|
17 |
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest |
18 |
index 31d766f..3eb7012 100644 |
19 |
--- a/www-servers/tomcat/Manifest |
20 |
+++ b/www-servers/tomcat/Manifest |
21 |
@@ -3,4 +3,5 @@ DIST apache-tomcat-7.0.68-src.tar.gz 4641238 SHA256 abb5d2cc7e34a18f968ec2535bde |
22 |
DIST apache-tomcat-7.0.69-src.tar.gz 4653637 SHA256 fd29dc7ecd4796a693fdd7fc568ef4fde91debfd22f50a8d7d1676c018cf330b SHA512 14025071497dd3d1b601958297dcce5f4e4d2ec192ece3484fcdedfe0ca8d5e9a37941e8db857e90716c73484a2415c0aadc9334a292d8a15b5181dda23b05ce WHIRLPOOL 1713fdfcffcc454d9b04cdd108b14cb49daf790f60a607fba22d828183f3f8c1c53d99a225da838d9cadbf5890d81789f0d1c5636ef30afb4e721d1bec4e9667 |
23 |
DIST apache-tomcat-8.0.32-src.tar.gz 4957920 SHA256 b8f7770ae947a0c0aed9b5a6f3e2ff18fd27a07f068cc6029f019b5d4c6de560 SHA512 4c18b9ae77963d96ff59891564c4bc8f6aaba582776c319825e9b944dd8cf10747dfc5b3cbc9cfa2ff10f6d889b404902fecd6b49fdde7b3741f9ba90dc6221c WHIRLPOOL 77be9ea10ffd2e606367d477ba13c717294fe49b65ecef6fdc910e53fa2d987f38a8b299c28a340ea7684a16feb6ca3bd0b5e662e3875af73f4735e1ff623a79 |
24 |
DIST apache-tomcat-8.0.33-src.tar.gz 4969308 SHA256 1a141b90111347640df57fe506d9da29ca959e44b5885795df603b621c2ccb4f SHA512 f781c90dd0932082f0d9b154b634f147c909415ebf49242f047d29430e24e16086d392b982e16d13b4d5f848dc98fd6834c0768e1f9c60d99a35d7dad262265d WHIRLPOOL b1ca10a4c0ead57b75bade8f135eb943f4ca291bf85eae75d523b65e9538bd5b25a270a3f27c37d2c7ea6e1e847ed15e9fdcac923ceb8069282189976f9e8727 |
25 |
+DIST apache-tomcat-8.0.35-src.tar.gz 4980657 SHA256 420036fde5e1bfe0a3d27299e355ee153b7c547d17c7b52fe4b15a1315d9c4e9 SHA512 c56ba4339fc114cda9a784c7f37be99c82238bbe043f69a3bed2ec86a0bf60325af9105d74cfcffa144636fecc7f4730cee08eca3a22ed035dd5e3e483fa1742 WHIRLPOOL 38d2382eabe19be8b008eb8975ddf95e086b482eb58cb56f566cf4ec7c7628663260a550b611f4db57803e503ab6746aedaac279bff24868c5997eaee3514966 |
26 |
DIST apache-tomcat-9.0.0.M6-src.tar.gz 5023823 SHA256 7217416b1c6470f3653d978bbfdb153693aef74929da21c5823117a168992b2a SHA512 712a93d71bef2f6dbdd35d32cbf200045bacc1a27426cb9f92e3a645a7f59f3611adebebdc24168de569cea2c64500ea893acfba05670947f53d72abec0988f1 WHIRLPOOL fb98d23ac462cef450d1ed8c88eb8be88a0aad32b24cf1b5c8437e51966bfb3d5222a3368ea54a2f19b0be38118b3148bf7549d2d59f1c8267aaa29246ef1d62 |
27 |
|
28 |
diff --git a/www-servers/tomcat/files/tomcat-8.0.35-build.xml.patch b/www-servers/tomcat/files/tomcat-8.0.35-build.xml.patch |
29 |
new file mode 100644 |
30 |
index 0000000..1923d23 |
31 |
--- /dev/null |
32 |
+++ b/www-servers/tomcat/files/tomcat-8.0.35-build.xml.patch |
33 |
@@ -0,0 +1,265 @@ |
34 |
+diff -Naur apache-tomcat-8.0.24-src.orig/build.xml apache-tomcat-8.0.24-src/build.xml |
35 |
+--- apache-tomcat-8.0.24-src.orig/build.xml 2015-07-01 21:25:21.000000000 +0100 |
36 |
++++ apache-tomcat-8.0.24-src/build.xml 2015-08-22 21:17:05.825564599 +0100 |
37 |
+@@ -697,24 +697,29 @@ |
38 |
+ manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> |
39 |
+ |
40 |
+ <!-- Servlet 3.1 Implementation JAR File --> |
41 |
++<!-- |
42 |
+ <jarIt jarfile="${servlet-api.jar}" |
43 |
+ filesDir="${tomcat.classes}" |
44 |
+ filesId="files.servlet-api" |
45 |
+ manifest="${tomcat.manifests}/servlet-api.jar.manifest" |
46 |
+ notice="${tomcat.manifests}/servlet-api.jar.notice" |
47 |
+ license="${tomcat.manifests}/servlet-api.jar.license" /> |
48 |
+- |
49 |
++--> |
50 |
+ <!-- JSP 2.3 Implementation JAR File --> |
51 |
++<!-- |
52 |
+ <jarIt jarfile="${jsp-api.jar}" |
53 |
+ filesDir="${tomcat.classes}" |
54 |
+ filesId="files.jsp-api" |
55 |
+ manifest="${tomcat.manifests}/jsp-api.jar.manifest" /> |
56 |
++--> |
57 |
+ |
58 |
+ <!-- EL 3.0 Implementation JAR File --> |
59 |
++<!-- |
60 |
+ <jarIt jarfile="${el-api.jar}" |
61 |
+ filesDir="${tomcat.classes}" |
62 |
+ filesId="files.el-api" |
63 |
+ manifest="${tomcat.manifests}/el-api.jar.manifest" /> |
64 |
++--> |
65 |
+ |
66 |
+ <!-- WebSocket 1.1 API JAR File --> |
67 |
+ <jarIt jarfile="${websocket-api.jar}" |
68 |
+@@ -982,14 +987,14 @@ |
69 |
+ |
70 |
+ <target name="deploy" depends="package,build-docs,build-tomcat-jdbc,compile-webapp-examples" |
71 |
+ description="Default. Builds a working Tomcat instance"> |
72 |
+- |
73 |
++<!-- |
74 |
+ <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz" |
75 |
+ file="${tomcat-native.tar.gz}" /> |
76 |
+ <copy tofile="${tomcat.build}/bin/commons-daemon-native.tar.gz" |
77 |
+ file="${commons-daemon.native.src.tgz}" /> |
78 |
+ |
79 |
+ <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" /> |
80 |
+- |
81 |
++--> |
82 |
+ <!-- Copy scripts --> |
83 |
+ <copy todir="${tomcat.build}/bin"> |
84 |
+ <fileset dir="bin"> |
85 |
+@@ -1049,7 +1054,7 @@ |
86 |
+ <exclude name="${jdt.jar.filename}"/> |
87 |
+ </fileset> |
88 |
+ </delete> |
89 |
+- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> |
90 |
++<!-- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> --> |
91 |
+ |
92 |
+ <!-- Add sources for examples --> |
93 |
+ <antcall target="examples-sources" /> |
94 |
+@@ -1083,7 +1088,7 @@ |
95 |
+ </javac> |
96 |
+ </target> |
97 |
+ |
98 |
+- <target name="build-tomcat-jdbc" depends="package"> |
99 |
++ <target name="build-tomcat-jdbc" depends="package" unless="noget"> |
100 |
+ <!-- build the jdbc-pool jar and source jar--> |
101 |
+ <echo message="Building Tomcat JDBC pool libraries"/> |
102 |
+ <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" |
103 |
+@@ -1098,7 +1103,7 @@ |
104 |
+ <copy file="${tomcat-jdbc.jar}" todir="${tomcat.build}/lib"/> |
105 |
+ </target> |
106 |
+ |
107 |
+- <target name="build-tomcat-jdbc-src"> |
108 |
++ <target name="build-tomcat-jdbc-src" unless="noget"> |
109 |
+ <!-- build the jdbc-pool source jar--> |
110 |
+ <echo message="Building Tomcat JDBC pool src JAR"/> |
111 |
+ <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" |
112 |
+@@ -1202,10 +1207,11 @@ |
113 |
+ |
114 |
+ <copy file="${basedir}/LICENSE" todir="${tomcat.embed}" /> |
115 |
+ <copy file="${basedir}/NOTICE" todir="${tomcat.embed}" /> |
116 |
++<!-- |
117 |
+ <copy file="${tomcat-dbcp.jar}" todir="${tomcat.embed}" |
118 |
+ failonerror="false"/> |
119 |
+ <copy file="${jdt.jar}" todir="${tomcat.embed}" /> |
120 |
+- |
121 |
++--> |
122 |
+ <!-- Note the meta-inf below will work as long as there is only one JAR |
123 |
+ that needs to add entries. If there is more than one a more complex |
124 |
+ solution will be required. --> |
125 |
+@@ -1542,7 +1548,7 @@ |
126 |
+ |
127 |
+ <target name="extras-commons-logging-prepare" |
128 |
+ depends="extras-prepare" |
129 |
+- description="Prepare to build web services extras package"> |
130 |
++ description="Prepare to build web services extras package" unless="noget"> |
131 |
+ |
132 |
+ <antcall target="downloadfile-2"> |
133 |
+ <param name="sourcefile.1" value="${commons-logging-src.loc.1}"/> |
134 |
+@@ -1681,7 +1687,7 @@ |
135 |
+ |
136 |
+ <target name="extras-webservices-prepare" |
137 |
+ depends="extras-prepare" |
138 |
+- description="Prepare to build web services extras package"> |
139 |
++ description="Prepare to build web services extras package" unless="noget"> |
140 |
+ |
141 |
+ <antcall target="downloadfile"> |
142 |
+ <param name="sourcefile" value="${jaxrpc-lib.loc}"/> |
143 |
+@@ -1882,6 +1888,7 @@ |
144 |
+ |
145 |
+ <target name="javadoc" depends="dist-source,extras-webservices-prepare" |
146 |
+ description="Create the Tomcat javadoc" > |
147 |
++<!-- |
148 |
+ <javadoc packagenames="javax.servlet.*" |
149 |
+ excludepackagenames="javax.servlet.jsp.*" |
150 |
+ sourcepath="${tomcat.dist}/src/java" |
151 |
+@@ -1940,6 +1947,7 @@ |
152 |
+ <path location="${ant.core.lib}"/> |
153 |
+ </classpath> |
154 |
+ </javadoc> |
155 |
++--> |
156 |
+ <javadoc packagenames="javax.websocket.*" |
157 |
+ sourcepath="${tomcat.dist}/src/java" |
158 |
+ destdir="${tomcat.dist}/webapps/docs/websocketapi" |
159 |
+@@ -1970,15 +1978,17 @@ |
160 |
+ docencoding="UTF-8" |
161 |
+ charset="UTF-8" |
162 |
+ additionalparam="-breakiterator -notimestamp" |
163 |
+- maxmemory="256m" > |
164 |
++ maxmemory="512m" > |
165 |
+ <classpath> |
166 |
+ <path refid="compile.classpath"/> |
167 |
+ <path refid="tomcat.webservices.classpath"/> |
168 |
+ <path location="${ant.core.lib}"/> |
169 |
+ </classpath> |
170 |
++<!-- |
171 |
+ <link href="../servletapi"/> |
172 |
+ <link href="../jspapi"/> |
173 |
+ <link href="../elapi"/> |
174 |
++--> |
175 |
+ <link href="../websocketapi"/> |
176 |
+ <link href="http://docs.oracle.com/javase/7/docs/api/"/> |
177 |
+ <link href="http://commons.apache.org/proper/commons-io/javadocs/api-release/"/> |
178 |
+@@ -2739,7 +2749,7 @@ |
179 |
+ </target> |
180 |
+ |
181 |
+ <target name="download-compile" |
182 |
+- description="Download (and build) components necessary to compile" > |
183 |
++ description="Download (and build) components necessary to compile" unless="noget"> |
184 |
+ |
185 |
+ <antcall target="downloadfile-2"> |
186 |
+ <param name="sourcefile.1" value="${tomcat-native.loc.1}"/> |
187 |
+@@ -2773,7 +2783,7 @@ |
188 |
+ </target> |
189 |
+ |
190 |
+ <target name="download-test-compile" |
191 |
+- description="Download additional components for the tests" > |
192 |
++ description="Download additional components for the tests" unless="noget"> |
193 |
+ |
194 |
+ <antcall target="downloadfile"> |
195 |
+ <param name="sourcefile" value="${junit.loc}"/> |
196 |
+@@ -2819,7 +2829,7 @@ |
197 |
+ </target> |
198 |
+ |
199 |
+ <target name="download-dist" |
200 |
+- description="Download additional components for a distribution" > |
201 |
++ description="Download additional components for a distribution" unless="noget"> |
202 |
+ |
203 |
+ <antcall target="downloadzip-2"> |
204 |
+ <param name="sourcefile.1" value="${tomcat-native.win.1}"/> |
205 |
+@@ -2845,18 +2855,18 @@ |
206 |
+ |
207 |
+ <!-- =============== Utility Targets to support downloads ================ --> |
208 |
+ |
209 |
+- <target name="setproxy" if="${proxy.use}"> |
210 |
++ <target name="setproxy" if="${proxy.use}" unless="noget"> |
211 |
+ <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" |
212 |
+ proxyuser="${proxy.user}" proxypassword="${proxy.password}" /> |
213 |
+ <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/> |
214 |
+ </target> |
215 |
+ |
216 |
+- <target name="testexist"> |
217 |
++ <target name="testexist" unless="noget"> |
218 |
+ <echo message="Testing for ${destfile}"/> |
219 |
+ <available file="${destfile}" property="exist"/> |
220 |
+ </target> |
221 |
+ |
222 |
+- <target name="downloadgz" unless="exist" depends="testexist,setproxy"> |
223 |
++ <target name="downloadgz" unless="noget" depends="testexist,setproxy"> |
224 |
+ <!-- Download and extract the package --> |
225 |
+ <local name="temp.file"/> |
226 |
+ <mkdir dir="${base.path}"/> |
227 |
+@@ -2868,7 +2878,7 @@ |
228 |
+ <delete file="${temp.file}.tar.gz"/> |
229 |
+ </target> |
230 |
+ |
231 |
+- <target name="downloadgz-2" unless="exist" depends="testexist"> |
232 |
++ <target name="downloadgz-2" unless="noget" depends="testexist"> |
233 |
+ <!-- Download and extract the package from the two alternative locations --> |
234 |
+ <local name="temp.file"/> |
235 |
+ <mkdir dir="${base.path}"/> |
236 |
+@@ -2887,7 +2897,7 @@ |
237 |
+ <delete file="${temp.file}.tar.gz"/> |
238 |
+ </target> |
239 |
+ |
240 |
+- <target name="downloadzip" unless="exist" depends="testexist,setproxy"> |
241 |
++ <target name="downloadzip" unless="noget" depends="testexist,setproxy"> |
242 |
+ <!-- Download and extract the package --> |
243 |
+ <local name="temp.file"/> |
244 |
+ <mkdir dir="${base.path}"/> |
245 |
+@@ -2898,7 +2908,7 @@ |
246 |
+ <delete file="${temp.file}"/> |
247 |
+ </target> |
248 |
+ |
249 |
+- <target name="downloadzip-2" unless="exist" depends="testexist"> |
250 |
++ <target name="downloadzip-2" unless="noget" depends="testexist"> |
251 |
+ <!-- Download and extract the package from the two alternative locations --> |
252 |
+ <local name="temp.file"/> |
253 |
+ <mkdir dir="${base.path}"/> |
254 |
+@@ -2916,7 +2926,7 @@ |
255 |
+ <delete file="${temp.file}"/> |
256 |
+ </target> |
257 |
+ |
258 |
+- <target name="downloadfile" unless="exist" depends="testexist,setproxy"> |
259 |
++ <target name="downloadfile" unless="noget" depends="testexist,setproxy"> |
260 |
+ <!-- Download the file --> |
261 |
+ <local name="temp.file"/> |
262 |
+ <mkdir dir="${base.path}"/> |
263 |
+@@ -2926,7 +2936,7 @@ |
264 |
+ <move file="${temp.file}" tofile="${destfile}"/> |
265 |
+ </target> |
266 |
+ |
267 |
+- <target name="downloadfile-2" unless="exist" depends="testexist"> |
268 |
++ <target name="downloadfile-2" unless="noget" depends="testexist"> |
269 |
+ <!-- Download the file from the two alternative locations --> |
270 |
+ <local name="temp.file"/> |
271 |
+ <mkdir dir="${base.path}"/> |
272 |
+@@ -2949,7 +2959,7 @@ |
273 |
+ <move file="${temp.file}" tofile="${destfile}"/> |
274 |
+ </target> |
275 |
+ |
276 |
+- <target name="trydownload.check" depends="setproxy"> |
277 |
++ <target name="trydownload.check" depends="setproxy" unless="noget"> |
278 |
+ <condition property="trydownload.run"> |
279 |
+ <and> |
280 |
+ <not> |
281 |
+@@ -2960,7 +2970,7 @@ |
282 |
+ </condition> |
283 |
+ </target> |
284 |
+ |
285 |
+- <target name="trydownload" if="trydownload.run" depends="trydownload.check"> |
286 |
++ <target name="trydownload" if="trydownload.run" depends="trydownload.check" unless="noget"> |
287 |
+ <!-- Downloads a file if not yet downloaded and the source URL is available --> |
288 |
+ <get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${destfile}" /> |
289 |
+ </target> |
290 |
+@@ -2971,7 +2981,7 @@ |
291 |
+ |
292 |
+ <target name="ide-eclipse" |
293 |
+ depends="download-compile, extras-webservices-prepare, download-test-compile" |
294 |
+- description="Prepares the source tree to be built in Eclipse"> |
295 |
++ description="Prepares the source tree to be built in Eclipse" unless="noget"> |
296 |
+ |
297 |
+ <!-- Copy the sample project files into the root directory --> |
298 |
+ <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.project" tofile="${tomcat.home}/.project"/> |
299 |
|
300 |
diff --git a/www-servers/tomcat/tomcat-8.0.35.ebuild b/www-servers/tomcat/tomcat-8.0.35.ebuild |
301 |
new file mode 100644 |
302 |
index 0000000..75d1b2d |
303 |
--- /dev/null |
304 |
+++ b/www-servers/tomcat/tomcat-8.0.35.ebuild |
305 |
@@ -0,0 +1,154 @@ |
306 |
+# Copyright 1999-2016 Gentoo Foundation |
307 |
+# Distributed under the terms of the GNU General Public License v2 |
308 |
+# $Id$ |
309 |
+ |
310 |
+EAPI=5 |
311 |
+ |
312 |
+JAVA_PKG_IUSE="doc source test" |
313 |
+ |
314 |
+inherit eutils java-pkg-2 java-ant-2 prefix user |
315 |
+ |
316 |
+MY_P="apache-${P}-src" |
317 |
+ |
318 |
+DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3 Container" |
319 |
+HOMEPAGE="http://tomcat.apache.org/" |
320 |
+SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz" |
321 |
+ |
322 |
+LICENSE="Apache-2.0" |
323 |
+SLOT="8" |
324 |
+KEYWORDS="~amd64 ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris" |
325 |
+IUSE="extra-webapps" |
326 |
+ |
327 |
+RESTRICT="test" # can we run them on a production system? |
328 |
+ |
329 |
+ECJ_SLOT="4.5" |
330 |
+SAPI_SLOT="3.1" |
331 |
+ |
332 |
+COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} |
333 |
+ dev-java/tomcat-servlet-api:${SAPI_SLOT}" |
334 |
+RDEPEND="${COMMON_DEP} |
335 |
+ !<dev-java/tomcat-native-1.1.24 |
336 |
+ >=virtual/jre-1.7" |
337 |
+DEPEND="${COMMON_DEP} |
338 |
+ app-admin/pwgen |
339 |
+ >=virtual/jdk-1.7 |
340 |
+ test? ( |
341 |
+ >=dev-java/ant-junit-1.9:0 |
342 |
+ dev-java/easymock:3.2 |
343 |
+ )" |
344 |
+ |
345 |
+S=${WORKDIR}/${MY_P} |
346 |
+ |
347 |
+pkg_setup() { |
348 |
+ java-pkg-2_pkg_setup |
349 |
+ enewgroup tomcat 265 |
350 |
+ enewuser tomcat 265 -1 /dev/null tomcat |
351 |
+} |
352 |
+ |
353 |
+java_prepare() { |
354 |
+ find -name '*.jar' -type f -delete -print || die |
355 |
+ |
356 |
+ # Remove bundled servlet-api |
357 |
+ rm -rv java/javax/{el,servlet} || die |
358 |
+ |
359 |
+ epatch "${FILESDIR}/${P}-build.xml.patch" |
360 |
+ |
361 |
+ # For use of catalina.sh in netbeans |
362 |
+ sed -i -e "/^# ----- Execute The Requested Command/ a\ |
363 |
+ CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \ |
364 |
+ bin/catalina.sh || die |
365 |
+} |
366 |
+ |
367 |
+JAVA_ANT_REWRITE_CLASSPATH="true" |
368 |
+ |
369 |
+EANT_BUILD_TARGET="deploy" |
370 |
+EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}" |
371 |
+EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" |
372 |
+EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" |
373 |
+EANT_NEEDS_TOOLS="true" |
374 |
+EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false" |
375 |
+ |
376 |
+# revisions of the scripts |
377 |
+IM_REV="-r2" |
378 |
+INIT_REV="-r1" |
379 |
+ |
380 |
+src_compile() { |
381 |
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)" |
382 |
+ java-pkg-2_src_compile |
383 |
+} |
384 |
+ |
385 |
+src_test() { |
386 |
+ java-pkg-2_src_test |
387 |
+} |
388 |
+ |
389 |
+src_install() { |
390 |
+ local dest="/usr/share/${PN}-${SLOT}" |
391 |
+ |
392 |
+ java-pkg_jarinto "${dest}"/bin |
393 |
+ java-pkg_dojar output/build/bin/*.jar |
394 |
+ exeinto "${dest}"/bin |
395 |
+ doexe output/build/bin/*.sh |
396 |
+ |
397 |
+ java-pkg_jarinto "${dest}"/lib |
398 |
+ java-pkg_dojar output/build/lib/*.jar |
399 |
+ |
400 |
+ dodoc RELEASE-NOTES RUNNING.txt |
401 |
+ use doc && java-pkg_dojavadoc output/dist/webapps/docs/api |
402 |
+ use source && java-pkg_dosrc java/* |
403 |
+ |
404 |
+ ### Webapps ### |
405 |
+ |
406 |
+ # add missing docBase |
407 |
+ local apps="host-manager manager" |
408 |
+ for app in ${apps}; do |
409 |
+ sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ |
410 |
+ output/build/webapps/${app}/META-INF/context.xml || die |
411 |
+ done |
412 |
+ |
413 |
+ insinto "${dest}"/webapps |
414 |
+ doins -r output/build/webapps/{host-manager,manager,ROOT} |
415 |
+ use extra-webapps && doins -r output/build/webapps/{docs,examples} |
416 |
+ |
417 |
+ ### Config ### |
418 |
+ |
419 |
+ # create "logs" directory in $CATALINA_BASE |
420 |
+ # and set correct perms, see #458890 |
421 |
+ dodir "${dest}"/logs |
422 |
+ fperms 0750 "${dest}"/logs |
423 |
+ |
424 |
+ # replace the default pw with a random one, see #92281 |
425 |
+ local randpw="$(pwgen -s -B 15 1)" |
426 |
+ sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die |
427 |
+ |
428 |
+ # prepend gentoo.classpath to common.loader, see #453212 |
429 |
+ sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die |
430 |
+ |
431 |
+ insinto "${dest}" |
432 |
+ doins -r output/build/conf |
433 |
+ |
434 |
+ ### rc ### |
435 |
+ |
436 |
+ cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die |
437 |
+ eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} |
438 |
+ sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die |
439 |
+ |
440 |
+ insinto "${dest}"/gentoo |
441 |
+ doins "${T}"/tomcat.conf |
442 |
+ exeinto "${dest}"/gentoo |
443 |
+ newexe "${T}"/tomcat${INIT_REV}.init tomcat.init |
444 |
+ newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash |
445 |
+} |
446 |
+ |
447 |
+pkg_postinst() { |
448 |
+ elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" |
449 |
+ elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." |
450 |
+ elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" |
451 |
+ |
452 |
+ elog "To manage Tomcat instances, run:" |
453 |
+ elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" |
454 |
+ |
455 |
+ ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" |
456 |
+ ewarn "from upstream binary if you need it. Gentoo Bug # 144276" |
457 |
+ |
458 |
+# einfo "Please read https://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information." |
459 |
+} |