1 |
commit: 909df428f723a6dd46dad82b08fa967e7778f0ca |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Dec 4 15:01:13 2017 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Dec 4 15:02:14 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=909df428 |
7 |
|
8 |
www-servers/tomcat: version bump in slot 8.5 |
9 |
|
10 |
Package-Manager: Portage-2.3.16, Repoman-2.3.6 |
11 |
|
12 |
www-servers/tomcat/Manifest | 1 + |
13 |
.../tomcat/files/tomcat-8.5.24-build.xml.patch | 249 +++++++++++++++++++++ |
14 |
www-servers/tomcat/tomcat-8.5.24.ebuild | 157 +++++++++++++ |
15 |
3 files changed, 407 insertions(+) |
16 |
|
17 |
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest |
18 |
index 73ab7d6d336..8b09820cea7 100644 |
19 |
--- a/www-servers/tomcat/Manifest |
20 |
+++ b/www-servers/tomcat/Manifest |
21 |
@@ -1,4 +1,5 @@ |
22 |
DIST apache-tomcat-7.0.82-src.tar.gz 4697342 SHA256 3c6ff0bf2770b169493b25b97ee7502d44bee286176ecd187caaebf1f4e2fcf7 SHA512 fc92388d81316de0246df4074c417ffa341eab55308c0694e9ea71c5497c863b42019cd1f38628ff640114c501a06c4e9c428cb2b6f1bc1c16fb337a286718db WHIRLPOOL aef92cb2cf82c87a1b20ef7eedb30aae052882e99e74b9c33500b3a30f5c32df7a4dd23e3c79d3031ff7f0dd8abf9e2b3e061805a3b32f3e78b6b7c52db9d3c1 |
23 |
DIST apache-tomcat-8.0.47-src.tar.gz 4996505 SHA256 a2e34a707f1d2ab03aae194db2aed7aa525e62ee3cd648e7058bee49ac1b578c SHA512 135de73b8ca7d4003fcecc19a17a8a86ab85fc1054e89638d26e57263249438d8e8aebfca0a2791eaec2bc835baa57e6a05b60e11595aa373fdc03e278b31702 WHIRLPOOL 7add2b564ca9dfac647cd8338ef90229dd61e97d2ad7420f883c98b62760952904ad170f72029153da592a6f2c8c003d7229b4b32a1e870b6e7c2c99d34566c8 |
24 |
DIST apache-tomcat-8.5.23-src.tar.gz 5086043 SHA256 eaaf35752841356dec976fa6250cd71680b8b5b9c0bdf4df9a86ac38630bcbd4 SHA512 2848331553f2c1bc51a4113960c6fe7e2beddf9146341dbfde1a27e2232802cfc364c8e8b988ae862371ca1a3be34665a56a28be9eadf80f8b317e0e2525cbef WHIRLPOOL 77b35de4ede2beecab71dcd7c5494bded1516deac4b5c2cbd2f48e1ae728cfa41f4193369bd464946869e9ba4565c0e6f1c7ad57578459d3be67159ea8cd9a64 |
25 |
+DIST apache-tomcat-8.5.24-src.tar.gz 5101516 BLAKE2B c19c46cca562f0c4c4733608ec007dd423f9a8ed0595bfb835554a7d08be06b791933e4beacbb0fe472589feae82f7d1a46934c0fb68930343cb2f4589bf6530 SHA512 f4ef9a66f2cafb3207c5a38c0f88efc1189e72f02fa88ef2a1b3626a03a57d0ba505b099f6185d747d5ab858aa3f8f3446ae60789312a900ec443eac45233efc |
26 |
DIST apache-tomcat-9.0.1-src.tar.gz 5029499 SHA256 f4da8ef7a03dd7280a9a4b6c66cc9bd34dddc6429c33d9db1a8acfc1596c4e90 SHA512 6116b05f448c24e691c4b56372a41cfd8900adc5e759f2f5026c808de48d65705763236fca46f69321d351f37f5dbc7aa49db8c097b8a3155e367fe21aa0d384 WHIRLPOOL 2e0f05001b9f0d57a241db8ddf0212d3adce2c1b829a03318b5cc1b5a250ae32a50d801e23d9b6a2943c208a478dd00d1f5ae07d1c3c736fbf059554a40caf66 |
27 |
|
28 |
diff --git a/www-servers/tomcat/files/tomcat-8.5.24-build.xml.patch b/www-servers/tomcat/files/tomcat-8.5.24-build.xml.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..d83440c0c4d |
31 |
--- /dev/null |
32 |
+++ b/www-servers/tomcat/files/tomcat-8.5.24-build.xml.patch |
33 |
@@ -0,0 +1,249 @@ |
34 |
+diff --git a/apache-tomcat-8.5.23-src/build.xml b/apache-tomcat-8.5.23-src/build.xml |
35 |
+index b1b2666..263800c 100644 |
36 |
+--- a/apache-tomcat-8.5.23-src/build.xml |
37 |
++++ b/apache-tomcat-8.5.23-src/build.xml |
38 |
+@@ -714,24 +714,29 @@ |
39 |
+ manifest="${tomcat.manifests}/annotations-api.jar.manifest" /> |
40 |
+ |
41 |
+ <!-- Servlet 3.1 Implementation JAR File --> |
42 |
++<!-- |
43 |
+ <jarIt jarfile="${servlet-api.jar}" |
44 |
+ filesDir="${tomcat.classes}" |
45 |
+ filesId="files.servlet-api" |
46 |
+ manifest="${tomcat.manifests}/servlet-api.jar.manifest" |
47 |
+ notice="${tomcat.manifests}/servlet-api.jar.notice" |
48 |
+ license="${tomcat.manifests}/servlet-api.jar.license" /> |
49 |
+- |
50 |
++--> |
51 |
+ <!-- JSP 2.3 Implementation JAR File --> |
52 |
++<!-- |
53 |
+ <jarIt jarfile="${jsp-api.jar}" |
54 |
+ filesDir="${tomcat.classes}" |
55 |
+ filesId="files.jsp-api" |
56 |
+ manifest="${tomcat.manifests}/jsp-api.jar.manifest" /> |
57 |
++--> |
58 |
+ |
59 |
+ <!-- EL 3.0 Implementation JAR File --> |
60 |
++<!-- |
61 |
+ <jarIt jarfile="${el-api.jar}" |
62 |
+ filesDir="${tomcat.classes}" |
63 |
+ filesId="files.el-api" |
64 |
+ manifest="${tomcat.manifests}/el-api.jar.manifest" /> |
65 |
++--> |
66 |
+ |
67 |
+ <!-- WebSocket 1.1 API JAR File --> |
68 |
+ <jarIt jarfile="${websocket-api.jar}" |
69 |
+@@ -1005,14 +1010,14 @@ |
70 |
+ |
71 |
+ <target name="deploy" depends="package,build-docs,build-tomcat-jdbc,compile-webapp-examples" |
72 |
+ description="Default. Builds a working Tomcat instance"> |
73 |
+- |
74 |
++<!-- |
75 |
+ <copy tofile="${tomcat.build}/bin/tomcat-native.tar.gz" |
76 |
+ file="${tomcat-native.tar.gz}" /> |
77 |
+ <copy tofile="${tomcat.build}/bin/commons-daemon-native.tar.gz" |
78 |
+ file="${commons-daemon.native.src.tgz}" /> |
79 |
+ |
80 |
+ <copy tofile="${tomcat.build}/bin/commons-daemon.jar" file="${commons-daemon.jar}" /> |
81 |
+- |
82 |
++--> |
83 |
+ <!-- Copy scripts --> |
84 |
+ <copy todir="${tomcat.build}/bin"> |
85 |
+ <fileset dir="bin"> |
86 |
+@@ -1072,7 +1077,7 @@ |
87 |
+ <exclude name="${jdt.jar.filename}"/> |
88 |
+ </fileset> |
89 |
+ </delete> |
90 |
+- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> |
91 |
++<!-- <copy file="${jdt.jar}" todir="${tomcat.build}/lib"/> --> |
92 |
+ |
93 |
+ <!-- Add sources for examples --> |
94 |
+ <antcall target="examples-sources" /> |
95 |
+@@ -1106,7 +1111,7 @@ |
96 |
+ </javac> |
97 |
+ </target> |
98 |
+ |
99 |
+- <target name="build-tomcat-jdbc" depends="package"> |
100 |
++ <target name="build-tomcat-jdbc" depends="package" unless="noget"> |
101 |
+ <!-- build the jdbc-pool jar and source jar--> |
102 |
+ <echo message="Building Tomcat JDBC pool libraries"/> |
103 |
+ <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" |
104 |
+@@ -1121,7 +1126,7 @@ |
105 |
+ <copy file="${tomcat-jdbc.jar}" todir="${tomcat.build}/lib"/> |
106 |
+ </target> |
107 |
+ |
108 |
+- <target name="build-tomcat-jdbc-src"> |
109 |
++ <target name="build-tomcat-jdbc-src" unless="noget"> |
110 |
+ <!-- build the jdbc-pool source jar--> |
111 |
+ <echo message="Building Tomcat JDBC pool src JAR"/> |
112 |
+ <ant antfile="${tomcat.jdbc.dir}/build.xml" dir="${tomcat.jdbc.dir}" |
113 |
+@@ -1225,9 +1230,11 @@ |
114 |
+ |
115 |
+ <copy file="${basedir}/LICENSE" todir="${tomcat.embed}" /> |
116 |
+ <copy file="${basedir}/NOTICE" todir="${tomcat.embed}" /> |
117 |
++<!-- |
118 |
+ <copy file="${tomcat-dbcp.jar}" todir="${tomcat.embed}" |
119 |
+ failonerror="false"/> |
120 |
+ <copy file="${jdt.jar}" todir="${tomcat.embed}" /> |
121 |
++--> |
122 |
+ <copy file="${annotations-api.jar}" todir="${tomcat.embed}" /> |
123 |
+ |
124 |
+ <!-- Note the meta-inf below will work as long as there is only one JAR |
125 |
+@@ -1608,7 +1615,7 @@ |
126 |
+ |
127 |
+ <target name="extras-webservices-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"> |
133 |
+ <param name="sourcefile" value="${jaxrpc-lib.loc}"/> |
134 |
+@@ -1756,6 +1763,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. |
135 |
+ |
136 |
+ <target name="javadoc" depends="dist-source,extras-webservices-prepare" |
137 |
+ description="Create the Tomcat javadoc" > |
138 |
++<!-- |
139 |
+ <javadoc packagenames="javax.servlet.*" |
140 |
+ excludepackagenames="javax.servlet.jsp.*" |
141 |
+ sourcepath="${tomcat.dist}/src/java" |
142 |
+@@ -1820,6 +1828,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. |
143 |
+ <path location="${ant.core.lib}"/> |
144 |
+ </classpath> |
145 |
+ </javadoc> |
146 |
++--> |
147 |
+ <javadoc packagenames="javax.websocket.*" |
148 |
+ sourcepath="${tomcat.dist}/src/java" |
149 |
+ destdir="${tomcat.dist}/webapps/docs/websocketapi" |
150 |
+@@ -1860,9 +1869,11 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. |
151 |
+ <path refid="tomcat.webservices.classpath"/> |
152 |
+ <path location="${ant.core.lib}"/> |
153 |
+ </classpath> |
154 |
++<!-- |
155 |
+ <link href="../servletapi"/> |
156 |
+ <link href="../jspapi"/> |
157 |
+ <link href="../elapi"/> |
158 |
++--> |
159 |
+ <link href="../websocketapi"/> |
160 |
+ <link href="http://docs.oracle.com/javase/7/docs/api/"/> |
161 |
+ <link href="http://commons.apache.org/proper/commons-io/javadocs/api-release/"/> |
162 |
+@@ -2607,7 +2618,7 @@ skip.installer property in build.properties" /> |
163 |
+ </target> |
164 |
+ |
165 |
+ <target name="download-compile" |
166 |
+- description="Download (and build) components necessary to compile" > |
167 |
++ description="Download (and build) components necessary to compile" unless="noget"> |
168 |
+ |
169 |
+ <antcall target="downloadfile-2"> |
170 |
+ <param name="sourcefile.1" value="${tomcat-native.loc.1}"/> |
171 |
+@@ -2641,7 +2652,7 @@ skip.installer property in build.properties" /> |
172 |
+ </target> |
173 |
+ |
174 |
+ <target name="download-test-compile" |
175 |
+- description="Download additional components for the tests" > |
176 |
++ description="Download additional components for the tests" unless="noget"> |
177 |
+ |
178 |
+ <antcall target="downloadfile"> |
179 |
+ <param name="sourcefile" value="${junit.loc}"/> |
180 |
+@@ -2698,7 +2709,7 @@ skip.installer property in build.properties" /> |
181 |
+ </target> |
182 |
+ |
183 |
+ <target name="download-dist" |
184 |
+- description="Download additional components for a distribution" > |
185 |
++ description="Download additional components for a distribution" unless="noget"> |
186 |
+ |
187 |
+ <antcall target="downloadzip-2"> |
188 |
+ <param name="sourcefile.1" value="${tomcat-native.win.1}"/> |
189 |
+@@ -2724,18 +2735,18 @@ skip.installer property in build.properties" /> |
190 |
+ |
191 |
+ <!-- =============== Utility Targets to support downloads ================ --> |
192 |
+ |
193 |
+- <target name="setproxy" if="${proxy.use}"> |
194 |
++ <target name="setproxy" if="${proxy.use}" unless="noget"> |
195 |
+ <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" |
196 |
+ proxyuser="${proxy.user}" proxypassword="${proxy.password}" /> |
197 |
+ <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/> |
198 |
+ </target> |
199 |
+ |
200 |
+- <target name="testexist"> |
201 |
++ <target name="testexist" unless="noget"> |
202 |
+ <echo message="Testing for ${destfile}"/> |
203 |
+ <available file="${destfile}" property="exist"/> |
204 |
+ </target> |
205 |
+ |
206 |
+- <target name="downloadgz" unless="exist" depends="testexist,setproxy"> |
207 |
++ <target name="downloadgz" unless="noget" depends="testexist,setproxy"> |
208 |
+ <!-- Download and extract the package --> |
209 |
+ <local name="temp.file"/> |
210 |
+ <mkdir dir="${base.path}"/> |
211 |
+@@ -2747,7 +2758,7 @@ skip.installer property in build.properties" /> |
212 |
+ <delete file="${temp.file}.tar.gz"/> |
213 |
+ </target> |
214 |
+ |
215 |
+- <target name="downloadgz-2" unless="exist" depends="testexist"> |
216 |
++ <target name="downloadgz-2" unless="noget" depends="testexist"> |
217 |
+ <!-- Download and extract the package from the two alternative locations --> |
218 |
+ <local name="temp.file"/> |
219 |
+ <mkdir dir="${base.path}"/> |
220 |
+@@ -2766,7 +2777,7 @@ skip.installer property in build.properties" /> |
221 |
+ <delete file="${temp.file}.tar.gz"/> |
222 |
+ </target> |
223 |
+ |
224 |
+- <target name="downloadzip" unless="exist" depends="testexist,setproxy"> |
225 |
++ <target name="downloadzip" unless="noget" depends="testexist,setproxy"> |
226 |
+ <!-- Download and extract the package --> |
227 |
+ <local name="temp.file"/> |
228 |
+ <mkdir dir="${base.path}"/> |
229 |
+@@ -2777,7 +2788,7 @@ skip.installer property in build.properties" /> |
230 |
+ <delete file="${temp.file}"/> |
231 |
+ </target> |
232 |
+ |
233 |
+- <target name="downloadzip-2" unless="exist" depends="testexist"> |
234 |
++ <target name="downloadzip-2" unless="noget" depends="testexist"> |
235 |
+ <!-- Download and extract the package from the two alternative locations --> |
236 |
+ <local name="temp.file"/> |
237 |
+ <mkdir dir="${base.path}"/> |
238 |
+@@ -2795,7 +2806,7 @@ skip.installer property in build.properties" /> |
239 |
+ <delete file="${temp.file}"/> |
240 |
+ </target> |
241 |
+ |
242 |
+- <target name="downloadfile" unless="exist" depends="testexist,setproxy"> |
243 |
++ <target name="downloadfile" unless="noget" depends="testexist,setproxy"> |
244 |
+ <!-- Download the file --> |
245 |
+ <local name="temp.file"/> |
246 |
+ <mkdir dir="${base.path}"/> |
247 |
+@@ -2805,7 +2816,7 @@ skip.installer property in build.properties" /> |
248 |
+ <move file="${temp.file}" tofile="${destfile}"/> |
249 |
+ </target> |
250 |
+ |
251 |
+- <target name="downloadfile-2" unless="exist" depends="testexist"> |
252 |
++ <target name="downloadfile-2" unless="noget" depends="testexist"> |
253 |
+ <!-- Download the file from the two alternative locations --> |
254 |
+ <local name="temp.file"/> |
255 |
+ <mkdir dir="${base.path}"/> |
256 |
+@@ -2828,7 +2839,7 @@ skip.installer property in build.properties" /> |
257 |
+ <move file="${temp.file}" tofile="${destfile}"/> |
258 |
+ </target> |
259 |
+ |
260 |
+- <target name="trydownload.check" depends="setproxy"> |
261 |
++ <target name="trydownload.check" depends="setproxy" unless="noget"> |
262 |
+ <condition property="trydownload.run"> |
263 |
+ <and> |
264 |
+ <not> |
265 |
+@@ -2839,7 +2850,7 @@ skip.installer property in build.properties" /> |
266 |
+ </condition> |
267 |
+ </target> |
268 |
+ |
269 |
+- <target name="trydownload" if="trydownload.run" depends="trydownload.check"> |
270 |
++ <target name="trydownload" if="trydownload.run" depends="trydownload.check" unless="noget"> |
271 |
+ <!-- Downloads a file if not yet downloaded and the source URL is available --> |
272 |
+ <get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${destfile}" /> |
273 |
+ </target> |
274 |
+@@ -2850,7 +2861,7 @@ skip.installer property in build.properties" /> |
275 |
+ |
276 |
+ <target name="ide-eclipse" |
277 |
+ depends="download-compile, extras-webservices-prepare, download-test-compile" |
278 |
+- description="Prepares the source tree to be built in Eclipse"> |
279 |
++ description="Prepares the source tree to be built in Eclipse" unless="noget"> |
280 |
+ |
281 |
+ <!-- Copy the sample project files into the root directory --> |
282 |
+ <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.project" tofile="${tomcat.home}/.project"/> |
283 |
|
284 |
diff --git a/www-servers/tomcat/tomcat-8.5.24.ebuild b/www-servers/tomcat/tomcat-8.5.24.ebuild |
285 |
new file mode 100644 |
286 |
index 00000000000..b00d9e34c11 |
287 |
--- /dev/null |
288 |
+++ b/www-servers/tomcat/tomcat-8.5.24.ebuild |
289 |
@@ -0,0 +1,157 @@ |
290 |
+# Copyright 1999-2017 Gentoo Foundation |
291 |
+# Distributed under the terms of the GNU General Public License v2 |
292 |
+ |
293 |
+EAPI=6 |
294 |
+ |
295 |
+JAVA_PKG_IUSE="doc source test" |
296 |
+ |
297 |
+inherit eutils java-pkg-2 java-ant-2 prefix user |
298 |
+ |
299 |
+MY_P="apache-${P}-src" |
300 |
+ |
301 |
+DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container" |
302 |
+HOMEPAGE="https://tomcat.apache.org/" |
303 |
+SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz" |
304 |
+ |
305 |
+LICENSE="Apache-2.0" |
306 |
+SLOT="8.5" |
307 |
+KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" |
308 |
+IUSE="extra-webapps" |
309 |
+ |
310 |
+RESTRICT="test" # can we run them on a production system? |
311 |
+ |
312 |
+ECJ_SLOT="4.5" |
313 |
+SAPI_SLOT="3.1" |
314 |
+ |
315 |
+COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} |
316 |
+ >=dev-java/tomcat-servlet-api-${SLOT}:${SAPI_SLOT}" |
317 |
+RDEPEND="${COMMON_DEP} |
318 |
+ !<dev-java/tomcat-native-1.1.24 |
319 |
+ >=virtual/jre-1.7" |
320 |
+DEPEND="${COMMON_DEP} |
321 |
+ app-admin/pwgen |
322 |
+ >=virtual/jdk-1.7 |
323 |
+ test? ( |
324 |
+ >=dev-java/ant-junit-1.9:0 |
325 |
+ dev-java/easymock:3.2 |
326 |
+ )" |
327 |
+ |
328 |
+S=${WORKDIR}/${MY_P} |
329 |
+ |
330 |
+pkg_setup() { |
331 |
+ java-pkg-2_pkg_setup |
332 |
+ enewgroup tomcat 265 |
333 |
+ enewuser tomcat 265 -1 /dev/null tomcat |
334 |
+} |
335 |
+ |
336 |
+src_prepare() { |
337 |
+ default |
338 |
+ |
339 |
+ find -name '*.jar' -type f -delete -print || die |
340 |
+ |
341 |
+ # Remove bundled servlet-api |
342 |
+ rm -rv java/javax/{el,servlet} || die |
343 |
+ |
344 |
+ epatch "${FILESDIR}/${P}-build.xml.patch" |
345 |
+ |
346 |
+ # For use of catalina.sh in netbeans |
347 |
+ sed -i -e "/^# ----- Execute The Requested Command/ a\ |
348 |
+ CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \ |
349 |
+ bin/catalina.sh || die |
350 |
+ |
351 |
+ java-pkg-2_src_prepare |
352 |
+} |
353 |
+ |
354 |
+JAVA_ANT_REWRITE_CLASSPATH="true" |
355 |
+ |
356 |
+EANT_BUILD_TARGET="deploy" |
357 |
+EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}" |
358 |
+EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" |
359 |
+EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" |
360 |
+EANT_NEEDS_TOOLS="true" |
361 |
+EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false -Dexecute.validate=false" |
362 |
+ |
363 |
+# revisions of the scripts |
364 |
+IM_REV="-r2" |
365 |
+INIT_REV="-r1" |
366 |
+ |
367 |
+src_compile() { |
368 |
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)" |
369 |
+ java-pkg-2_src_compile |
370 |
+} |
371 |
+ |
372 |
+src_test() { |
373 |
+ java-pkg-2_src_test |
374 |
+} |
375 |
+ |
376 |
+src_install() { |
377 |
+ local dest="/usr/share/${PN}-${SLOT}" |
378 |
+ |
379 |
+ java-pkg_jarinto "${dest}"/bin |
380 |
+ java-pkg_dojar output/build/bin/*.jar |
381 |
+ exeinto "${dest}"/bin |
382 |
+ doexe output/build/bin/*.sh |
383 |
+ |
384 |
+ java-pkg_jarinto "${dest}"/lib |
385 |
+ java-pkg_dojar output/build/lib/*.jar |
386 |
+ |
387 |
+ dodoc RELEASE-NOTES RUNNING.txt |
388 |
+ use doc && java-pkg_dojavadoc output/dist/webapps/docs/api |
389 |
+ use source && java-pkg_dosrc java/* |
390 |
+ |
391 |
+ ### Webapps ### |
392 |
+ |
393 |
+ # add missing docBase |
394 |
+ local apps="host-manager manager" |
395 |
+ for app in ${apps}; do |
396 |
+ sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ |
397 |
+ output/build/webapps/${app}/META-INF/context.xml || die |
398 |
+ done |
399 |
+ |
400 |
+ insinto "${dest}"/webapps |
401 |
+ doins -r output/build/webapps/{host-manager,manager,ROOT} |
402 |
+ use extra-webapps && doins -r output/build/webapps/{docs,examples} |
403 |
+ |
404 |
+ ### Config ### |
405 |
+ |
406 |
+ # create "logs" directory in $CATALINA_BASE |
407 |
+ # and set correct perms, see #458890 |
408 |
+ dodir "${dest}"/logs |
409 |
+ fperms 0750 "${dest}"/logs |
410 |
+ |
411 |
+ # replace the default pw with a random one, see #92281 |
412 |
+ local randpw="$(pwgen -s -B 15 1)" |
413 |
+ sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die |
414 |
+ |
415 |
+ # prepend gentoo.classpath to common.loader, see #453212 |
416 |
+ sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die |
417 |
+ |
418 |
+ insinto "${dest}" |
419 |
+ doins -r output/build/conf |
420 |
+ |
421 |
+ ### rc ### |
422 |
+ |
423 |
+ cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die |
424 |
+ eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} |
425 |
+ sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die |
426 |
+ |
427 |
+ insinto "${dest}"/gentoo |
428 |
+ doins "${T}"/tomcat.conf |
429 |
+ exeinto "${dest}"/gentoo |
430 |
+ newexe "${T}"/tomcat${INIT_REV}.init tomcat.init |
431 |
+ newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash |
432 |
+} |
433 |
+ |
434 |
+pkg_postinst() { |
435 |
+ elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" |
436 |
+ elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." |
437 |
+ elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" |
438 |
+ |
439 |
+ elog "To manage Tomcat instances, run:" |
440 |
+ elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" |
441 |
+ |
442 |
+ ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" |
443 |
+ ewarn "from upstream binary if you need it. Gentoo Bug # 144276" |
444 |
+ |
445 |
+# einfo "Please read https://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information." |
446 |
+} |