1 |
commit: 8780475f4cd106c85bc732fd1b9a689999d47940 |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Aug 10 10:35:08 2017 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Aug 10 10:35:39 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8780475f |
7 |
|
8 |
www-servers/tomcat: bumped for slot 8.5 |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.3 |
11 |
|
12 |
www-servers/tomcat/Manifest | 1 + |
13 |
.../tomcat/files/tomcat-8.5.20-build.xml.patch | 250 +++++++++++++++++++++ |
14 |
www-servers/tomcat/tomcat-8.5.20.ebuild | 157 +++++++++++++ |
15 |
3 files changed, 408 insertions(+) |
16 |
|
17 |
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest |
18 |
index 2a07679026c..fbd44f47f7f 100644 |
19 |
--- a/www-servers/tomcat/Manifest |
20 |
+++ b/www-servers/tomcat/Manifest |
21 |
@@ -3,4 +3,5 @@ DIST apache-tomcat-7.0.79-src.tar.gz 4682119 SHA256 b5373951afe41ffd27348bb57cff |
22 |
DIST apache-tomcat-8.0.43-src.tar.gz 4962788 SHA256 5ca1feb8ae5bd637a379ed409300fac0d463a8ec878d60f1ca54d3e7f2013f43 SHA512 aa15046ba3404c206b7983f42837d30debca69b18b85345d1376a853ad6e9fb5c0cbf42732f835779b10d39e2eae77f6d1688dadc5280b50236bf3432e251e9b WHIRLPOOL d1517c25b56a2ef4dd41977daf4ab5639b991ce38b6f5279a4e09f9232d73625be623beb678de8b3ec4e718cb50284cbebae67726622699738ad28be6d735414 |
23 |
DIST apache-tomcat-8.0.45-src.tar.gz 4978313 SHA256 450fd2890b12e56692cb203f95651f9a873dce056b7b4362e142bc817032b291 SHA512 80e4281f5b6e4d6bf607179840bc6cb923ea9f57ec8231a451c3b5a1f8938f72ec1097290059afba0ef7b56edeb56d63636849517b69b91c7093cb15ff0eaa04 WHIRLPOOL c893cd5c26637f8881c19353e269145e33fa11e02eb10ef93a41590ad2e1e6c6ffa1b3f6c3c7c318630765f666be07447fd3a21c70c2c381e75c458b60383ea0 |
24 |
DIST apache-tomcat-8.5.16-src.tar.gz 5054513 SHA256 0dd3589779bd43624a6027ec5e26262d10128dd46dcd08ed4107b8f453416c23 SHA512 187f32ebeeca9099f2bf679613dd89198268d361d352550e09db23ef8df483543ec67604c58ddebb8259c46ab510519e8fa75a803d2e86ab815b231ae327222e WHIRLPOOL d241aed38921a76f75451f7d3c676e97548b843bec724c8c80a6534638cd27095f4ba790cbef56c8913cd6d96e63536855359c5a271aa41c7d3b97e25de26253 |
25 |
+DIST apache-tomcat-8.5.20-src.tar.gz 5063310 SHA256 6bc40ae61b77906325bf8bdb2b0767aeb96f4c5a7a9b618aa496db59387d6610 SHA512 dea3095792de76a3a56bd6fd6c9ed5702ca539856d0e07a5de2600f456e7255929d14748a2dc9b3c626b3a67aaac8795ef3f5a6a1351991a0e89443e0c9d0807 WHIRLPOOL 1924f12c5068574424587d5b8b7261efb7496dbc53915d8cb2558b4a643aedecc98823ac7dec238fe7cb1a1874734e05de2dc6b7b28e48ffdae9e8c5c586e895 |
26 |
DIST apache-tomcat-9.0.0.M26-src.tar.gz 5011957 SHA256 02ba2c9a3a2d78994fc14f2b304c3b3f46615538a48a9193e475b08565cb9b7e SHA512 8c25932aa244edb46eee26aa837636e78c8104ca6617cb5ba924e0e45c2f9dbcd7d196ddf69ee2f1c1b6053dda818a3b92f8f46c156f3048c46cee919fc22c13 WHIRLPOOL 11e00a6e6a5822bd4e357e375b026dd732bf33319e30dde25f11bc1b99994617be3ce6d4976870f725e56646e5ffee92acb6fc23f46b53a46ebbf6c53707ea07 |
27 |
|
28 |
diff --git a/www-servers/tomcat/files/tomcat-8.5.20-build.xml.patch b/www-servers/tomcat/files/tomcat-8.5.20-build.xml.patch |
29 |
new file mode 100644 |
30 |
index 00000000000..611c99d7a0e |
31 |
--- /dev/null |
32 |
+++ b/www-servers/tomcat/files/tomcat-8.5.20-build.xml.patch |
33 |
@@ -0,0 +1,250 @@ |
34 |
+diff --git a/apache-tomcat-8.5.4-src/build.xml b/apache-tomcat-8.5.4-src/build.xml |
35 |
+index 655e379..b973b7f 100644 |
36 |
+--- a/apache-tomcat-8.5.4-src/build.xml |
37 |
++++ b/apache-tomcat-8.5.4-src/build.xml |
38 |
+@@ -691,24 +691,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 |
+@@ -982,14 +987,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 |
+@@ -1049,7 +1054,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 |
+@@ -1083,7 +1088,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 |
+@@ -1098,7 +1103,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 |
+@@ -1202,10 +1207,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 |
++--> |
123 |
+ <!-- Note the meta-inf below will work as long as there is only one JAR |
124 |
+ that needs to add entries. If there is more than one a more complex |
125 |
+ solution will be required. --> |
126 |
+@@ -1579,7 +1585,7 @@ |
127 |
+ |
128 |
+ <target name="extras-webservices-prepare" |
129 |
+ depends="extras-prepare" |
130 |
+- description="Prepare to build web services extras package"> |
131 |
++ description="Prepare to build web services extras package" unless="noget"> |
132 |
+ |
133 |
+ <antcall target="downloadfile"> |
134 |
+ <param name="sourcefile" value="${jaxrpc-lib.loc}"/> |
135 |
+@@ -1727,6 +1733,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. |
136 |
+ |
137 |
+ <target name="javadoc" depends="dist-source,extras-webservices-prepare" |
138 |
+ description="Create the Tomcat javadoc" > |
139 |
++<!-- |
140 |
+ <javadoc packagenames="javax.servlet.*" |
141 |
+ excludepackagenames="javax.servlet.jsp.*" |
142 |
+ sourcepath="${tomcat.dist}/src/java" |
143 |
+@@ -1791,6 +1798,7 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. |
144 |
+ <path location="${ant.core.lib}"/> |
145 |
+ </classpath> |
146 |
+ </javadoc> |
147 |
++--> |
148 |
+ <javadoc packagenames="javax.websocket.*" |
149 |
+ sourcepath="${tomcat.dist}/src/java" |
150 |
+ destdir="${tomcat.dist}/webapps/docs/websocketapi" |
151 |
+@@ -1831,9 +1839,11 @@ Apache Tomcat ${version} native binaries for Win64 AMD64/EMT64 platform. |
152 |
+ <path refid="tomcat.webservices.classpath"/> |
153 |
+ <path location="${ant.core.lib}"/> |
154 |
+ </classpath> |
155 |
++<!-- |
156 |
+ <link href="../servletapi"/> |
157 |
+ <link href="../jspapi"/> |
158 |
+ <link href="../elapi"/> |
159 |
++--> |
160 |
+ <link href="../websocketapi"/> |
161 |
+ <link href="http://docs.oracle.com/javase/7/docs/api/"/> |
162 |
+ <link href="http://commons.apache.org/proper/commons-io/javadocs/api-release/"/> |
163 |
+@@ -2574,7 +2584,7 @@ skip.installer property in build.properties" /> |
164 |
+ </target> |
165 |
+ |
166 |
+ <target name="download-compile" |
167 |
+- description="Download (and build) components necessary to compile" > |
168 |
++ description="Download (and build) components necessary to compile" unless="noget"> |
169 |
+ |
170 |
+ <antcall target="downloadfile-2"> |
171 |
+ <param name="sourcefile.1" value="${tomcat-native.loc.1}"/> |
172 |
+@@ -2608,7 +2618,7 @@ skip.installer property in build.properties" /> |
173 |
+ </target> |
174 |
+ |
175 |
+ <target name="download-test-compile" |
176 |
+- description="Download additional components for the tests" > |
177 |
++ description="Download additional components for the tests" unless="noget"> |
178 |
+ |
179 |
+ <antcall target="downloadfile"> |
180 |
+ <param name="sourcefile" value="${junit.loc}"/> |
181 |
+@@ -2665,7 +2675,7 @@ skip.installer property in build.properties" /> |
182 |
+ </target> |
183 |
+ |
184 |
+ <target name="download-dist" |
185 |
+- description="Download additional components for a distribution" > |
186 |
++ description="Download additional components for a distribution" unless="noget"> |
187 |
+ |
188 |
+ <antcall target="downloadzip-2"> |
189 |
+ <param name="sourcefile.1" value="${tomcat-native.win.1}"/> |
190 |
+@@ -2691,18 +2701,18 @@ skip.installer property in build.properties" /> |
191 |
+ |
192 |
+ <!-- =============== Utility Targets to support downloads ================ --> |
193 |
+ |
194 |
+- <target name="setproxy" if="${proxy.use}"> |
195 |
++ <target name="setproxy" if="${proxy.use}" unless="noget"> |
196 |
+ <setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" |
197 |
+ proxyuser="${proxy.user}" proxypassword="${proxy.password}" /> |
198 |
+ <echo message="Using ${proxy.host}:${proxy.port} to download ${sourcefile}"/> |
199 |
+ </target> |
200 |
+ |
201 |
+- <target name="testexist"> |
202 |
++ <target name="testexist" unless="noget"> |
203 |
+ <echo message="Testing for ${destfile}"/> |
204 |
+ <available file="${destfile}" property="exist"/> |
205 |
+ </target> |
206 |
+ |
207 |
+- <target name="downloadgz" unless="exist" depends="testexist,setproxy"> |
208 |
++ <target name="downloadgz" unless="noget" depends="testexist,setproxy"> |
209 |
+ <!-- Download and extract the package --> |
210 |
+ <local name="temp.file"/> |
211 |
+ <mkdir dir="${base.path}"/> |
212 |
+@@ -2714,7 +2724,7 @@ skip.installer property in build.properties" /> |
213 |
+ <delete file="${temp.file}.tar.gz"/> |
214 |
+ </target> |
215 |
+ |
216 |
+- <target name="downloadgz-2" unless="exist" depends="testexist"> |
217 |
++ <target name="downloadgz-2" unless="noget" depends="testexist"> |
218 |
+ <!-- Download and extract the package from the two alternative locations --> |
219 |
+ <local name="temp.file"/> |
220 |
+ <mkdir dir="${base.path}"/> |
221 |
+@@ -2733,7 +2743,7 @@ skip.installer property in build.properties" /> |
222 |
+ <delete file="${temp.file}.tar.gz"/> |
223 |
+ </target> |
224 |
+ |
225 |
+- <target name="downloadzip" unless="exist" depends="testexist,setproxy"> |
226 |
++ <target name="downloadzip" unless="noget" depends="testexist,setproxy"> |
227 |
+ <!-- Download and extract the package --> |
228 |
+ <local name="temp.file"/> |
229 |
+ <mkdir dir="${base.path}"/> |
230 |
+@@ -2744,7 +2754,7 @@ skip.installer property in build.properties" /> |
231 |
+ <delete file="${temp.file}"/> |
232 |
+ </target> |
233 |
+ |
234 |
+- <target name="downloadzip-2" unless="exist" depends="testexist"> |
235 |
++ <target name="downloadzip-2" unless="noget" depends="testexist"> |
236 |
+ <!-- Download and extract the package from the two alternative locations --> |
237 |
+ <local name="temp.file"/> |
238 |
+ <mkdir dir="${base.path}"/> |
239 |
+@@ -2762,7 +2772,7 @@ skip.installer property in build.properties" /> |
240 |
+ <delete file="${temp.file}"/> |
241 |
+ </target> |
242 |
+ |
243 |
+- <target name="downloadfile" unless="exist" depends="testexist,setproxy"> |
244 |
++ <target name="downloadfile" unless="noget" depends="testexist,setproxy"> |
245 |
+ <!-- Download the file --> |
246 |
+ <local name="temp.file"/> |
247 |
+ <mkdir dir="${base.path}"/> |
248 |
+@@ -2772,7 +2782,7 @@ skip.installer property in build.properties" /> |
249 |
+ <move file="${temp.file}" tofile="${destfile}"/> |
250 |
+ </target> |
251 |
+ |
252 |
+- <target name="downloadfile-2" unless="exist" depends="testexist"> |
253 |
++ <target name="downloadfile-2" unless="noget" depends="testexist"> |
254 |
+ <!-- Download the file from the two alternative locations --> |
255 |
+ <local name="temp.file"/> |
256 |
+ <mkdir dir="${base.path}"/> |
257 |
+@@ -2795,7 +2805,7 @@ skip.installer property in build.properties" /> |
258 |
+ <move file="${temp.file}" tofile="${destfile}"/> |
259 |
+ </target> |
260 |
+ |
261 |
+- <target name="trydownload.check" depends="setproxy"> |
262 |
++ <target name="trydownload.check" depends="setproxy" unless="noget"> |
263 |
+ <condition property="trydownload.run"> |
264 |
+ <and> |
265 |
+ <not> |
266 |
+@@ -2806,7 +2816,7 @@ skip.installer property in build.properties" /> |
267 |
+ </condition> |
268 |
+ </target> |
269 |
+ |
270 |
+- <target name="trydownload" if="trydownload.run" depends="trydownload.check"> |
271 |
++ <target name="trydownload" if="trydownload.run" depends="trydownload.check" unless="noget"> |
272 |
+ <!-- Downloads a file if not yet downloaded and the source URL is available --> |
273 |
+ <get src="${sourcefile}" httpusecaches="${trydownload.httpusecaches}" dest="${destfile}" /> |
274 |
+ </target> |
275 |
+@@ -2817,7 +2827,7 @@ skip.installer property in build.properties" /> |
276 |
+ |
277 |
+ <target name="ide-eclipse" |
278 |
+ depends="download-compile, extras-webservices-prepare, download-test-compile" |
279 |
+- description="Prepares the source tree to be built in Eclipse"> |
280 |
++ description="Prepares the source tree to be built in Eclipse" unless="noget"> |
281 |
+ |
282 |
+ <!-- Copy the sample project files into the root directory --> |
283 |
+ <copy file="${tomcat.home}/res/ide-support/eclipse/eclipse.project" tofile="${tomcat.home}/.project"/> |
284 |
|
285 |
diff --git a/www-servers/tomcat/tomcat-8.5.20.ebuild b/www-servers/tomcat/tomcat-8.5.20.ebuild |
286 |
new file mode 100644 |
287 |
index 00000000000..f76cec3287c |
288 |
--- /dev/null |
289 |
+++ b/www-servers/tomcat/tomcat-8.5.20.ebuild |
290 |
@@ -0,0 +1,157 @@ |
291 |
+# Copyright 1999-2017 Gentoo Foundation |
292 |
+# Distributed under the terms of the GNU General Public License v2 |
293 |
+ |
294 |
+EAPI=6 |
295 |
+ |
296 |
+JAVA_PKG_IUSE="doc source test" |
297 |
+ |
298 |
+inherit eutils java-pkg-2 java-ant-2 prefix user |
299 |
+ |
300 |
+MY_P="apache-${P}-src" |
301 |
+ |
302 |
+DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container" |
303 |
+HOMEPAGE="http://tomcat.apache.org/" |
304 |
+SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz" |
305 |
+ |
306 |
+LICENSE="Apache-2.0" |
307 |
+SLOT="8.5" |
308 |
+KEYWORDS="~amd64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris" |
309 |
+IUSE="extra-webapps" |
310 |
+ |
311 |
+RESTRICT="test" # can we run them on a production system? |
312 |
+ |
313 |
+ECJ_SLOT="4.5" |
314 |
+SAPI_SLOT="3.1" |
315 |
+ |
316 |
+COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} |
317 |
+ >=dev-java/tomcat-servlet-api-${SLOT}:${SAPI_SLOT}" |
318 |
+RDEPEND="${COMMON_DEP} |
319 |
+ !<dev-java/tomcat-native-1.1.24 |
320 |
+ >=virtual/jre-1.7" |
321 |
+DEPEND="${COMMON_DEP} |
322 |
+ app-admin/pwgen |
323 |
+ >=virtual/jdk-1.7 |
324 |
+ test? ( |
325 |
+ >=dev-java/ant-junit-1.9:0 |
326 |
+ dev-java/easymock:3.2 |
327 |
+ )" |
328 |
+ |
329 |
+S=${WORKDIR}/${MY_P} |
330 |
+ |
331 |
+pkg_setup() { |
332 |
+ java-pkg-2_pkg_setup |
333 |
+ enewgroup tomcat 265 |
334 |
+ enewuser tomcat 265 -1 /dev/null tomcat |
335 |
+} |
336 |
+ |
337 |
+src_prepare() { |
338 |
+ default |
339 |
+ |
340 |
+ find -name '*.jar' -type f -delete -print || die |
341 |
+ |
342 |
+ # Remove bundled servlet-api |
343 |
+ rm -rv java/javax/{el,servlet} || die |
344 |
+ |
345 |
+ epatch "${FILESDIR}/${P}-build.xml.patch" |
346 |
+ |
347 |
+ # For use of catalina.sh in netbeans |
348 |
+ sed -i -e "/^# ----- Execute The Requested Command/ a\ |
349 |
+ CLASSPATH=\`java-config --classpath ${PN}-${SLOT}\`" \ |
350 |
+ bin/catalina.sh || die |
351 |
+ |
352 |
+ java-pkg-2_src_prepare |
353 |
+} |
354 |
+ |
355 |
+JAVA_ANT_REWRITE_CLASSPATH="true" |
356 |
+ |
357 |
+EANT_BUILD_TARGET="deploy" |
358 |
+EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}" |
359 |
+EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" |
360 |
+EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" |
361 |
+EANT_NEEDS_TOOLS="true" |
362 |
+EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false" |
363 |
+ |
364 |
+# revisions of the scripts |
365 |
+IM_REV="-r2" |
366 |
+INIT_REV="-r1" |
367 |
+ |
368 |
+src_compile() { |
369 |
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)" |
370 |
+ java-pkg-2_src_compile |
371 |
+} |
372 |
+ |
373 |
+src_test() { |
374 |
+ java-pkg-2_src_test |
375 |
+} |
376 |
+ |
377 |
+src_install() { |
378 |
+ local dest="/usr/share/${PN}-${SLOT}" |
379 |
+ |
380 |
+ java-pkg_jarinto "${dest}"/bin |
381 |
+ java-pkg_dojar output/build/bin/*.jar |
382 |
+ exeinto "${dest}"/bin |
383 |
+ doexe output/build/bin/*.sh |
384 |
+ |
385 |
+ java-pkg_jarinto "${dest}"/lib |
386 |
+ java-pkg_dojar output/build/lib/*.jar |
387 |
+ |
388 |
+ dodoc RELEASE-NOTES RUNNING.txt |
389 |
+ use doc && java-pkg_dojavadoc output/dist/webapps/docs/api |
390 |
+ use source && java-pkg_dosrc java/* |
391 |
+ |
392 |
+ ### Webapps ### |
393 |
+ |
394 |
+ # add missing docBase |
395 |
+ local apps="host-manager manager" |
396 |
+ for app in ${apps}; do |
397 |
+ sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ |
398 |
+ output/build/webapps/${app}/META-INF/context.xml || die |
399 |
+ done |
400 |
+ |
401 |
+ insinto "${dest}"/webapps |
402 |
+ doins -r output/build/webapps/{host-manager,manager,ROOT} |
403 |
+ use extra-webapps && doins -r output/build/webapps/{docs,examples} |
404 |
+ |
405 |
+ ### Config ### |
406 |
+ |
407 |
+ # create "logs" directory in $CATALINA_BASE |
408 |
+ # and set correct perms, see #458890 |
409 |
+ dodir "${dest}"/logs |
410 |
+ fperms 0750 "${dest}"/logs |
411 |
+ |
412 |
+ # replace the default pw with a random one, see #92281 |
413 |
+ local randpw="$(pwgen -s -B 15 1)" |
414 |
+ sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die |
415 |
+ |
416 |
+ # prepend gentoo.classpath to common.loader, see #453212 |
417 |
+ sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die |
418 |
+ |
419 |
+ insinto "${dest}" |
420 |
+ doins -r output/build/conf |
421 |
+ |
422 |
+ ### rc ### |
423 |
+ |
424 |
+ cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die |
425 |
+ eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} |
426 |
+ sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die |
427 |
+ |
428 |
+ insinto "${dest}"/gentoo |
429 |
+ doins "${T}"/tomcat.conf |
430 |
+ exeinto "${dest}"/gentoo |
431 |
+ newexe "${T}"/tomcat${INIT_REV}.init tomcat.init |
432 |
+ newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash |
433 |
+} |
434 |
+ |
435 |
+pkg_postinst() { |
436 |
+ elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" |
437 |
+ elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." |
438 |
+ elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" |
439 |
+ |
440 |
+ elog "To manage Tomcat instances, run:" |
441 |
+ elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" |
442 |
+ |
443 |
+ ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" |
444 |
+ ewarn "from upstream binary if you need it. Gentoo Bug # 144276" |
445 |
+ |
446 |
+# einfo "Please read https://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information." |
447 |
+} |