1 |
fordfrog 08/09/11 17:27:06 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: tomcat-5.5.27.ebuild |
5 |
Log: |
6 |
Version bump |
7 |
(Portage version: 2.2_rc8/cvs/Linux 2.6.26-gentoo-r1 x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.190 www-servers/tomcat/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/tomcat/ChangeLog?rev=1.190&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/tomcat/ChangeLog?rev=1.190&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/tomcat/ChangeLog?r1=1.189&r2=1.190 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v |
19 |
retrieving revision 1.189 |
20 |
retrieving revision 1.190 |
21 |
diff -u -r1.189 -r1.190 |
22 |
--- ChangeLog 24 Aug 2008 10:59:25 -0000 1.189 |
23 |
+++ ChangeLog 11 Sep 2008 17:27:05 -0000 1.190 |
24 |
@@ -1,6 +1,11 @@ |
25 |
# ChangeLog for www-servers/tomcat |
26 |
# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.189 2008/08/24 10:59:25 corsair Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.190 2008/09/11 17:27:05 fordfrog Exp $ |
29 |
+ |
30 |
+*tomcat-5.5.27 (11 Sep 2008) |
31 |
+ |
32 |
+ 11 Sep 2008; Miroslav Ć ulc <fordfrog@g.o> +tomcat-5.5.27.ebuild: |
33 |
+ Version bump |
34 |
|
35 |
24 Aug 2008; Markus Rothe <corsair@g.o> tomcat-6.0.18.ebuild: |
36 |
Stable on ppc64; bug #234684 |
37 |
|
38 |
|
39 |
|
40 |
1.1 www-servers/tomcat/tomcat-5.5.27.ebuild |
41 |
|
42 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/tomcat/tomcat-5.5.27.ebuild?rev=1.1&view=markup |
43 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-servers/tomcat/tomcat-5.5.27.ebuild?rev=1.1&content-type=text/plain |
44 |
|
45 |
Index: tomcat-5.5.27.ebuild |
46 |
=================================================================== |
47 |
# Copyright 1999-2008 Gentoo Foundation |
48 |
# Distributed under the terms of the GNU General Public License v2 |
49 |
# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-5.5.27.ebuild,v 1.1 2008/09/11 17:27:05 fordfrog Exp $ |
50 |
|
51 |
EAPI=1 |
52 |
JAVA_PKG_IUSE="doc source" |
53 |
WANT_ANT_TASKS="ant-trax" |
54 |
|
55 |
inherit eutils java-pkg-2 java-ant-2 |
56 |
|
57 |
DESCRIPTION="Tomcat Servlet-2.4/JSP-2.0 Container" |
58 |
|
59 |
MY_P="apache-${P}-src" |
60 |
SLOT="5.5" |
61 |
SRC_URI="mirror://apache/${PN}/${PN}-5/v${PV}/src/${MY_P}.tar.gz" |
62 |
HOMEPAGE="http://tomcat.apache.org/" |
63 |
KEYWORDS="~amd64 -ppc -ppc64 ~x86 ~x86-fbsd" |
64 |
LICENSE="Apache-2.0" |
65 |
|
66 |
IUSE="admin java5 examples test" |
67 |
|
68 |
RDEPEND="dev-java/eclipse-ecj:3.3 |
69 |
dev-java/ant-eclipse-ecj:3.3 |
70 |
dev-java/commons-beanutils:1.7 |
71 |
>=dev-java/commons-collections-3.1 |
72 |
>=dev-java/commons-daemon-1.0.1 |
73 |
>=dev-java/commons-dbcp-1.2.1 |
74 |
>=dev-java/commons-digester-1.7 |
75 |
>=dev-java/commons-fileupload-1.1 |
76 |
dev-java/commons-httpclient:0 |
77 |
>=dev-java/commons-io-1.1 |
78 |
>=dev-java/commons-el-1.0 |
79 |
>=dev-java/commons-launcher-0.9 |
80 |
>=dev-java/commons-logging-1.0.4 |
81 |
>=dev-java/commons-modeler-2.0 |
82 |
>=dev-java/commons-pool-1.2 |
83 |
=dev-java/junit-3* |
84 |
>=dev-java/log4j-1.2.9 |
85 |
>=dev-java/saxpath-1.0 |
86 |
~dev-java/tomcat-servlet-api-${PV} |
87 |
dev-java/ant-core |
88 |
admin? ( dev-java/struts:1.2 ) |
89 |
dev-java/sun-javamail |
90 |
java5? ( >=virtual/jre-1.5 ) |
91 |
!java5? ( |
92 |
=virtual/jre-1.4* |
93 |
dev-java/sun-jaf |
94 |
dev-java/mx4j-core:3.0 |
95 |
dev-java/xerces:2 |
96 |
dev-java/xml-commons-external:1.3 |
97 |
)" |
98 |
DEPEND="java5? ( >=virtual/jdk-1.5 ) |
99 |
!java5? ( =virtual/jdk-1.4* ) |
100 |
${RDEPEND}" |
101 |
|
102 |
S=${WORKDIR}/${MY_P} |
103 |
|
104 |
TOMCAT_NAME="${PN}-${SLOT}" |
105 |
WEBAPPS_DIR="/var/lib/${TOMCAT_NAME}/webapps" |
106 |
|
107 |
pkg_setup() { |
108 |
java-pkg-2_pkg_setup |
109 |
# new user for tomcat |
110 |
enewgroup tomcat |
111 |
enewuser tomcat -1 -1 /dev/null tomcat |
112 |
|
113 |
java-pkg_filter-compiler ecj-3.1 ecj-3.2 |
114 |
} |
115 |
|
116 |
src_unpack() { |
117 |
unpack ${A} |
118 |
cd "${S}" |
119 |
|
120 |
epatch "${FILESDIR}/${SLOT}/26-main_tomcat_catalina_jasper_build_xml.patch" |
121 |
|
122 |
use examples && epatch "${FILESDIR}/${SLOT}/jsr152_jsr154_examples_build_xml.patch" |
123 |
|
124 |
sed -i -e 's:${struts.lib}:/usr/share/struts-1.2:' \ |
125 |
"${S}/container/webapps/admin/build.xml" |
126 |
|
127 |
# avoid packed jars :-) |
128 |
mkdir -p "${S}"/build/build/common |
129 |
cd "${S}"/build/build |
130 |
|
131 |
mkdir ./bin && cd ./bin |
132 |
java-pkg_jar-from commons-logging commons-logging-api.jar |
133 |
java-pkg_jar-from commons-daemon |
134 |
if ! use java5; then |
135 |
java-pkg_jar-from mx4j-core-3.0 mx4j.jar jmx.jar |
136 |
java-pkg_jar-from mx4j-core-3.0 mx4j-rjmx.jar jmx-remote.jar |
137 |
mkdir "${S}"/build/build/common/endorsed && cd "${S}"/build/build/common/endorsed |
138 |
java-pkg_jar-from xml-commons-external-1.3 xml-apis.jar |
139 |
java-pkg_jar-from xerces-2 xercesImpl.jar |
140 |
fi |
141 |
|
142 |
mkdir "${S}"/build/build/common/lib && cd "${S}"/build/build/common/lib |
143 |
java-pkg_jar-from ant-core |
144 |
java-pkg_jar-from commons-collections |
145 |
java-pkg_jar-from commons-dbcp |
146 |
java-pkg_jar-from commons-el |
147 |
java-pkg_jar-from commons-pool |
148 |
java-pkg_jar-from tomcat-servlet-api-2.4 |
149 |
|
150 |
mkdir -p "${S}"/build/build/server/lib && cd "${S}"/build/build/server/lib |
151 |
java-pkg_jar-from commons-beanutils-1.7 commons-beanutils.jar |
152 |
java-pkg_jar-from commons-digester |
153 |
java-pkg_jar-from commons-modeler |
154 |
|
155 |
} |
156 |
|
157 |
src_compile(){ |
158 |
local antflags="-Dbase.path=${T}" |
159 |
|
160 |
antflags="${antflags} -Dservletapi.build.notrequired=true" |
161 |
antflags="${antflags} -Djspapi.build.notrequired=true" |
162 |
antflags="${antflags} -Dcommons-beanutils.jar=$(java-pkg_getjar commons-beanutils-1.7 commons-beanutils.jar)" |
163 |
antflags="${antflags} -Dcommons-collections.jar=$(java-pkg_getjars commons-collections)" |
164 |
antflags="${antflags} -Dcommons-daemon.jar=$(java-pkg_getjars commons-daemon)" |
165 |
antflags="${antflags} -Dcommons-digester.jar=$(java-pkg_getjars commons-digester)" |
166 |
antflags="${antflags} -Dcommons-dbcp.jar=$(java-pkg_getjars commons-dbcp)" |
167 |
antflags="${antflags} -Dcommons-el.jar=$(java-pkg_getjars commons-el)" |
168 |
antflags="${antflags} -Dcommons-fileupload.jar=$(java-pkg_getjars commons-fileupload)" |
169 |
antflags="${antflags} -Dcommons-httpclient.jar=$(java-pkg_getjars commons-httpclient)" |
170 |
antflags="${antflags} -Dcommons-io.jar=$(java-pkg_getjars commons-io-1)" |
171 |
antflags="${antflags} -Dcommons-launcher.jar=$(java-pkg_getjars commons-launcher)" |
172 |
antflags="${antflags} -Dcommons-logging.jar=$(java-pkg_getjar commons-logging commons-logging.jar)" |
173 |
antflags="${antflags} -Dcommons-logging-api.jar=$(java-pkg_getjar commons-logging commons-logging-api.jar)" |
174 |
antflags="${antflags} -Dcommons-pool.jar=$(java-pkg_getjars commons-pool)" |
175 |
antflags="${antflags} -Dcommons-modeler.jar=$(java-pkg_getjars commons-modeler)" |
176 |
antflags="${antflags} -Djdt.jar=$(java-pkg_getjar eclipse-ecj-3.3 ecj.jar)" |
177 |
antflags="${antflags} -Djsp-api.jar=$(java-pkg_getjar tomcat-servlet-api-2.4 jsp-api.jar)" |
178 |
antflags="${antflags} -Djunit.jar=$(java-pkg_getjars junit)" |
179 |
antflags="${antflags} -Dlog4j.jar=$(java-pkg_getjars log4j)" |
180 |
antflags="${antflags} -Dmail.jar=$(java-pkg_getjar sun-javamail mail.jar)" |
181 |
antflags="${antflags} -Dsaxpath.jar=$(java-pkg_getjar saxpath saxpath.jar)" |
182 |
antflags="${antflags} -Dservlet-api.jar=$(java-pkg_getjar tomcat-servlet-api-2.4 servlet-api.jar)" |
183 |
if use admin; then |
184 |
antflags="${antflags} -Dstruts.jar=$(java-pkg_getjar struts-1.2 struts.jar)" |
185 |
antflags="${antflags} -Dstruts.home=/usr/share/struts" |
186 |
else |
187 |
antflags="${antflags} -Dadmin.build.notrequired=true" |
188 |
antflags="${antflags} -Dadmin.precompile.notrequired=true" |
189 |
fi |
190 |
if ! use examples; then |
191 |
antflags="${antflags} -Dexamples.build.notrequired=true" |
192 |
antflags="${antflags} -Dexamples.precompile.notrequired=true" |
193 |
fi |
194 |
antflags="${antflags} -Djasper.home=${S}/jasper" |
195 |
if ! use java5; then |
196 |
antflags="${antflags} -Dactivation.jar=$(java-pkg_getjars sun-jaf)" |
197 |
antflags="${antflags} -Djmx.jar=$(java-pkg_getjar mx4j-core-3.0 mx4j.jar)" |
198 |
antflags="${antflags} -Djmx-remote.jar=$(java-pkg_getjar mx4j-core-3.0 mx4j-rjmx.jar)" |
199 |
antflags="${antflags} -DxercesImpl.jar=$(java-pkg_getjar xerces-2 xercesImpl.jar)" |
200 |
antflags="${antflags} -Dxml-apis.jar=$(java-pkg_getjar xml-commons-external-1.3 xml-apis.jar)" |
201 |
fi |
202 |
|
203 |
eant ${antflags} |
204 |
} |
205 |
|
206 |
src_install() { |
207 |
cd "${S}"/build/build |
208 |
|
209 |
# init.d, conf.d |
210 |
newinitd "${FILESDIR}"/${SLOT}/tomcat.init.2 ${TOMCAT_NAME} |
211 |
newconfd "${FILESDIR}"/${SLOT}/tomcat.conf.2 ${TOMCAT_NAME} |
212 |
|
213 |
# create dir structure |
214 |
diropts -m755 -o tomcat -g tomcat |
215 |
dodir /usr/share/${TOMCAT_NAME} |
216 |
keepdir /var/log/${TOMCAT_NAME}/ |
217 |
keepdir /var/tmp/${TOMCAT_NAME}/ |
218 |
keepdir /var/run/${TOMCAT_NAME}/ |
219 |
|
220 |
local CATALINA_BASE=/var/lib/${TOMCAT_NAME}/ |
221 |
dodir ${CATALINA_BASE} |
222 |
keepdir ${CATALINA_BASE}/shared/lib |
223 |
keepdir ${CATALINA_BASE}/shared/classes |
224 |
|
225 |
keepdir /usr/share/${TOMCAT_NAME}/common/lib |
226 |
|
227 |
dodir /etc/${TOMCAT_NAME} |
228 |
fperms 750 /etc/${TOMCAT_NAME} |
229 |
|
230 |
diropts -m0755 |
231 |
|
232 |
# we don't need dos scripts |
233 |
rm -f bin/*.bat |
234 |
|
235 |
# copy the manager and admin context's to the right position |
236 |
mkdir -p conf/Catalina/localhost |
237 |
if use admin; then |
238 |
cp "${S}"/container/webapps/admin/admin.xml \ |
239 |
conf/Catalina/localhost |
240 |
fi |
241 |
cp "${S}"/container/webapps/manager/manager.xml \ |
242 |
conf/Catalina/localhost |
243 |
|
244 |
# make the jars available via java-pkg_getjar and jar-from, etc |
245 |
base=$(pwd) |
246 |
libdirs="common/lib server/lib" |
247 |
for dir in ${libdirs} |
248 |
do |
249 |
cd "${dir}" |
250 |
|
251 |
for jar in *.jar; |
252 |
do |
253 |
# replace the file with a symlink |
254 |
if [ ! -L ${jar} ]; then |
255 |
java-pkg_dojar ${jar} |
256 |
rm -f ${jar} |
257 |
ln -s ${DESTTREE}/share/${TOMCAT_NAME}/lib/${jar} ${jar} |
258 |
fi |
259 |
done |
260 |
|
261 |
cd ${base} |
262 |
done |
263 |
|
264 |
# replace a packed struts.jar |
265 |
if use admin; then |
266 |
cd server/webapps/admin/WEB-INF/lib |
267 |
rm -f struts.jar |
268 |
java-pkg_jar-from struts-1.2 struts.jar |
269 |
cd ${base} |
270 |
else |
271 |
rm -fR server/webapps/admin |
272 |
fi |
273 |
|
274 |
cd server/webapps/manager/WEB-INF/lib |
275 |
java-pkg_jar-from commons-fileupload |
276 |
java-pkg_jar-from commons-io-1 |
277 |
cd ${base} |
278 |
|
279 |
# replace the default pw with a random one, see #92281 |
280 |
local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15) |
281 |
sed -e s:SHUTDOWN:${randpw}: -i conf/{server,server-minimal}.xml |
282 |
|
283 |
# copy over the directories |
284 |
chown -R tomcat:tomcat webapps/* conf/* |
285 |
cp -pR conf/* "${D}"/etc/${TOMCAT_NAME} || die "failed to copy conf" |
286 |
cp -HR bin common server "${D}"/usr/share/${TOMCAT_NAME} || die "failed to copy" |
287 |
|
288 |
# replace catalina.policy with gentoo specific one bug #176701 |
289 |
cp "${FILESDIR}"/${SLOT}/catalina.policy "${D}"/etc/${TOMCAT_NAME} || die "failed to replace catalina.policy" |
290 |
|
291 |
keepdir ${WEBAPPS_DIR} |
292 |
set_webapps_perms "${D}"/${WEBAPPS_DIR} |
293 |
|
294 |
# Copy over webapps, some controlled by use flags |
295 |
cp -p ../RELEASE-NOTES webapps/ROOT/RELEASE-NOTES.txt |
296 |
cp -pr webapps/ROOT "${D}"${CATALINA_BASE}/webapps |
297 |
if use doc; then |
298 |
cp -pr webapps/tomcat-docs "${D}"${CATALINA_BASE}/webapps |
299 |
fi |
300 |
if use examples; then |
301 |
cp -pr webapps/{jsp-examples,servlets-examples,webdav} \ |
302 |
"${D}"${CATALINA_BASE}/webapps |
303 |
fi |
304 |
|
305 |
# symlink the directories to make CATALINA_BASE possible |
306 |
dosym /etc/${TOMCAT_NAME} ${CATALINA_BASE}/conf |
307 |
dosym /var/log/${TOMCAT_NAME} ${CATALINA_BASE}/logs |
308 |
dosym /var/tmp/${TOMCAT_NAME} ${CATALINA_BASE}/temp |
309 |
dosym /var/run/${TOMCAT_NAME} ${CATALINA_BASE}/work |
310 |
|
311 |
dodoc "${S}"/build/{RELEASE-NOTES,RUNNING.txt} |
312 |
fperms 640 /etc/${TOMCAT_NAME}/tomcat-users.xml |
313 |
} |
314 |
|
315 |
pkg_postinst() { |
316 |
#due to previous ebuild bloopers, make sure everything is correct |
317 |
chown root:root /etc/init.d/${TOMCAT_NAME} |
318 |
chown root:root /etc/conf.d/${TOMCAT_NAME} |
319 |
|
320 |
elog |
321 |
elog " This ebuild implements a new filesystem layout for tomcat" |
322 |
elog " please read http://www.gentoo.org/proj/en/java/tomcat-guide.xml" |
323 |
elog " for more information!." |
324 |
elog |
325 |
ewarn "naming-factory-dbcp.jar is not built at this time. Please fetch" |
326 |
ewarn "jar from upstream binary if you need it. Gentoo Bug # 144276" |
327 |
elog |
328 |
elog " Please file any bugs at http://bugs.gentoo.org/ or else it" |
329 |
elog " may not get seen. Thank you." |
330 |
elog |
331 |
} |
332 |
|
333 |
#helpers |
334 |
set_webapps_perms() { |
335 |
chown tomcat:tomcat ${1} || die "Failed to change owner off ${1}." |
336 |
chmod 750 ${1} || die "Failed to change permissions off ${1}." |
337 |
} |
338 |
|
339 |
pkg_config() { |
340 |
# Better suggestions are welcome |
341 |
local currentdir="$(getent passwd tomcat | gawk -F':' '{ print $6 }')" |
342 |
|
343 |
elog "The default home directory for Tomcat is /dev/null." |
344 |
elog "You need to change it if your applications needs it to" |
345 |
elog "be an actual directory. Current home directory:" |
346 |
elog "${currentdir}" |
347 |
elog "" |
348 |
elog "Do you want to change it [yes/no]?" |
349 |
|
350 |
local answer |
351 |
read answer |
352 |
|
353 |
if [[ "${answer}" == "yes" ]]; then |
354 |
elog "" |
355 |
elog "Suggestions:" |
356 |
elog "${WEBAPPS_DIR}" |
357 |
elog "" |
358 |
elog "If you want to suggest a directory, file a bug to" |
359 |
elog "http://bugs.gentoo.org" |
360 |
elog "" |
361 |
elog "Enter home directory:" |
362 |
|
363 |
local homedir |
364 |
read homedir |
365 |
|
366 |
elog "" |
367 |
elog "Setting home directory to: ${homedir}" |
368 |
|
369 |
/usr/sbin/usermod -d"${homedir}" tomcat |
370 |
|
371 |
elog "You can run emerge --config =${PF}" |
372 |
elog "again to change to homedir" |
373 |
elog "at any time." |
374 |
fi |
375 |
} |