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