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