]>
Commit | Line | Data |
---|---|---|
1 | # | |
2 | # Conditional build: | |
3 | %bcond_with binary # build from binary source | |
4 | %bcond_without javadoc # skip building javadocs | |
5 | # | |
6 | Summary: Apache Servlet/JSP Engine, RI for Servlet 2.4/JSP 2.0 API | |
7 | Summary(pl.UTF-8): Silnik Servlet/JSP Apache będący wzorcową implementacją API Servlet 2.4/JSP 2.0 | |
8 | Name: apache-tomcat | |
9 | Version: 5.5.23 | |
10 | Release: 0.1 | |
11 | License: Apache | |
12 | Group: Development/Languages/Java | |
13 | #Source0: http://www.apache.org/dist/tomcat/tomcat-5/v5.0.30/src/%{name}-%{version}-src.tar.gz | |
14 | Source0: http://www.apache.org/dist/tomcat/tomcat-5/v%{version}/src/%{name}-%{version}-src.tar.gz | |
15 | # Source0-md5: 362d1d8b15dc09882440dcab8c592dd7 | |
16 | #Source0: http://apache.zone-h.org/ | |
17 | Source1: jakarta-tomcat.init | |
18 | Patch0: %{name}-skip-servletapi.patch | |
19 | Patch1: %{name}-nsis.patch | |
20 | Patch2: %{name}-native.patch | |
21 | Patch3: %{name}-skip-jdt.patch | |
22 | Patch4: %{name}-no-connectors.patch | |
23 | URL: http://tomcat.apache.org/ | |
24 | # required: | |
25 | BuildRequires: ant >= 1.5.3 | |
26 | BuildRequires: jaas | |
27 | BuildRequires: jakarta-commons-beanutils | |
28 | BuildRequires: jakarta-commons-collections | |
29 | BuildRequires: jakarta-commons-collections-source | |
30 | BuildRequires: jakarta-commons-daemon | |
31 | BuildRequires: jakarta-commons-dbcp | |
32 | BuildRequires: jakarta-commons-dbcp-source | |
33 | BuildRequires: jakarta-commons-digester | |
34 | BuildRequires: jakarta-commons-fileupload | |
35 | BuildRequires: jakarta-commons-httpclient | |
36 | BuildRequires: jakarta-commons-logging | |
37 | BuildRequires: jakarta-commons-modeler >= 2.0 | |
38 | BuildRequires: jakarta-commons-pool | |
39 | BuildRequires: jakarta-commons-pool-source | |
40 | BuildRequires: jakarta-regexp | |
41 | BuildRequires: jakarta-servletapi5 | |
42 | BuildRequires: jakarta-struts >= 1.0.2 | |
43 | BuildRequires: jaxp_parser_impl | |
44 | BuildRequires: jdk >= 1.5 | |
45 | BuildRequires: jpackage-utils | |
46 | BuildRequires: mx4j >= 1.1.1 | |
47 | BuildRequires: puretls | |
48 | BuildRequires: rpmbuild(macros) >= 1.300 | |
49 | BuildRequires: xerces-j | |
50 | %if %{with javadoc} | |
51 | BuildRequires: jakarta-commons-el | |
52 | %endif | |
53 | # optional: | |
54 | BuildRequires: jaf >= 1.0.1 | |
55 | BuildRequires: jakarta-commons-dbcp | |
56 | BuildRequires: jakarta-commons-pool | |
57 | BuildRequires: javamail >= 1.2 | |
58 | BuildRequires: jdbc-stdext >= 2.0 | |
59 | BuildRequires: jndi >= 1.2.1 | |
60 | BuildRequires: jsse >= 1.0.2 | |
61 | BuildRequires: jta >= 1.0.1 | |
62 | BuildRequires: junit >= 3.7 | |
63 | BuildRequires: rpmbuild(macros) >= 1.268 | |
64 | BuildRequires: tyrex >= 1.0 | |
65 | BuildRequires: xml-commons | |
66 | Requires(post,postun): /sbin/ldconfig | |
67 | Requires(post,preun): /sbin/chkconfig | |
68 | Requires(postun): /usr/sbin/groupdel | |
69 | Requires(postun): /usr/sbin/userdel | |
70 | Requires(pre): /bin/id | |
71 | Requires(pre): /usr/bin/getgid | |
72 | Requires(pre): /usr/sbin/groupadd | |
73 | Requires(pre): /usr/sbin/useradd | |
74 | Requires: jaas | |
75 | Requires: jaf >= 1.0.1 | |
76 | Requires: jakarta-commons-beanutils | |
77 | Requires: jakarta-commons-collections | |
78 | Requires: jakarta-commons-digester | |
79 | Requires: jakarta-commons-fileupload | |
80 | Requires: jakarta-commons-logging | |
81 | Requires: jakarta-regexp | |
82 | Requires: jakarta-servletapi >= 4 | |
83 | Requires: javamail >= 1.2 | |
84 | Requires: jaxp_parser_impl | |
85 | Requires: jdbc-stdext >= 2.0 | |
86 | Requires: jndi >= 1.2.1 | |
87 | Requires: jre >= 1.2 | |
88 | Requires: jsse >= 1.0.2 | |
89 | Requires: jta >= 1.0.1 | |
90 | Requires: mx4j >= 1.1.1 | |
91 | Requires: rc-scripts | |
92 | Requires: tyrex >= 1.0 | |
93 | Requires: xml-commons | |
94 | Provides: group(http) | |
95 | Provides: user(http) | |
96 | Obsoletes: jakarta-tomcat | |
97 | BuildArch: noarch | |
98 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
99 | ||
100 | %define _tomcatdir %{_libdir}/tomcat | |
101 | %define _logdir %{_var}/log | |
102 | %define _vardir %{_var}/lib/tomcat | |
103 | ||
104 | %description | |
105 | Tomcat is the servlet container that is used in the official Reference | |
106 | Implementation for the Java Servlet and JavaServer Pages technologies. | |
107 | The Java Servlet and JavaServer Pages specifications are developed by | |
108 | Sun under the Java Community Process. | |
109 | ||
110 | Tomcat is developed in an open and participatory environment and | |
111 | released under the Apache Software License. Tomcat is intended to be a | |
112 | collaboration of the best-of-breed developers from around the world. | |
113 | We invite you to participate in this open development project. | |
114 | ||
115 | %description -l pl.UTF-8 | |
116 | Tomcat to kontener serwletowy używany przez oficjalną implementację | |
117 | wzorcową technologii Java Servlet i JavaServer Pages. Specyfikacje | |
118 | Java Servlet i JavaServer Pages są rozwijane przez Suna zgodnie z Java | |
119 | Community Process. | |
120 | ||
121 | %package doc | |
122 | Summary: The Apache Tomcat Servlet/JSP Container documentation | |
123 | Summary(pl.UTF-8): Dokumentacja do Tomcata - kontekera Servlet/JSP | |
124 | Group: Development/Languages/Java | |
125 | Obsoletes: jakarta-tomcat-doc | |
126 | ||
127 | %description doc | |
128 | The Tomcat Servlet/JSP Container documentation. | |
129 | ||
130 | %description doc -l pl.UTF-8 | |
131 | Dokumentacja do Tomcata - kontekera Servlet/JSP. | |
132 | ||
133 | %prep | |
134 | %setup -q -n %{name}-%{version}-src | |
135 | %patch0 -p1 | |
136 | %patch1 -p1 | |
137 | %patch2 -p1 | |
138 | %patch3 -p1 | |
139 | %patch4 -p1 | |
140 | ||
141 | # servletapi built from jakarta-servletapi5.spec | |
142 | rm -rf servletapi | |
143 | # connectors (apache2 for now only) are built from apache-mod_jk.spec | |
144 | rm -rf connectors | |
145 | ||
146 | # Remove pre-built jars | |
147 | find -name '*.jar' | xargs rm -fv | |
148 | ||
149 | %build | |
150 | TOPDIR=$(pwd) | |
151 | #xerces.jar=$(build-classpath xerces) | |
152 | #jasper-compiler-jdt.jar=$(build-classpath jdtcore) | |
153 | ||
154 | mkdir -p tomcat-deps | |
155 | > tomcat-deps/tomcat-dbcp.jar | |
156 | ||
157 | %if 0 | |
158 | # build jasper javadocs | |
159 | cd jasper | |
160 | CLASSPATH=$(build-classpath xml-commons-apis) | |
161 | cat > build.properties <<EOF | |
162 | ant.jar=$(build-classpath ant) | |
163 | servlet-api.jar=$(build-classpath servlet-api) | |
164 | jsp-api.jar=$(build-classpath jsp-api) | |
165 | tools.jar=%{java_home}/lib/tools.jar | |
166 | xercesImpl.jar=$(build-classpath jaxp_parser_impl) | |
167 | xmlParserAPIs.jar=$(build-classpath xml-commons-apis) | |
168 | commons-collections.jar=$(build-classpath commons-collections) | |
169 | commons-logging.jar=$(build-classpath commons-logging) | |
170 | commons-daemon.jar=$(build-classpath commons-daemon) | |
171 | junit.jar=$(build-classpath junit) | |
172 | commons-el.jar=$(build-classpath commons-el) | |
173 | EOF | |
174 | # building jasper needs eclipse classes | |
175 | #%ant dist | |
176 | ||
177 | %if %{with javadoc} | |
178 | %ant javadoc \ | |
179 | -Dcompile.source=1.4 \ | |
180 | -Dbuild.compiler=modern \ | |
181 | ||
182 | %endif | |
183 | cd - | |
184 | %endif | |
185 | ||
186 | # build tomcat 5.5 | |
187 | #cd build | |
188 | cat > build.properties <<EOF | |
189 | commons-beanutils.jar=$(build-classpath commons-beanutils) | |
190 | commons-launcher.jar=$(build-classpath commons-launcher) | |
191 | commons-daemon.jar=$(build-classpath commons-daemon) | |
192 | commons-digester.jar=$(build-classpath commons-digester) | |
193 | commons-el.jar=$(build-classpath commons-el) | |
194 | commons-logging-api.jar=$(build-classpath commons-logging-api) | |
195 | commons-logging.jar=$(build-classpath commons-logging) | |
196 | commons-modeler.jar=$(build-classpath commons-modeler) | |
197 | xercesImpl.jar=$(build-classpath jaxp_parser_impl) | |
198 | xml-apis.jar=$(build-classpath xml-commons-apis) | |
199 | %if 0 | |
200 | jdt.jar=${jdt.lib}/org.eclipse.jdt.core_3.1.2.jar | |
201 | log4j.jar=${log4j.lib}/dist/lib/log4j-1.2.12.jar | |
202 | %endif | |
203 | commons-httpclient.jar=$(build-classpath commons-httpclient) | |
204 | commons-collections.jar=$(build-classpath commons-collections) | |
205 | commons-fileupload.jar=$(build-classpath commons-fileupload) | |
206 | ||
207 | ||
208 | %if 0 | |
209 | jmx.jar=${jmx.lib}/mx4j.jar | |
210 | %endif | |
211 | jmx.jar=$(build-classpath jre/jmx) | |
212 | %if 0 | |
213 | jmx-tools.jar=${jmx.lib}/mx4j-tools.jar | |
214 | %endif | |
215 | jmx-tools.jar=$(build-classpath jre/jmx) | |
216 | %if 0 | |
217 | jmx-remote.jar=${jmx.lib}/mx4j-remote.jar | |
218 | %endif | |
219 | junit.jar=$(build-classpath junit) | |
220 | %if 0 | |
221 | rhino.jar=${rhino.home}/js.jar | |
222 | %endif | |
223 | struts.jar=$(build-classpath struts) | |
224 | activation.jar=$(build-classpath jaf) | |
225 | jcert.jar=$(build-classpath java/jcert) | |
226 | jnet.jar=$(build-classpath java/jnet) | |
227 | jsse.jar=$(build-classpath java/jsse) | |
228 | jta.jar=$(build-classpath jta) | |
229 | mail.jar=$(build-classpath javamail/mailapi) | |
230 | puretls.jar=$(build-classpath puretls) | |
231 | ||
232 | servlet-api.jar=$(build-classpath servlet-api) | |
233 | # how the fck those bools work | |
234 | # build.xml:103: servletapi/jsr154/src not found. | |
235 | servletapi.build.notrequired=true | |
236 | ||
237 | jsp-api.jar=$(build-classpath jsp-api) | |
238 | jspapi.build.notrequired=true | |
239 | ||
240 | log4j.jar=$(build-classpath logging-log4j) | |
241 | #log4j.loc=%{_javadir} | |
242 | ||
243 | # source is needed because source is copied modified and recompiled as tomcat jar | |
244 | # see <target name="-build-tomcat-dbcp"> in build/build.xml | |
245 | tomcat-dbcp.home= | |
246 | commons-collections.home=%{_prefix}/src/jakarta-commons-collections-3.1 | |
247 | commons-pool.home=%{_prefix}/src/jakarta-commons-pool-1.3 | |
248 | commons-dbcp.home=%{_prefix}/src/jakarta-commons-dbcp-1.2.1 | |
249 | tomcat-dbcp.home=$TOPDIR/tomcat-deps | |
250 | # err, it compiles three above and then appends to the jar, so the file should exist | |
251 | tomcat-dbcp.jar=$TOPDIR/tomcat-deps/tomcat-dbcp.jar | |
252 | ||
253 | %if 0 | |
254 | ant.jar=%{_javadir}/ant.jar | |
255 | ant-launcher.jar=%{_javadir}/ant-launcher.jar | |
256 | jtc.home=$TOPDIR/jakarta-tomcat-connectors/ | |
257 | jasper.home=$TOPDIR/jakarta-tomcat-jasper/jasper2 | |
258 | commons-dbcp.jar=$(build-classpath commons-dbcp) | |
259 | commons-pool.jar=$(build-classpath commons-pool) | |
260 | jmxri.jar=$(build-classpath jre/jmx) | |
261 | regexp.jar=$(build-classpath regexp) | |
262 | jsp-api.jar=$TOPDIR/jakarta-servletapi-5/jsr152/dist/lib/jsp-api.jar | |
263 | servlet.doc=$TOPDIR/jakarta-servletapi-5/jsr154/dist/docs/api | |
264 | struts.lib=%{_datadir}/struts | |
265 | servletapi.build.notrequired=true | |
266 | tyrex.jar=$(build-classpath tyrex) | |
267 | jaas.jar=$(build-classpath jre/jaas) | |
268 | jndi.jar=$(build-classpath jre/jndi) | |
269 | jdbc20ext.jar=$(build-classpath jdbc-stdext) | |
270 | jspapi.build.notrequired=true | |
271 | taglibs-core.jar=$(build-classpath taglibs-core) | |
272 | taglibs-standard.jar=$(build-classpath taglibs-standard) | |
273 | %endif | |
274 | ||
275 | EOF | |
276 | ||
277 | %ant \ | |
278 | -Dcompile.source=1.4 | |
279 | ||
280 | exit 1 | |
281 | ||
282 | # build the connectors | |
283 | cd connectors | |
284 | ||
285 | %if 0 | |
286 | ||
287 | # this is just plain and simply evil but something changed in a major way between 5.0.16 and 5.0.18 | |
288 | oldclasspath=$CLASSPATH | |
289 | export CLASSPATH=$TOPDIR/jakarta-servletapi-5/jsr154/dist/lib/servlet-api.jar:\ | |
290 | $TOPDIR/jakarta-tomcat-5/build/server/lib/catalina.jar | |
291 | %endif | |
292 | ||
293 | %if 0 | |
294 | cat > build.properties <<EOF | |
295 | ||
296 | activation.jar=$(build-classpath jaf) | |
297 | ant.jar=%{_javadir}/ant.jar | |
298 | junit.jar=$(build-classpath junit) | |
299 | commons-beanutils.jar=$(build-classpath commons-beanutils) | |
300 | commons-collections.jar=$(build-classpath commons-collections) | |
301 | commons-digester.jar=$(build-classpath commons-digester) | |
302 | commons-fileupload.jar=$(build-classpath commons-fileupload) | |
303 | commons-logging.jar=$(build-classpath commons-logging) | |
304 | commons-logging-api.jar=$(build-classpath commons-logging-api) | |
305 | commons-modeler.jar=$(build-classpath commons-modeler) | |
306 | commons-pool.jar=$(build-classpath commons-pool) | |
307 | regexp.jar=$(build-classpath regexp) | |
308 | jmx.jar=$(build-classpath mx4j/mx4j) | |
309 | puretls=$(build-classpath puretls) | |
310 | activation.jar=$(build-classpath jaf) | |
311 | mail.jar=$(build-classpath javamail/mailapi) | |
312 | jta.jar=$(build-classpath jta) | |
313 | tyrex.jar=$(build-classpath tyrex) | |
314 | jaas.jar=$(build-classpath jaas) | |
315 | jndi.jar=$(build-classpath jndi) | |
316 | jdbc20ext.jar=$(build-classpath java/jdbc-stdext) | |
317 | puretls.jar=$(build-classpath puretls) | |
318 | jcert.jar=$(build-classpath jsse/jcert) | |
319 | jnet.jar=$(build-classpath jsse/jnet) | |
320 | jsse.jar=$(build-classpath jsse/jsse) | |
321 | ||
322 | %endif | |
323 | ||
324 | %if 0 | |
325 | commons-beanutils.jar=${commons-beanutils.lib}/commons-beanutils.jar | |
326 | commons-collections.jar=${commons-collections.lib}/commons-collections.jar | |
327 | commons-digester.jar=${commons-digester.lib}/commons-digester.jar | |
328 | commons-fileupload.jar=${commons-fileupload.lib}/commons-fileupload-1.0-beta-1.jar | |
329 | commons-logging-api.jar=${commons-logging.lib}/commons-logging-api.jar | |
330 | commons-logging.jar=${commons-logging.lib}/commons-logging.jar | |
331 | jndi.jar=${jndi.lib}/jndi.jar | |
332 | ldap.jar=${jndi.lib}/ldap.jar | |
333 | jaas.jar=${jndi.lib}/jaas.jar | |
334 | regexp.jar=${regexp.lib}/jakarta-regexp-1.4.jar | |
335 | servlet.jar=${servlet.lib}/servlet.jar | |
336 | #xerces.jar=${xerces.lib}/xerces.jar | |
337 | xercesImpl.jar=${xerces.lib}/xercesImpl.jar | |
338 | xml-apis.jar=${xerces.lib}/xml-apis.jar | |
339 | activation.jar=${activation.lib}/activation.jar | |
340 | commons-daemon.jar=${commons-daemon.lib}/commons-daemon.jar | |
341 | commons-dbcp.jar=${commons-dbcp.lib}/commons-dbcp.jar | |
342 | commons-modeler.jar=${commons-modeler.lib}/commons-modeler.jar | |
343 | commons-pool.jar=${commons-pool.lib}/commons-pool.jar | |
344 | jdbc20ext.jar=${jdbc20ext.lib}/jdbc2_0-stdext.jar | |
345 | jmx.jar=${jmx.lib}/mx4j-jmx.jar | |
346 | jcert.jar=${jsse.lib}/jcert.jar | |
347 | jnet.jar=${jsse.lib}/jnet.jar | |
348 | jsse.jar=${jsse.lib}/jsse.jar | |
349 | jta.jar=${jta.lib}/jta.jar | |
350 | junit.jar=${junit.lib}/junit.jar | |
351 | mail.jar=${mail.lib}/mail.jar | |
352 | puretls.jar=${puretls.lib}/puretls.jar | |
353 | struts.jar=${struts.lib}/struts.jar | |
354 | tyrex.jar=${tyrex.lib}/tyrex-1.0.jar | |
355 | tomcat5.jar=${tomcat5.home}/server/lib/catalina.jar | |
356 | servlet-api.jar=${tomcat5.home}/common/lib/servlet-api.jar | |
357 | tomcat41.jar=${tomcat41.home}/server/lib/catalina.jar | |
358 | servlet-api.jar=${tomcat41.home}/common/lib/servlet.jar | |
359 | tomcat33.jar=${tomcat33.home}/lib/common/tomcat_core.jar | |
360 | %endif | |
361 | ||
362 | ||
363 | %if 0 | |
364 | EOF | |
365 | %ant build \ | |
366 | -Dbuild.compiler=modern \ | |
367 | -Djava.home=%{java_home} | |
368 | %endif | |
369 | %if 0 | |
370 | export CLASSPATH=$oldclasspath | |
371 | ||
372 | # build the webapps and make the tree ready to install | |
373 | cd ../jakarta-tomcat-5 | |
374 | %ant -Dbuild.compiler=modern -Djava.home=%{java_home} dist | |
375 | %endif | |
376 | ||
377 | %install | |
378 | rm -rf $RPM_BUILD_ROOT | |
379 | ||
380 | DEST=$RPM_BUILD_ROOT%{_tomcatdir} | |
381 | ||
382 | install -d $DEST/bin \ | |
383 | $DEST/common/{lib,classes,endorsed} \ | |
384 | $DEST/server/{lib,classes} \ | |
385 | $DEST/webapps \ | |
386 | $RPM_BUILD_ROOT%{_sysconfdir}/tomcat \ | |
387 | $RPM_BUILD_ROOT%{_logdir}/tomcat \ | |
388 | $RPM_BUILD_ROOT%{_vardir}/work \ | |
389 | $RPM_BUILD_ROOT/etc/rc.d/init.d | |
390 | ||
391 | install build/bin/*.sh $DEST/bin | |
392 | install build/bin/bootstrap*.jar $DEST/bin | |
393 | install build/bin/tomcat*.jar $DEST/bin | |
394 | install build/common/lib/naming-*.jar $DEST/common/lib | |
395 | install build/common/lib/jasper-*.jar $DEST/common/lib | |
396 | install build/conf/* $RPM_BUILD_ROOT%{_sysconfdir}/tomcat | |
397 | install build/server/lib/catalina*.jar $DEST/server/lib | |
398 | install build/server/lib/servlets*.jar $DEST/server/lib | |
399 | install build/server/lib/tomcat*.jar $DEST/server/lib | |
400 | install build/server/lib/servlets-cgi.renametojar $DEST/server/lib/servlets-cgi.jar | |
401 | install build/server/lib/servlets-ssi.renametojar $DEST/server/lib/servlets-ssi.jar | |
402 | cp -rf build/server/webapps $DEST/server | |
403 | cp -rf build/webapps $DEST | |
404 | cp -rf build/shared $DEST | |
405 | cp -rf build/temp $DEST | |
406 | ||
407 | ln -sf %{_logdir}/tomcat $DEST/logs | |
408 | ln -sf %{_vardir}/work $DEST/work | |
409 | ln -sf %{_sysconfdir}/tomcat $DEST/conf | |
410 | ||
411 | # symlinks instead of copies | |
412 | ln -sf %{_javadir}/commons-daemon.jar $DEST/bin | |
413 | ||
414 | ln -sf %{_javadir}/activation.jar $DEST/common/lib | |
415 | ln -sf %{_javadir}/ant.jar $DEST/common/lib | |
416 | ln -sf %{_javadir}/commons-collections.jar $DEST/common/lib | |
417 | ln -sf %{_javadir}/commons-dbcp.jar $DEST/common/lib | |
418 | ln -sf %{_javadir}/commons-logging-api.jar $DEST/common/lib | |
419 | ln -sf %{_javadir}/commons-pool.jar $DEST/common/lib | |
420 | ln -sf %{_javadir}/servlet.jar $DEST/common/lib | |
421 | ln -sf %{_javadir}/servlet.jar $DEST/common/lib/servletapi4.jar | |
422 | ln -sf %{_javadir}/jdbc-stdext.jar $DEST/common/lib/jdbc2_0-stdext.jar | |
423 | ln -sf %{_javadir}/jdbc-stdext.jar $DEST/common/lib/jdbc-stdext-2.0.jar | |
424 | ln -sf %{_javadir}/jmxri.jar $DEST/common/lib | |
425 | ln -sf %{_javadir}/jndi.jar $DEST/common/lib | |
426 | ln -sf %{_javadir}/jta.jar $DEST/common/lib | |
427 | ln -sf %{_javadir}/mail.jar $DEST/common/lib | |
428 | ln -sf %{_javadir}/jsse.jar $DEST/common/lib | |
429 | ln -sf %{_javadir}/tyrex.jar $DEST/common/lib | |
430 | ln -sf %{_javadir}/junit.jar $DEST/common/lib | |
431 | ||
432 | ln -sf %{_javadir}/mailapi.jar $DEST/common/lib | |
433 | ln -sf %{_javadir}/pop3.jar $DEST/common/lib | |
434 | ln -sf %{_javadir}/pop3.jar $DEST/common/lib/pop.jar | |
435 | ln -sf %{_javadir}/smtp.jar $DEST/common/lib | |
436 | ln -sf %{_javadir}/imap.jar $DEST/common/lib | |
437 | ||
438 | ln -sf %{_javadir}/commons-beanutils.jar $DEST/server/lib | |
439 | ln -sf %{_javadir}/commons-digester.jar $DEST/server/lib | |
440 | ln -sf %{_javadir}/commons-fileupload.jar $DEST/server/lib | |
441 | ln -sf %{_javadir}/commons-logging.jar $DEST/server/lib | |
442 | ln -sf %{_javadir}/commons-modeler.jar $DEST/server/lib | |
443 | ln -sf %{_javadir}/jaas.jar $DEST/server/lib/jaas.jar | |
444 | ln -sf %{_javadir}/mx4j-jmx.jar $DEST/server/lib | |
445 | ln -sf %{_javadir}/regexp.jar $DEST/server/lib | |
446 | ln -sf %{_javadir}/regexp.jar $DEST/server/lib/jakarta-regexp-1.2.jar | |
447 | ln -sf %{_javadir}/regexp.jar $DEST/server/lib/regexp-1.2.jar | |
448 | ||
449 | ln -sf %{_javadir}/jaxp_parser_impl.jar $DEST/common/endorsed | |
450 | ln -sf %{_javadir}/xml-commons-apis.jar $DEST/common/endorsed | |
451 | ||
452 | ln -sf %{_javadir}/struts.jar $DEST/server/webapps/admin/WEB-INF/lib | |
453 | ||
454 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/tomcat | |
455 | ||
456 | %clean | |
457 | rm -rf $RPM_BUILD_ROOT | |
458 | ||
459 | %pre | |
460 | %groupadd -g 51 -r -f http | |
461 | %useradd -u 51 -r -d /home/services/httpd -s /bin/false -c "HTTP User" -g http http | |
462 | ||
463 | %post | |
464 | /sbin/chkconfig --add tomcat | |
465 | %service tomcat restart | |
466 | ||
467 | %preun | |
468 | if [ "$1" = "0" ]; then | |
469 | %service tomcat stop | |
470 | /sbin/chkconfig --del tomcat | |
471 | fi | |
472 | ||
473 | %postun | |
474 | if [ "$1" = "0" ]; then | |
475 | %userremove http | |
476 | %groupremove http | |
477 | fi | |
478 | ||
479 | %files | |
480 | %defattr(644,root,root,755) | |
481 | %doc *.txt LICENSE | |
482 | %dir %{_tomcatdir} | |
483 | %dir %{_tomcatdir}/bin | |
484 | %attr(755,root,root) %{_tomcatdir}/bin/*.sh | |
485 | %{_tomcatdir}/bin/*.jar | |
486 | %dir %{_tomcatdir}/common | |
487 | %dir %{_tomcatdir}/common/classes | |
488 | %dir %{_tomcatdir}/common/endorsed | |
489 | %{_tomcatdir}/common/endorsed/*.jar | |
490 | %{_tomcatdir}/common/lib | |
491 | %{_tomcatdir}/conf | |
492 | %{_tomcatdir}/logs | |
493 | %dir %{_tomcatdir}/server | |
494 | %dir %{_tomcatdir}/server/classes | |
495 | %{_tomcatdir}/server/lib | |
496 | %{_tomcatdir}/server/webapps | |
497 | %{_tomcatdir}/webapps | |
498 | %{_tomcatdir}/work | |
499 | %{_tomcatdir}/shared | |
500 | %{_tomcatdir}/temp | |
501 | # tomcat wants to regenerate tomcat-users.xml | |
502 | %attr(775,root,http) %dir %{_sysconfdir}/tomcat | |
503 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/tomcat/* | |
504 | %attr(754,root,root) /etc/rc.d/init.d/tomcat | |
505 | %dir %{_vardir} | |
506 | %attr(1730,root,http) %dir %{_vardir}/work | |
507 | %attr(1730,root,http) %dir %{_logdir}/tomcat | |
508 | ||
509 | %files doc | |
510 | %defattr(644,root,root,755) | |
511 | %doc catalina/docs/* |