1 |
commit: 37fc3fe4905a6536624ba3e8a9f179d4713c8111 |
2 |
Author: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jul 13 21:36:01 2016 +0000 |
4 |
Commit: Miroslav Šulc <fordfrog <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jul 13 21:39:45 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=37fc3fe4 |
7 |
|
8 |
www-servers/tomcat: version bump in slot 8.5 |
9 |
|
10 |
Package-Manager: portage-2.3.0 |
11 |
|
12 |
www-servers/tomcat/Manifest | 1 + |
13 |
.../tomcat/files/tomcat-8.5.4-build.xml.patch | 250 +++++++++++++++++++++ |
14 |
www-servers/tomcat/tomcat-8.5.4.ebuild | 154 +++++++++++++ |
15 |
3 files changed, 405 insertions(+) |
16 |
|
17 |
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest |
18 |
index cbdd234..b1f3b24 100644 |
19 |
--- a/www-servers/tomcat/Manifest |
20 |
+++ b/www-servers/tomcat/Manifest |
21 |
@@ -7,4 +7,5 @@ DIST apache-tomcat-8.0.33-src.tar.gz 4969308 SHA256 1a141b90111347640df57fe506d9 |
22 |
DIST apache-tomcat-8.0.35-src.tar.gz 4980657 SHA256 420036fde5e1bfe0a3d27299e355ee153b7c547d17c7b52fe4b15a1315d9c4e9 SHA512 c56ba4339fc114cda9a784c7f37be99c82238bbe043f69a3bed2ec86a0bf60325af9105d74cfcffa144636fecc7f4730cee08eca3a22ed035dd5e3e483fa1742 WHIRLPOOL 38d2382eabe19be8b008eb8975ddf95e086b482eb58cb56f566cf4ec7c7628663260a550b611f4db57803e503ab6746aedaac279bff24868c5997eaee3514966 |
23 |
DIST apache-tomcat-8.0.36-src.tar.gz 4988679 SHA256 36db67592adda575fc08dd5f0cd3532934d2edb117028e29bdd9f702bf31ab10 SHA512 192a31eb42afdc345fa5ea5f05b03766e70a67841fca9bd9c76bcd47ae1d505fd3cd1fde6bc64e145add2b6a9e88ecc50ab1a0954942704c139ec3c7a6bf7286 WHIRLPOOL da1bb6570d62caedfe83948f2e850ec7e8bdba36925d1f000067864c98b1bd780aabf2f1cbcb66cb544db292156a98819e9cc6dfa42a345064f09dcc4471a7c3 |
24 |
DIST apache-tomcat-8.5.3-src.tar.gz 5001008 SHA256 d0d1ecfd88d733cf3666cc39483ea092627840cd2cfab8fae09f93b7bf05d21d SHA512 7c4da46725c6e34669f538f406e699c235b99b4ec47a289f4fcbf93b49a35082cea3e041bee8a2772a29c240521d8720b2b50b5cda7afe0ec0f2b4f5cb29bda5 WHIRLPOOL 2ad999e8ee068d66164e2a256ee58f47799251fab60cf9af3a67128b131a07116a2faf2da6eef132e13f5df6ed78f1c44ac69bf5615178b63452fbffc62a4852 |
25 |
+DIST apache-tomcat-8.5.4-src.tar.gz 5000058 SHA256 bb35d2b37e2ff237e09e389dbfb0a99fa8a71f11c947c20f5bbea375f6f3449d SHA512 65d4d72eb46d75d6985f07c6d630d0b27cafb08f3cf125710b78d29d5737798341d484b1f12ae5cfc7347f9984563213b00a5aaab64f920f65f13a3d6009083d WHIRLPOOL bef3192957e91e4964d84f969961c32a61e4a4b5c8acdfcf56c6f6a87c6f3f4dd4350d099fd9904e07e9e1ba8369fa4e86c54a8e25c26a7c0b6a3518aacd9582 |
26 |
DIST apache-tomcat-9.0.0.M8-src.tar.gz 5024499 SHA256 bef36f9ead80188a8859fc1fa9846e77e570c54c99c05388857dc6dd29f526f8 SHA512 b1778709bddf6b0d1263115a57c743fcb58286b58dda384b06079ddcab8188a63de48efd3f47b6314c92154dd01c7bd1c8858ac2ea82d20a3d90c80899edcf87 WHIRLPOOL 8083b108a49ac0e066104a5849fcc6ef6c1355c09d9854d50a4108df769384664d0b37aa0cc85f59361a080e73fb585de36916855e1fcef1a441c4225653aca6 |
27 |
|
28 |
diff --git a/www-servers/tomcat/files/tomcat-8.5.4-build.xml.patch b/www-servers/tomcat/files/tomcat-8.5.4-build.xml.patch |
29 |
new file mode 100644 |
30 |
index 0000000..611c99d |
31 |
--- /dev/null |
32 |
+++ b/www-servers/tomcat/files/tomcat-8.5.4-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.4.ebuild b/www-servers/tomcat/tomcat-8.5.4.ebuild |
286 |
new file mode 100644 |
287 |
index 0000000..b0508e4 |
288 |
--- /dev/null |
289 |
+++ b/www-servers/tomcat/tomcat-8.5.4.ebuild |
290 |
@@ -0,0 +1,154 @@ |
291 |
+# Copyright 1999-2016 Gentoo Foundation |
292 |
+# Distributed under the terms of the GNU General Public License v2 |
293 |
+# $Id$ |
294 |
+ |
295 |
+EAPI=5 |
296 |
+ |
297 |
+JAVA_PKG_IUSE="doc source test" |
298 |
+ |
299 |
+inherit eutils java-pkg-2 java-ant-2 prefix user |
300 |
+ |
301 |
+MY_P="apache-${P}-src" |
302 |
+ |
303 |
+DESCRIPTION="Tomcat Servlet-3.1/JSP-2.3/EL-3.0/WebSocket-1.1/JASPIC-1.1 Container" |
304 |
+HOMEPAGE="http://tomcat.apache.org/" |
305 |
+SRC_URI="mirror://apache/${PN}/tomcat-8/v${PV}/src/${MY_P}.tar.gz" |
306 |
+ |
307 |
+LICENSE="Apache-2.0" |
308 |
+SLOT="8.5" |
309 |
+KEYWORDS="~amd64 ~x86 ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris" |
310 |
+IUSE="extra-webapps" |
311 |
+ |
312 |
+RESTRICT="test" # can we run them on a production system? |
313 |
+ |
314 |
+ECJ_SLOT="4.5" |
315 |
+SAPI_SLOT="3.1" |
316 |
+ |
317 |
+COMMON_DEP="dev-java/eclipse-ecj:${ECJ_SLOT} |
318 |
+ >=dev-java/tomcat-servlet-api-${SLOT}:${SAPI_SLOT}" |
319 |
+RDEPEND="${COMMON_DEP} |
320 |
+ !<dev-java/tomcat-native-1.1.24 |
321 |
+ >=virtual/jre-1.7" |
322 |
+DEPEND="${COMMON_DEP} |
323 |
+ app-admin/pwgen |
324 |
+ >=virtual/jdk-1.7 |
325 |
+ test? ( |
326 |
+ >=dev-java/ant-junit-1.9:0 |
327 |
+ dev-java/easymock:3.2 |
328 |
+ )" |
329 |
+ |
330 |
+S=${WORKDIR}/${MY_P} |
331 |
+ |
332 |
+pkg_setup() { |
333 |
+ java-pkg-2_pkg_setup |
334 |
+ enewgroup tomcat 265 |
335 |
+ enewuser tomcat 265 -1 /dev/null tomcat |
336 |
+} |
337 |
+ |
338 |
+java_prepare() { |
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 |
+ |
352 |
+JAVA_ANT_REWRITE_CLASSPATH="true" |
353 |
+ |
354 |
+EANT_BUILD_TARGET="deploy" |
355 |
+EANT_GENTOO_CLASSPATH="eclipse-ecj-${ECJ_SLOT},tomcat-servlet-api-${SAPI_SLOT}" |
356 |
+EANT_TEST_GENTOO_CLASSPATH="easymock-3.2" |
357 |
+EANT_GENTOO_CLASSPATH_EXTRA="${S}/output/classes" |
358 |
+EANT_NEEDS_TOOLS="true" |
359 |
+EANT_EXTRA_ARGS="-Dversion=${PV}-gentoo -Dversion.number=${PV} -Dcompile.debug=false" |
360 |
+ |
361 |
+# revisions of the scripts |
362 |
+IM_REV="-r2" |
363 |
+INIT_REV="-r1" |
364 |
+ |
365 |
+src_compile() { |
366 |
+ EANT_GENTOO_CLASSPATH_EXTRA+=":$(java-pkg_getjar --build-only ant-core ant.jar)" |
367 |
+ java-pkg-2_src_compile |
368 |
+} |
369 |
+ |
370 |
+src_test() { |
371 |
+ java-pkg-2_src_test |
372 |
+} |
373 |
+ |
374 |
+src_install() { |
375 |
+ local dest="/usr/share/${PN}-${SLOT}" |
376 |
+ |
377 |
+ java-pkg_jarinto "${dest}"/bin |
378 |
+ java-pkg_dojar output/build/bin/*.jar |
379 |
+ exeinto "${dest}"/bin |
380 |
+ doexe output/build/bin/*.sh |
381 |
+ |
382 |
+ java-pkg_jarinto "${dest}"/lib |
383 |
+ java-pkg_dojar output/build/lib/*.jar |
384 |
+ |
385 |
+ dodoc RELEASE-NOTES RUNNING.txt |
386 |
+ use doc && java-pkg_dojavadoc output/dist/webapps/docs/api |
387 |
+ use source && java-pkg_dosrc java/* |
388 |
+ |
389 |
+ ### Webapps ### |
390 |
+ |
391 |
+ # add missing docBase |
392 |
+ local apps="host-manager manager" |
393 |
+ for app in ${apps}; do |
394 |
+ sed -i -e "s|=\"true\" >|=\"true\" docBase=\"\$\{catalina.home\}/webapps/${app}\" >|" \ |
395 |
+ output/build/webapps/${app}/META-INF/context.xml || die |
396 |
+ done |
397 |
+ |
398 |
+ insinto "${dest}"/webapps |
399 |
+ doins -r output/build/webapps/{host-manager,manager,ROOT} |
400 |
+ use extra-webapps && doins -r output/build/webapps/{docs,examples} |
401 |
+ |
402 |
+ ### Config ### |
403 |
+ |
404 |
+ # create "logs" directory in $CATALINA_BASE |
405 |
+ # and set correct perms, see #458890 |
406 |
+ dodir "${dest}"/logs |
407 |
+ fperms 0750 "${dest}"/logs |
408 |
+ |
409 |
+ # replace the default pw with a random one, see #92281 |
410 |
+ local randpw="$(pwgen -s -B 15 1)" |
411 |
+ sed -i -e "s|SHUTDOWN|${randpw}|" output/build/conf/server.xml || die |
412 |
+ |
413 |
+ # prepend gentoo.classpath to common.loader, see #453212 |
414 |
+ sed -i -e 's/^common\.loader=/\0${gentoo.classpath},/' output/build/conf/catalina.properties || die |
415 |
+ |
416 |
+ insinto "${dest}" |
417 |
+ doins -r output/build/conf |
418 |
+ |
419 |
+ ### rc ### |
420 |
+ |
421 |
+ cp "${FILESDIR}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} "${T}" || die |
422 |
+ eprefixify "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} |
423 |
+ sed -i -e "s|@SLOT@|${SLOT}|g" "${T}"/tomcat{.conf,${INIT_REV}.init,-instance-manager${IM_REV}.bash} || die |
424 |
+ |
425 |
+ insinto "${dest}"/gentoo |
426 |
+ doins "${T}"/tomcat.conf |
427 |
+ exeinto "${dest}"/gentoo |
428 |
+ newexe "${T}"/tomcat${INIT_REV}.init tomcat.init |
429 |
+ newexe "${T}"/tomcat-instance-manager${IM_REV}.bash tomcat-instance-manager.bash |
430 |
+} |
431 |
+ |
432 |
+pkg_postinst() { |
433 |
+ elog "New ebuilds of Tomcat support running multiple instances. If you used prior version" |
434 |
+ elog "of Tomcat (<7.0.32), you have to migrate your existing instance to work with new Tomcat." |
435 |
+ elog "You can find more information at https://wiki.gentoo.org/wiki/Apache_Tomcat" |
436 |
+ |
437 |
+ elog "To manage Tomcat instances, run:" |
438 |
+ elog " ${EPREFIX}/usr/share/${PN}-${SLOT}/gentoo/tomcat-instance-manager.bash --help" |
439 |
+ |
440 |
+ ewarn "tomcat-dbcp.jar is not built at this time. Please fetch jar" |
441 |
+ ewarn "from upstream binary if you need it. Gentoo Bug # 144276" |
442 |
+ |
443 |
+# einfo "Please read https://www.gentoo.org/proj/en/java/tomcat6-guide.xml for more information." |
444 |
+} |