]>
Commit | Line | Data |
---|---|---|
a50d18a2 ER |
1 | # TODO |
2 | # - packages for *.renametojar files (-cgi and -ssi in server/lib) | |
3 | # | |
d58ce9ff | 4 | # Conditional build: |
f5240219 | 5 | %bcond_without javadoc # skip building javadocs |
6 | %bcond_with jta # put jta jar into tomcat lib dir. | |
7 | %bcond_without java_sun # build with gcj (does not work) | |
d58ce9ff ER |
8 | # |
9 | Summary: Apache Servlet/JSP Engine, RI for Servlet 2.4/JSP 2.0 API | |
e22e9de1 | 10 | Summary(pl.UTF-8): Silnik Servlet/JSP Apache będący wzorcową implementacją API Servlet 2.4/JSP 2.0 |
3cd7b38d | 11 | Name: apache-tomcat |
7f75c591 | 12 | Version: 5.5.27 |
002c6dcf | 13 | Release: 0.3 |
0efbe9ff | 14 | License: Apache v2.0 |
15 | Group: Networking/Daemons/Java | |
3cd7b38d | 16 | Source0: http://www.apache.org/dist/tomcat/tomcat-5/v%{version}/src/%{name}-%{version}-src.tar.gz |
7f75c591 | 17 | # Source0-md5: eb3f196013550b9b1684e4ff18593a8e |
fe9b4066 | 18 | Source1: %{name}.init |
41883ff5 | 19 | Source2: %{name}.sysconfig |
6ee17549 | 20 | Source10: %{name}-context-ROOT.xml |
21 | Source11: %{name}-context-balancer.xml | |
22 | Source12: %{name}-context-jsp-examples.xml | |
23 | Source13: %{name}-context-tomcat-docs.xml | |
24 | Source14: %{name}-context-webdav.xml | |
3cd7b38d ER |
25 | Patch0: %{name}-skip-servletapi.patch |
26 | Patch1: %{name}-nsis.patch | |
27 | Patch2: %{name}-native.patch | |
28 | Patch3: %{name}-skip-jdt.patch | |
05be5db6 | 29 | Patch4: %{name}-no-connectors.patch |
7f75c591 | 30 | Patch5: %{name}-dbcp.patch |
88f0da13 | 31 | # this patch is needed for struts >= 1.3 |
32 | Patch6: %{name}-struts.patch | |
9d7c820d | 33 | # WTF? Why is it needed? Is it related to struts version? |
34 | Patch7: %{name}-admin-struts.patch | |
797e0d23 | 35 | URL: http://tomcat.apache.org/ |
98717f43 | 36 | %if %{with java_sun} |
f5240219 | 37 | BuildRequires: java-sun >= 1.5 |
38 | BuildRequires: java-sun-jre >= 1.5 | |
39 | %else | |
40 | BuildRequires: java-gcj-compat-devel | |
86a31c23 | 41 | # BuildRequires: jsse >= 0:1.0.3 |
f5240219 | 42 | %endif |
51bf99d9 | 43 | BuildRequires: ant >= 1.5.3 |
581348cf ER |
44 | BuildRequires: ant-trax |
45 | BuildRequires: eclipse-jdt | |
4c334025 | 46 | BuildRequires: jaas |
23f53f24 | 47 | BuildRequires: jakarta-regexp >= 0:1.3 |
90ee603b | 48 | BuildRequires: java-commons-beanutils >= 1.7 |
9d7c820d | 49 | BuildRequires: java-commons-chain |
90ee603b | 50 | BuildRequires: java-commons-collections >= 0:3.1 |
51 | BuildRequires: java-commons-collections-tomcat5 >= 0:3.1 | |
52 | BuildRequires: java-commons-daemon >= 1.0 | |
53 | BuildRequires: java-commons-dbcp >= 0:1.2.1 | |
54 | BuildRequires: java-commons-dbcp-tomcat5 >= 0:1.2.1 | |
55 | BuildRequires: java-commons-digester >= 0:1.7 | |
56 | BuildRequires: java-commons-el >= 0:1.0 | |
57 | BuildRequires: java-commons-fileupload >= 0:1.0 | |
a291eeb3 | 58 | BuildRequires: java-commons-httpclient |
90ee603b | 59 | BuildRequires: java-commons-io >= 1.4 |
60 | BuildRequires: java-commons-launcher >= 0:0.9 | |
61 | BuildRequires: java-commons-logging >= 0:1.0.4 | |
62 | BuildRequires: java-commons-modeler >= 2.0 | |
63 | BuildRequires: java-commons-pool >= 0:1.2 | |
64 | BuildRequires: java-commons-pool-tomcat5 >= 0:1.2 | |
4f1254e9 | 65 | %{?with_jta:BuildRequires: java-jta >= 0:1.0.1} |
06b5adcb | 66 | BuildRequires: java-log4j |
67 | BuildRequires: java-puretls | |
8bb97185 | 68 | BuildRequires: java-servletapi5 = %{version} |
a291eeb3 | 69 | #BuildRequires: java-struts >= 0:1.2.7 |
70 | BuildRequires: java-struts >= 1.0.2 | |
06b5adcb | 71 | BuildRequires: java-xerces >= 0:2.7.1 |
72 | BuildRequires: java-xml-commons | |
73 | #BuildRequires: java-xml-commons >= 1.3 | |
8ba15a0f | 74 | BuildRequires: java-mail >= 0:1.3.1 |
23f53f24 ER |
75 | BuildRequires: jaxp_parser_impl >= 0:2.7.1 |
76 | BuildRequires: jdbc-stdext >= 0:2.0 | |
8eee8985 | 77 | BuildRequires: jmx |
23f53f24 | 78 | BuildRequires: jndi >= 0:1.2.1 |
581348cf | 79 | BuildRequires: jpackage-utils |
4185d1e3 | 80 | BuildRequires: junit >= 0:3.8.1 |
581348cf | 81 | BuildRequires: rpmbuild(macros) >= 1.300 |
43310914 ER |
82 | Requires(post,postun): /sbin/ldconfig |
83 | Requires(post,preun): /sbin/chkconfig | |
84 | Requires(postun): /usr/sbin/groupdel | |
85 | Requires(postun): /usr/sbin/userdel | |
86 | Requires(pre): /bin/id | |
87 | Requires(pre): /usr/bin/getgid | |
88 | Requires(pre): /usr/sbin/groupadd | |
89 | Requires(pre): /usr/sbin/useradd | |
3cbc6002 | 90 | Requires: %{name}-jasper = %{version}-%{release} |
43310914 | 91 | Requires: jaas |
581348cf | 92 | #Requires: jaf >= 1.0.1 |
47cfc2b4 | 93 | Requires: java-commons-beanutils |
94 | Requires: java-commons-collections | |
90ee603b | 95 | #Requires: java-commons-dbcp-tomcat5 |
47cfc2b4 | 96 | Requires: java-commons-digester |
90ee603b | 97 | Requires: java-commons-el |
98 | #Requires: java-commons-fileupload | |
47cfc2b4 | 99 | Requires: java-commons-logging |
100 | Requires: java-commons-modeler | |
06b5adcb | 101 | Requires: java-regexp |
c52ff900 | 102 | Requires: java-servletapi5 = %{version} |
06b5adcb | 103 | Requires: java-xml-commons |
43310914 ER |
104 | Requires: javamail >= 1.2 |
105 | Requires: jaxp_parser_impl | |
55df0736 | 106 | Requires: jdbc-stdext >= 2.0 |
55df0736 | 107 | Requires: jndi >= 1.2.1 |
43310914 | 108 | Requires: jre >= 1.2 |
55df0736 | 109 | Requires: jsse >= 1.0.2 |
4f1254e9 | 110 | %{?with_jta:Requires: jta >= 1.0.1} |
d58ce9ff | 111 | Requires: rc-scripts |
15040216 | 112 | Provides: group(tomcat) |
a291eeb3 | 113 | Provides: java-servlet-container |
15040216 | 114 | Provides: user(tomcat) |
3cd7b38d | 115 | Obsoletes: jakarta-tomcat |
4470e4fe | 116 | BuildArch: noarch |
117 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
118 | ||
8eee8985 | 119 | %define _tomcatdir %{_datadir}/tomcat |
4470e4fe | 120 | %define _logdir %{_var}/log |
55df0736 | 121 | %define _vardir %{_var}/lib/tomcat |
8eee8985 | 122 | %define _sysconfdir /etc/tomcat |
4470e4fe | 123 | |
124 | %description | |
d58ce9ff ER |
125 | Tomcat is the servlet container that is used in the official Reference |
126 | Implementation for the Java Servlet and JavaServer Pages technologies. | |
127 | The Java Servlet and JavaServer Pages specifications are developed by | |
128 | Sun under the Java Community Process. | |
4470e4fe | 129 | |
d58ce9ff ER |
130 | Tomcat is developed in an open and participatory environment and |
131 | released under the Apache Software License. Tomcat is intended to be a | |
132 | collaboration of the best-of-breed developers from around the world. | |
133 | We invite you to participate in this open development project. | |
134 | ||
e22e9de1 JB |
135 | %description -l pl.UTF-8 |
136 | Tomcat to kontener serwletowy używany przez oficjalną implementację | |
137 | wzorcową technologii Java Servlet i JavaServer Pages. Specyfikacje | |
3cd7b38d ER |
138 | Java Servlet i JavaServer Pages są rozwijane przez Suna zgodnie z Java |
139 | Community Process. | |
4470e4fe | 140 | |
141 | %package doc | |
3cd7b38d | 142 | Summary: The Apache Tomcat Servlet/JSP Container documentation |
71272daf | 143 | Summary(pl.UTF-8): Dokumentacja do Tomcata - kontenera Servlet/JSP |
0efbe9ff | 144 | Group: Documentation |
3cd7b38d | 145 | Obsoletes: jakarta-tomcat-doc |
4470e4fe | 146 | |
147 | %description doc | |
2b38d386 JB |
148 | The Tomcat Servlet/JSP Container documentation. |
149 | ||
e22e9de1 | 150 | %description doc -l pl.UTF-8 |
71272daf | 151 | Dokumentacja do Tomcata - kontenera Servlet/JSP. |
4470e4fe | 152 | |
260f0a8a SP |
153 | %package admin |
154 | Summary: Apache Tomcat`s Administration Web Application | |
155 | Summary(pl.UTF-8): Panel Administracyjny dla Apache Tomcat | |
0efbe9ff | 156 | Group: Networking/Daemons/Java/Servlets |
7d2c5ce8 | 157 | Requires: java-commons-chain |
260f0a8a SP |
158 | |
159 | %description admin | |
160 | Administration Web Application for Apache Tomcat. | |
161 | ||
162 | %description admin -l pl.UTF-8 | |
163 | Panel Administracyjny dla Apache Tomcat. | |
164 | ||
fccb2a6f | 165 | %package jasper |
3cbc6002 | 166 | Summary: JSP compiler |
167 | Summary(pl.UTF-8): Kompilator JSP | |
fccb2a6f | 168 | Group: Libraries/Java |
a8c0ebfc | 169 | Requires: jpackage-utils |
fccb2a6f SP |
170 | |
171 | %description jasper | |
3cbc6002 | 172 | Jasper is Java ServerPages compiler used by Apache Tomcat servlet |
173 | container. | |
174 | ||
175 | %description jasper -l pl.UTF-8 | |
176 | Jasper jest kompilatorem Java ServerPages używanym przez kontener | |
177 | servletów Apache Tomcat. | |
fccb2a6f | 178 | |
4470e4fe | 179 | %prep |
3cd7b38d | 180 | %setup -q -n %{name}-%{version}-src |
8bfa2080 ER |
181 | %patch0 -p1 |
182 | %patch1 -p1 | |
183 | %patch2 -p1 | |
184 | %patch3 -p1 | |
05be5db6 | 185 | %patch4 -p1 |
99082140 | 186 | %patch5 -p1 |
88f0da13 | 187 | %patch6 -p1 |
8bfa2080 | 188 | |
05be5db6 | 189 | # servletapi built from jakarta-servletapi5.spec |
8bfa2080 | 190 | rm -rf servletapi |
d58ce9ff ER |
191 | |
192 | # Remove pre-built jars | |
193 | find -name '*.jar' | xargs rm -fv | |
4470e4fe | 194 | |
195 | %build | |
d58ce9ff ER |
196 | TOPDIR=$(pwd) |
197 | ||
8bfa2080 ER |
198 | %if 0 |
199 | # build jasper javadocs | |
200 | cd jasper | |
201 | CLASSPATH=$(build-classpath xml-commons-apis) | |
a50d18a2 | 202 | # building jasper needs eclipse classes |
d58ce9ff | 203 | cat > build.properties <<EOF |
a50d18a2 ER |
204 | ant.jar=$(find-jar ant) |
205 | servlet-api.jar=$(find-jar servlet-api) | |
206 | jsp-api.jar=$(find-jar jsp-api) | |
d58ce9ff | 207 | tools.jar=%{java_home}/lib/tools.jar |
a50d18a2 ER |
208 | xercesImpl.jar=$(find-jar jaxp_parser_impl) |
209 | xmlParserAPIs.jar=$(find-jar xml-commons-apis) | |
210 | commons-collections.jar=$(find-jar commons-collections) | |
211 | commons-logging.jar=$(find-jar commons-logging) | |
212 | commons-daemon.jar=$(find-jar commons-daemon) | |
213 | junit.jar=$(find-jar junit) | |
214 | commons-el.jar=$(find-jar commons-el) | |
d58ce9ff | 215 | EOF |
8bfa2080 ER |
216 | #%ant dist |
217 | ||
218 | %if %{with javadoc} | |
219 | %ant javadoc \ | |
220 | -Dcompile.source=1.4 \ | |
221 | -Dbuild.compiler=modern \ | |
222 | ||
223 | %endif | |
224 | cd - | |
225 | %endif | |
d58ce9ff ER |
226 | |
227 | # build tomcat 5.5 | |
4f1254e9 | 228 | # XXX build process should fail if one of these find-jar commands fails |
4185d1e3 | 229 | # how to fix that? |
8bfa2080 | 230 | cat > build.properties <<EOF |
e9abaf04 | 231 | commons-beanutils.jar=$(find-jar commons-beanutils-core) |
a50d18a2 ER |
232 | commons-launcher.jar=$(find-jar commons-launcher) |
233 | commons-daemon.jar=$(find-jar commons-daemon) | |
234 | commons-digester.jar=$(find-jar commons-digester) | |
235 | commons-el.jar=$(find-jar commons-el) | |
236 | commons-logging-api.jar=$(find-jar commons-logging-api) | |
237 | commons-logging.jar=$(find-jar commons-logging) | |
238 | commons-modeler.jar=$(find-jar commons-modeler) | |
239 | xercesImpl.jar=$(find-jar jaxp_parser_impl) | |
240 | xml-apis.jar=$(find-jar xml-commons-apis) | |
241 | jdt.jar=$(find-jar org.eclipse.jdt.core) | |
74f47b90 | 242 | jasper-compiler-jdt.home=$TOPDIR/tomcat-deps |
a50d18a2 ER |
243 | commons-httpclient.jar=$(find-jar commons-httpclient) |
244 | commons-collections.jar=$(find-jar commons-collections) | |
245 | commons-fileupload.jar=$(find-jar commons-fileupload) | |
bce65856 | 246 | commons-io.jar=$(find-jar commons-io) |
a50d18a2 ER |
247 | jmx.jar=$(find-jar jmx) |
248 | jmx-tools.jar=$(find-jar jmx) | |
249 | junit.jar=$(find-jar junit) | |
e9abaf04 | 250 | struts.jar=$(find-jar struts-core) |
251 | struts-core.jar=$(find-jar struts-core) | |
252 | struts-taglib.jar=$(find-jar struts-taglib) | |
a50d18a2 ER |
253 | jcert.jar=$(find-jar jcert) |
254 | jnet.jar=$(find-jar jnet) | |
255 | jsse.jar=$(find-jar jsse) | |
4f1254e9 | 256 | %{?with_jta:jta.jar=$(find-jar jta)} |
a50d18a2 ER |
257 | puretls.jar=$(find-jar puretls) |
258 | servlet-api.jar=$(find-jar servlet-api) | |
8bfa2080 | 259 | servletapi.build.notrequired=true |
a50d18a2 | 260 | jsp-api.jar=$(find-jar jsp-api) |
8bfa2080 | 261 | jspapi.build.notrequired=true |
a50d18a2 | 262 | log4j.jar=$(find-jar log4j) |
e9abaf04 | 263 | tomcat-dbcp.jar=$(find-jar commons-dbcp-tomcat5) |
fccb2a6f | 264 | struts.lib=%{_javadir}-struts |
d58ce9ff ER |
265 | EOF |
266 | ||
05be5db6 ER |
267 | %ant \ |
268 | -Dcompile.source=1.4 | |
d58ce9ff | 269 | |
4470e4fe | 270 | %install |
271 | rm -rf $RPM_BUILD_ROOT | |
8eee8985 ER |
272 | cd build/build |
273 | TOMCATDIR=$RPM_BUILD_ROOT%{_tomcatdir} | |
274 | CATALINADIR=$RPM_BUILD_ROOT/var/lib/tomcat | |
4470e4fe | 275 | |
8eee8985 ER |
276 | # we don't need dos scripts |
277 | rm -f bin/*.bat | |
8665efb1 | 278 | |
8eee8985 | 279 | randpw=$(echo $RANDOM$$ | md5sum | cut -c 1-15) |
a50d18a2 | 280 | %{__sed} -i -e "s:SHUTDOWN:${randpw}:" conf/{server,server-minimal}.xml |
8eee8985 ER |
281 | |
282 | install -d $TOMCATDIR/bin \ | |
283 | $TOMCATDIR/common/{lib,classes,endorsed} \ | |
284 | $TOMCATDIR/server/{lib,classes} \ | |
285 | $TOMCATDIR/webapps \ | |
55df0736 | 286 | $RPM_BUILD_ROOT%{_logdir}/tomcat \ |
0d4dc1cd | 287 | $RPM_BUILD_ROOT%{_vardir}/webapps \ |
55df0736 | 288 | $RPM_BUILD_ROOT%{_vardir}/work \ |
0d4dc1cd | 289 | $RPM_BUILD_ROOT%{_vardir}/conf \ |
2da87d83 | 290 | $RPM_BUILD_ROOT/etc/sysconfig \ |
55df0736 | 291 | $RPM_BUILD_ROOT/etc/rc.d/init.d |
98862cba | 292 | |
8eee8985 | 293 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/tomcat |
41883ff5 | 294 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/tomcat |
4470e4fe | 295 | |
0d4dc1cd | 296 | cp -pR conf/* $CATALINADIR/conf |
6ee17549 | 297 | install %{SOURCE10} $CATALINADIR/conf/Catalina/localhost/ROOT.xml |
298 | install %{SOURCE11} $CATALINADIR/conf/Catalina/localhost/balancer.xml | |
299 | install %{SOURCE12} $CATALINADIR/conf/Catalina/localhost/jsp-examples.xml | |
300 | install %{SOURCE13} $CATALINADIR/conf/Catalina/localhost/tomcat-docs.xml | |
301 | install %{SOURCE14} $CATALINADIR/conf/Catalina/localhost/webdav.xml | |
8eee8985 | 302 | cp -HR bin common server $TOMCATDIR |
d58ce9ff | 303 | |
a50d18a2 ER |
304 | cp -rf server/webapps $TOMCATDIR/server |
305 | cp -rf webapps $TOMCATDIR | |
306 | cp -rf shared $TOMCATDIR | |
b3fcb657 | 307 | cp -rf temp $CATALINADIR |
8eee8985 | 308 | |
0d4dc1cd | 309 | ln -sf %{_logdir}/tomcat $CATALINADIR/logs |
a50d18a2 | 310 | ln -sf %{_vardir}/work $TOMCATDIR/work |
0d4dc1cd | 311 | ln -sf %{_vardir}/conf $TOMCATDIR/conf |
312 | ln -sf %{_vardir}/conf $RPM_BUILD_ROOT%{_sysconfdir} | |
8eee8985 ER |
313 | |
314 | # symlinks instead of copies | |
a50d18a2 ER |
315 | ln -sf $(find-jar commons-el) $TOMCATDIR/common/lib/commons-el.jar |
316 | ln -sf $(find-jar jakarta-commons-dbcp-tomcat5) $TOMCATDIR/common/lib/jakarta-commons-dbcp-tomcat5.jar | |
317 | ln -sf $(find-jar servlet-api) $TOMCATDIR/common/lib/servlet-api.jar | |
7a892a2d | 318 | ln -sf $(find-jar jsp-api) $TOMCATDIR/common/lib/jsp-api.jar |
a50d18a2 ER |
319 | |
320 | ln -sf $(find-jar commons-modeler) $TOMCATDIR/server/lib/commons-modeler.jar | |
321 | ||
7a892a2d ER |
322 | ln -sf $(find-jar jaxp_parser_impl) $TOMCATDIR/common/endorsed/jaxp_parser_impl.jar |
323 | ln -sf $(find-jar xml-commons-apis) $TOMCATDIR/common/endorsed/xml-commons-apis.jar | |
06d1afae | 324 | ln -sf $(find-jar struts-core) $TOMCATDIR/server/webapps/admin/WEB-INF/lib/struts-core.jar |
325 | ln -sf $(find-jar struts-taglib) $TOMCATDIR/server/webapps/admin/WEB-INF/lib/struts-taglib.jar | |
326 | ln -sf $(find-jar commons-collections) $TOMCATDIR/server/webapps/admin/WEB-INF/lib/commons-collections.jar | |
327 | ln -sf $(find-jar commons-beanutils-core) $TOMCATDIR/server/webapps/admin/WEB-INF/lib/commons-beanutils-core.jar | |
328 | ln -sf $(find-jar commons-digester) $TOMCATDIR/server/webapps/admin/WEB-INF/lib/commons-digester.jar | |
329 | ln -sf $(find-jar commons-chain) $TOMCATDIR/server/webapps/admin/WEB-INF/lib/commons-chain.jar | |
7a892a2d | 330 | |
a50d18a2 ER |
331 | %if 0 |
332 | # do not make these symlinks as ant didn't do | |
333 | ln -sf $(find-jar commons-daemon) $TOMCATDIR/bin/commons-daemon.jar | |
334 | ln -sf $(find-jar activation) $TOMCATDIR/common/lib/activation.jar | |
335 | ln -sf $(find-jar ant) $TOMCATDIR/common/lib/ant.jar | |
a50d18a2 ER |
336 | ln -sf $(find-jar commons-dbcp) $TOMCATDIR/common/lib/commons-dbcp.jar |
337 | ln -sf $(find-jar commons-logging-api) $TOMCATDIR/common/lib/commons-logging-api.jar | |
338 | ln -sf $(find-jar commons-pool) $TOMCATDIR/common/lib/commons-pool.jar | |
339 | ln -sf $(find-jar servlet) $TOMCATDIR/common/lib/servlet.jar | |
340 | ln -sf $(find-jar servlet) $TOMCATDIR/common/lib/servletapi4.jar | |
341 | ln -sf $(find-jar jdbc-stdext) $TOMCATDIR/common/lib/jdbc-stdext.jar | |
342 | ln -sf jdbc-stdext.jar $TOMCATDIR/common/lib/jdbc2_0-stdext.jar | |
343 | ln -sf jdbc-stdext.jar $TOMCATDIR/common/lib/jdbc-stdext-2.0.jar | |
344 | ln -sf $(find-jar jmxri) $TOMCATDIR/common/lib/jmxri.jar | |
345 | ln -sf $(find-jar jndi) $TOMCATDIR/common/lib/jndi.jar | |
4f1254e9 | 346 | %{?with_jta:ln -sf $(find-jar jta) $TOMCATDIR/common/lib/jta.jar} |
a50d18a2 ER |
347 | ln -sf $(find-jar mail) $TOMCATDIR/common/lib/mail.jar |
348 | ln -sf $(find-jar jsse) $TOMCATDIR/common/lib/jsse.jar | |
349 | ln -sf $(find-jar junit) $TOMCATDIR/common/lib/junit.jar | |
350 | ln -sf $(find-jar mailapi) $TOMCATDIR/common/lib/mailapi.jar | |
351 | ln -sf $(find-jar pop3) $TOMCATDIR/common/lib/pop3.jar | |
352 | ln -sf pop3.jar $TOMCATDIR/common/lib/pop.jar | |
353 | ln -sf $(find-jar smtp) $TOMCATDIR/common/lib/smtp.jar | |
354 | ln -sf $(find-jar imap) $TOMCATDIR/common/lib/imap.jar | |
355 | ln -sf $(find-jar commons-beanutils) $TOMCATDIR/server/lib/commons-beanutils.jar | |
356 | ln -sf $(find-jar commons-digester) $TOMCATDIR/server/lib/commons-digester.jar | |
357 | ln -sf $(find-jar commons-fileupload) $TOMCATDIR/server/lib/commons-fileupload.jar | |
358 | ln -sf $(find-jar commons-logging) $TOMCATDIR/server/lib/commons-logging.jar | |
359 | ln -sf $(find-jar jaas) $TOMCATDIR/server/lib/jaas.jar | |
a50d18a2 ER |
360 | ln -sf $(find-jar regexp) $TOMCATDIR/server/lib/regexp.jar |
361 | ln -sf $(find-jar regexp) $TOMCATDIR/server/lib/jakarta-regexp-1.2.jar | |
362 | ln -sf $(find-jar regexp) $TOMCATDIR/server/lib/regexp-1.2.jar | |
363 | %endif | |
364 | ||
365 | ln -sf $(find-jar jaxp_parser_impl) $TOMCATDIR/common/endorsed/jaxp_parser_impl.jar | |
366 | ln -sf $(find-jar xml-commons-apis) $TOMCATDIR/common/endorsed/xml-commons-apis.jar | |
e9abaf04 | 367 | ln -sf $(find-jar struts-core) $TOMCATDIR/server/webapps/admin/WEB-INF/lib/struts-core.jar |
55df0736 | 368 | |
fccb2a6f SP |
369 | install -d $RPM_BUILD_ROOT%{_javadir} |
370 | mv $TOMCATDIR/common/lib/jasper* $RPM_BUILD_ROOT%{_javadir} | |
371 | ln -sf %{_javadir}/jasper-compiler-jdt.jar $TOMCATDIR/common/lib/ | |
372 | ln -sf %{_javadir}/jasper-compiler.jar $TOMCATDIR/common/lib/ | |
9c811057 | 373 | ln -sf %{_javadir}/jasper-runtime.jar $TOMCATDIR/common/lib/ |
fccb2a6f | 374 | |
4470e4fe | 375 | %clean |
376 | rm -rf $RPM_BUILD_ROOT | |
377 | ||
50d4797f | 378 | %pre |
21ee0b0d | 379 | %groupadd -g 234 -r -f tomcat |
380 | %useradd -u 234 -r -d /var/lib/tomcat -s /bin/false -c "Tomcat User" -g tomcat tomcat | |
50d4797f | 381 | |
382 | %post | |
383 | /sbin/chkconfig --add tomcat | |
4c334025 | 384 | %service tomcat restart |
50d4797f | 385 | |
386 | %preun | |
387 | if [ "$1" = "0" ]; then | |
4c334025 | 388 | %service tomcat stop |
50d4797f | 389 | /sbin/chkconfig --del tomcat |
390 | fi | |
391 | ||
392 | %postun | |
393 | if [ "$1" = "0" ]; then | |
15040216 | 394 | %userremove tomcat |
395 | %groupremove tomcat | |
50d4797f | 396 | fi |
397 | ||
4470e4fe | 398 | %files |
399 | %defattr(644,root,root,755) | |
8eee8985 | 400 | %doc build/{RELEASE-NOTES,RUNNING.txt} |
8eee8985 | 401 | %attr(754,root,root) /etc/rc.d/init.d/tomcat |
a8b81dcd | 402 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/tomcat |
0d4dc1cd | 403 | %{_sysconfdir} |
55df0736 | 404 | %dir %{_tomcatdir} |
0d4dc1cd | 405 | %dir %{_tomcatdir}/conf |
55df0736 | 406 | %dir %{_tomcatdir}/bin |
8eee8985 ER |
407 | %{_tomcatdir}/bin/catalina-tasks.xml |
408 | %{_tomcatdir}/bin/jkstatus-tasks.xml | |
409 | %{_tomcatdir}/bin/jmxaccessor-tasks.xml | |
98862cba | 410 | %attr(755,root,root) %{_tomcatdir}/bin/*.sh |
98862cba | 411 | %{_tomcatdir}/bin/*.jar |
55df0736 JB |
412 | %dir %{_tomcatdir}/common |
413 | %dir %{_tomcatdir}/common/classes | |
50d4797f | 414 | %dir %{_tomcatdir}/common/endorsed |
8eee8985 | 415 | %dir %{_tomcatdir}/common/i18n |
8665efb1 | 416 | %{_tomcatdir}/common/endorsed/*.jar |
8eee8985 ER |
417 | %{_tomcatdir}/common/i18n/tomcat-i18n-en.jar |
418 | %lang(es) %{_tomcatdir}/common/i18n/tomcat-i18n-es.jar | |
419 | %lang(fr) %{_tomcatdir}/common/i18n/tomcat-i18n-fr.jar | |
420 | %lang(ja) %{_tomcatdir}/common/i18n/tomcat-i18n-ja.jar | |
4470e4fe | 421 | %{_tomcatdir}/common/lib |
55df0736 JB |
422 | %dir %{_tomcatdir}/server |
423 | %dir %{_tomcatdir}/server/classes | |
4470e4fe | 424 | %{_tomcatdir}/server/lib |
fe8e7b59 | 425 | %dir %{_tomcatdir}/server/webapps |
260f0a8a SP |
426 | %{_tomcatdir}/server/webapps/host-manager |
427 | %{_tomcatdir}/server/webapps/manager | |
55df0736 JB |
428 | %{_tomcatdir}/webapps |
429 | %{_tomcatdir}/work | |
50d4797f | 430 | %{_tomcatdir}/shared |
55df0736 | 431 | %dir %{_vardir} |
fe8e7b59 | 432 | %dir %{_vardir}/conf |
68c123a0 ER |
433 | %dir %{_vardir}/conf/Catalina |
434 | %dir %{_vardir}/conf/Catalina/localhost | |
435 | # tomcat config has to be writeable because of tomacta-users.xml file and Catalina dir | |
436 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/MANIFEST.MF | |
437 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/catalina.policy | |
438 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/*.properties* | |
439 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/*.manifest | |
440 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/*.xml | |
441 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/balancer.xml | |
442 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/host-manager.xml | |
443 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/jsp-examples.xml | |
444 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/manager.xml | |
445 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/ROOT.xml | |
446 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/tomcat-docs.xml | |
447 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/webdav.xml | |
15040216 | 448 | %dir %attr(1730,root,tomcat) %{_vardir}/work |
449 | %dir %attr(775,root,tomcat) %{_vardir}/webapps | |
450 | %dir %attr(775,root,tomcat) %{_vardir}/temp | |
451 | %dir %attr(775,root,tomcat) %{_logdir}/tomcat | |
77779b40 | 452 | %{_vardir}/logs |
4470e4fe | 453 | |
8eee8985 | 454 | %if 0 |
4470e4fe | 455 | %files doc |
9c3d8079 | 456 | %defattr(644,root,root,755) |
4470e4fe | 457 | %doc catalina/docs/* |
8eee8985 | 458 | %endif |
fccb2a6f | 459 | |
260f0a8a SP |
460 | %files admin |
461 | %defattr(644,root,root,755) | |
68c123a0 | 462 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/admin.xml |
260f0a8a SP |
463 | %{_tomcatdir}/server/webapps/admin |
464 | ||
fccb2a6f | 465 | %files jasper |
0803d634 | 466 | %defattr(644,root,root,755) |
fccb2a6f SP |
467 | %{_javadir}/jasper-compiler-jdt.jar |
468 | %{_javadir}/jasper-compiler.jar | |
469 | %{_javadir}/jasper-runtime.jar |