]>
Commit | Line | Data |
---|---|---|
4f9f35cf ER |
1 | # TODO |
2 | # - packages for *.renametojar files (-cgi and -ssi in server/lib) | |
3 | # | |
eca62e60 | 4 | # Conditional build: |
ac632beb | 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) | |
eca62e60 ER |
8 | # |
9 | Summary: Apache Servlet/JSP Engine, RI for Servlet 2.4/JSP 2.0 API | |
f045ab88 | 10 | Summary(pl.UTF-8): Silnik Servlet/JSP Apache będący wzorcową implementacją API Servlet 2.4/JSP 2.0 |
51bcbcd2 | 11 | Name: apache-tomcat |
f9d6e42f | 12 | Version: 5.5.27 |
1669e8ae | 13 | Release: 0.2 |
c1934721 | 14 | License: Apache v2.0 |
15 | Group: Networking/Daemons/Java | |
51bcbcd2 | 16 | Source0: http://www.apache.org/dist/tomcat/tomcat-5/v%{version}/src/%{name}-%{version}-src.tar.gz |
f9d6e42f | 17 | # Source0-md5: eb3f196013550b9b1684e4ff18593a8e |
9ba83a1b | 18 | Source1: %{name}.init |
f93b3a59 | 19 | Source2: %{name}.sysconfig |
3e2cdbf3 | 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 | |
51bcbcd2 ER |
25 | Patch0: %{name}-skip-servletapi.patch |
26 | Patch1: %{name}-nsis.patch | |
27 | Patch2: %{name}-native.patch | |
28 | Patch3: %{name}-skip-jdt.patch | |
d61c5134 | 29 | Patch4: %{name}-no-connectors.patch |
f9d6e42f | 30 | Patch5: %{name}-dbcp.patch |
7cf40cc1 | 31 | # this patch is needed for struts >= 1.3 |
32 | Patch6: %{name}-struts.patch | |
aef723ef | 33 | URL: http://tomcat.apache.org/ |
51193398 | 34 | %if %{with java_sun} |
ac632beb | 35 | BuildRequires: java-sun >= 1.5 |
36 | BuildRequires: java-sun-jre >= 1.5 | |
37 | %else | |
38 | BuildRequires: java-gcj-compat-devel | |
19bbcbf6 | 39 | # BuildRequires: jsse >= 0:1.0.3 |
ac632beb | 40 | %endif |
498e9275 | 41 | BuildRequires: ant >= 1.5.3 |
7ea1b4e7 ER |
42 | BuildRequires: ant-trax |
43 | BuildRequires: eclipse-jdt | |
6c0937ca | 44 | BuildRequires: jaas |
ac4a959f | 45 | BuildRequires: jakarta-regexp >= 0:1.3 |
5d4d27d1 | 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 | |
a567480f | 55 | BuildRequires: java-commons-httpclient |
5d4d27d1 | 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 | |
2547d651 | 62 | %{?with_jta:BuildRequires: java-jta >= 0:1.0.1} |
7d5d4854 | 63 | BuildRequires: java-log4j |
64 | BuildRequires: java-puretls | |
b3ca1c9e | 65 | BuildRequires: java-servletapi5 = %{version} |
a567480f | 66 | #BuildRequires: java-struts >= 0:1.2.7 |
67 | BuildRequires: java-struts >= 1.0.2 | |
7d5d4854 | 68 | BuildRequires: java-xerces >= 0:2.7.1 |
69 | BuildRequires: java-xml-commons | |
70 | #BuildRequires: java-xml-commons >= 1.3 | |
e9d9d15e | 71 | BuildRequires: java-mail >= 0:1.3.1 |
ac4a959f ER |
72 | BuildRequires: jaxp_parser_impl >= 0:2.7.1 |
73 | BuildRequires: jdbc-stdext >= 0:2.0 | |
a97a4eb2 | 74 | BuildRequires: jmx |
ac4a959f | 75 | BuildRequires: jndi >= 0:1.2.1 |
7ea1b4e7 | 76 | BuildRequires: jpackage-utils |
f2271359 | 77 | BuildRequires: junit >= 0:3.8.1 |
7ea1b4e7 | 78 | BuildRequires: rpmbuild(macros) >= 1.300 |
8129909e 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 | |
55a9c77b | 87 | Requires: %{name}-jasper = %{version}-%{release} |
8129909e | 88 | Requires: jaas |
7ea1b4e7 | 89 | #Requires: jaf >= 1.0.1 |
bf862eba | 90 | Requires: java-commons-beanutils |
91 | Requires: java-commons-collections | |
5d4d27d1 | 92 | #Requires: java-commons-dbcp-tomcat5 |
bf862eba | 93 | Requires: java-commons-digester |
5d4d27d1 | 94 | Requires: java-commons-el |
95 | #Requires: java-commons-fileupload | |
bf862eba | 96 | Requires: java-commons-logging |
97 | Requires: java-commons-modeler | |
7d5d4854 | 98 | Requires: java-regexp |
fbf473d1 | 99 | Requires: java-servletapi5 = %{version} |
7d5d4854 | 100 | Requires: java-xml-commons |
8129909e ER |
101 | Requires: javamail >= 1.2 |
102 | Requires: jaxp_parser_impl | |
a0446376 | 103 | Requires: jdbc-stdext >= 2.0 |
a0446376 | 104 | Requires: jndi >= 1.2.1 |
8129909e | 105 | Requires: jre >= 1.2 |
a0446376 | 106 | Requires: jsse >= 1.0.2 |
2547d651 | 107 | %{?with_jta:Requires: jta >= 1.0.1} |
eca62e60 | 108 | Requires: rc-scripts |
201f6baa | 109 | Provides: group(tomcat) |
a567480f | 110 | Provides: java-servlet-container |
201f6baa | 111 | Provides: user(tomcat) |
51bcbcd2 | 112 | Obsoletes: jakarta-tomcat |
623f0978 | 113 | BuildArch: noarch |
114 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
115 | ||
a97a4eb2 | 116 | %define _tomcatdir %{_datadir}/tomcat |
623f0978 | 117 | %define _logdir %{_var}/log |
a0446376 | 118 | %define _vardir %{_var}/lib/tomcat |
a97a4eb2 | 119 | %define _sysconfdir /etc/tomcat |
623f0978 | 120 | |
121 | %description | |
eca62e60 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. | |
623f0978 | 126 | |
eca62e60 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 | ||
f045ab88 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 | |
51bcbcd2 ER |
135 | Java Servlet i JavaServer Pages są rozwijane przez Suna zgodnie z Java |
136 | Community Process. | |
623f0978 | 137 | |
138 | %package doc | |
51bcbcd2 | 139 | Summary: The Apache Tomcat Servlet/JSP Container documentation |
152e6062 | 140 | Summary(pl.UTF-8): Dokumentacja do Tomcata - kontenera Servlet/JSP |
c1934721 | 141 | Group: Documentation |
51bcbcd2 | 142 | Obsoletes: jakarta-tomcat-doc |
623f0978 | 143 | |
144 | %description doc | |
e1f70dd8 JB |
145 | The Tomcat Servlet/JSP Container documentation. |
146 | ||
f045ab88 | 147 | %description doc -l pl.UTF-8 |
152e6062 | 148 | Dokumentacja do Tomcata - kontenera Servlet/JSP. |
623f0978 | 149 | |
804609f8 SP |
150 | %package admin |
151 | Summary: Apache Tomcat`s Administration Web Application | |
152 | Summary(pl.UTF-8): Panel Administracyjny dla Apache Tomcat | |
c1934721 | 153 | Group: Networking/Daemons/Java/Servlets |
bb78b380 | 154 | Requires: java-commons-chain |
804609f8 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 | ||
d4ae229e | 162 | %package jasper |
55a9c77b | 163 | Summary: JSP compiler |
164 | Summary(pl.UTF-8): Kompilator JSP | |
d4ae229e | 165 | Group: Libraries/Java |
15b32f14 | 166 | Requires: jpackage-utils |
d4ae229e SP |
167 | |
168 | %description jasper | |
55a9c77b | 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. | |
d4ae229e | 175 | |
623f0978 | 176 | %prep |
51bcbcd2 | 177 | %setup -q -n %{name}-%{version}-src |
7bfc9a0d ER |
178 | %patch0 -p1 |
179 | %patch1 -p1 | |
180 | %patch2 -p1 | |
181 | %patch3 -p1 | |
d61c5134 | 182 | %patch4 -p1 |
e40b89eb | 183 | %patch5 -p1 |
7cf40cc1 | 184 | %patch6 -p1 |
7bfc9a0d | 185 | |
d61c5134 | 186 | # servletapi built from jakarta-servletapi5.spec |
7bfc9a0d | 187 | rm -rf servletapi |
eca62e60 ER |
188 | |
189 | # Remove pre-built jars | |
190 | find -name '*.jar' | xargs rm -fv | |
623f0978 | 191 | |
192 | %build | |
eca62e60 ER |
193 | TOPDIR=$(pwd) |
194 | ||
7bfc9a0d ER |
195 | %if 0 |
196 | # build jasper javadocs | |
197 | cd jasper | |
198 | CLASSPATH=$(build-classpath xml-commons-apis) | |
4f9f35cf | 199 | # building jasper needs eclipse classes |
eca62e60 | 200 | cat > build.properties <<EOF |
4f9f35cf ER |
201 | ant.jar=$(find-jar ant) |
202 | servlet-api.jar=$(find-jar servlet-api) | |
203 | jsp-api.jar=$(find-jar jsp-api) | |
eca62e60 | 204 | tools.jar=%{java_home}/lib/tools.jar |
4f9f35cf 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) | |
eca62e60 | 212 | EOF |
7bfc9a0d 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 | |
eca62e60 ER |
223 | |
224 | # build tomcat 5.5 | |
2547d651 | 225 | # XXX build process should fail if one of these find-jar commands fails |
f2271359 | 226 | # how to fix that? |
7bfc9a0d | 227 | cat > build.properties <<EOF |
a48f26fe | 228 | commons-beanutils.jar=$(find-jar commons-beanutils-core) |
4f9f35cf 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) | |
c2e39bad | 239 | jasper-compiler-jdt.home=$TOPDIR/tomcat-deps |
4f9f35cf 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) | |
9e94226b | 243 | commons-io.jar=$(find-jar commons-io) |
4f9f35cf ER |
244 | jmx.jar=$(find-jar jmx) |
245 | jmx-tools.jar=$(find-jar jmx) | |
246 | junit.jar=$(find-jar junit) | |
a48f26fe | 247 | struts.jar=$(find-jar struts-core) |
248 | struts-core.jar=$(find-jar struts-core) | |
249 | struts-taglib.jar=$(find-jar struts-taglib) | |
4f9f35cf ER |
250 | jcert.jar=$(find-jar jcert) |
251 | jnet.jar=$(find-jar jnet) | |
252 | jsse.jar=$(find-jar jsse) | |
2547d651 | 253 | %{?with_jta:jta.jar=$(find-jar jta)} |
4f9f35cf ER |
254 | puretls.jar=$(find-jar puretls) |
255 | servlet-api.jar=$(find-jar servlet-api) | |
7bfc9a0d | 256 | servletapi.build.notrequired=true |
4f9f35cf | 257 | jsp-api.jar=$(find-jar jsp-api) |
7bfc9a0d | 258 | jspapi.build.notrequired=true |
4f9f35cf | 259 | log4j.jar=$(find-jar log4j) |
a48f26fe | 260 | tomcat-dbcp.jar=$(find-jar commons-dbcp-tomcat5) |
d4ae229e | 261 | struts.lib=%{_javadir}-struts |
eca62e60 ER |
262 | EOF |
263 | ||
d61c5134 ER |
264 | %ant \ |
265 | -Dcompile.source=1.4 | |
eca62e60 | 266 | |
623f0978 | 267 | %install |
268 | rm -rf $RPM_BUILD_ROOT | |
a97a4eb2 ER |
269 | cd build/build |
270 | TOMCATDIR=$RPM_BUILD_ROOT%{_tomcatdir} | |
271 | CATALINADIR=$RPM_BUILD_ROOT/var/lib/tomcat | |
623f0978 | 272 | |
a97a4eb2 ER |
273 | # we don't need dos scripts |
274 | rm -f bin/*.bat | |
f271c61b | 275 | |
a97a4eb2 | 276 | randpw=$(echo $RANDOM$$ | md5sum | cut -c 1-15) |
4f9f35cf | 277 | %{__sed} -i -e "s:SHUTDOWN:${randpw}:" conf/{server,server-minimal}.xml |
a97a4eb2 ER |
278 | |
279 | install -d $TOMCATDIR/bin \ | |
280 | $TOMCATDIR/common/{lib,classes,endorsed} \ | |
281 | $TOMCATDIR/server/{lib,classes} \ | |
282 | $TOMCATDIR/webapps \ | |
a0446376 | 283 | $RPM_BUILD_ROOT%{_logdir}/tomcat \ |
98133f85 | 284 | $RPM_BUILD_ROOT%{_vardir}/webapps \ |
a0446376 | 285 | $RPM_BUILD_ROOT%{_vardir}/work \ |
98133f85 | 286 | $RPM_BUILD_ROOT%{_vardir}/conf \ |
125df118 | 287 | $RPM_BUILD_ROOT/etc/sysconfig \ |
a0446376 | 288 | $RPM_BUILD_ROOT/etc/rc.d/init.d |
389e46b9 | 289 | |
a97a4eb2 | 290 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/tomcat |
f93b3a59 | 291 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/tomcat |
623f0978 | 292 | |
98133f85 | 293 | cp -pR conf/* $CATALINADIR/conf |
3e2cdbf3 | 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 | |
a97a4eb2 | 299 | cp -HR bin common server $TOMCATDIR |
eca62e60 | 300 | |
4f9f35cf ER |
301 | cp -rf server/webapps $TOMCATDIR/server |
302 | cp -rf webapps $TOMCATDIR | |
303 | cp -rf shared $TOMCATDIR | |
80cbd8b8 | 304 | cp -rf temp $CATALINADIR |
a97a4eb2 | 305 | |
98133f85 | 306 | ln -sf %{_logdir}/tomcat $CATALINADIR/logs |
4f9f35cf | 307 | ln -sf %{_vardir}/work $TOMCATDIR/work |
98133f85 | 308 | ln -sf %{_vardir}/conf $TOMCATDIR/conf |
309 | ln -sf %{_vardir}/conf $RPM_BUILD_ROOT%{_sysconfdir} | |
a97a4eb2 ER |
310 | |
311 | # symlinks instead of copies | |
4f9f35cf 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 | |
6378940b | 315 | ln -sf $(find-jar jsp-api) $TOMCATDIR/common/lib/jsp-api.jar |
4f9f35cf ER |
316 | |
317 | ln -sf $(find-jar commons-modeler) $TOMCATDIR/server/lib/commons-modeler.jar | |
318 | ||
6378940b 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 | |
321 | ln -sf $(find-jar struts) $TOMCATDIR/server/webapps/admin/WEB-INF/lib/struts.jar | |
322 | ||
4f9f35cf ER |
323 | %if 0 |
324 | # do not make these symlinks as ant didn't do | |
325 | ln -sf $(find-jar commons-daemon) $TOMCATDIR/bin/commons-daemon.jar | |
326 | ln -sf $(find-jar activation) $TOMCATDIR/common/lib/activation.jar | |
327 | ln -sf $(find-jar ant) $TOMCATDIR/common/lib/ant.jar | |
328 | ln -sf $(find-jar commons-collections) $TOMCATDIR/common/lib/commons-collections.jar | |
329 | ln -sf $(find-jar commons-dbcp) $TOMCATDIR/common/lib/commons-dbcp.jar | |
330 | ln -sf $(find-jar commons-logging-api) $TOMCATDIR/common/lib/commons-logging-api.jar | |
331 | ln -sf $(find-jar commons-pool) $TOMCATDIR/common/lib/commons-pool.jar | |
332 | ln -sf $(find-jar servlet) $TOMCATDIR/common/lib/servlet.jar | |
333 | ln -sf $(find-jar servlet) $TOMCATDIR/common/lib/servletapi4.jar | |
334 | ln -sf $(find-jar jdbc-stdext) $TOMCATDIR/common/lib/jdbc-stdext.jar | |
335 | ln -sf jdbc-stdext.jar $TOMCATDIR/common/lib/jdbc2_0-stdext.jar | |
336 | ln -sf jdbc-stdext.jar $TOMCATDIR/common/lib/jdbc-stdext-2.0.jar | |
337 | ln -sf $(find-jar jmxri) $TOMCATDIR/common/lib/jmxri.jar | |
338 | ln -sf $(find-jar jndi) $TOMCATDIR/common/lib/jndi.jar | |
2547d651 | 339 | %{?with_jta:ln -sf $(find-jar jta) $TOMCATDIR/common/lib/jta.jar} |
4f9f35cf ER |
340 | ln -sf $(find-jar mail) $TOMCATDIR/common/lib/mail.jar |
341 | ln -sf $(find-jar jsse) $TOMCATDIR/common/lib/jsse.jar | |
342 | ln -sf $(find-jar junit) $TOMCATDIR/common/lib/junit.jar | |
343 | ln -sf $(find-jar mailapi) $TOMCATDIR/common/lib/mailapi.jar | |
344 | ln -sf $(find-jar pop3) $TOMCATDIR/common/lib/pop3.jar | |
345 | ln -sf pop3.jar $TOMCATDIR/common/lib/pop.jar | |
346 | ln -sf $(find-jar smtp) $TOMCATDIR/common/lib/smtp.jar | |
347 | ln -sf $(find-jar imap) $TOMCATDIR/common/lib/imap.jar | |
348 | ln -sf $(find-jar commons-beanutils) $TOMCATDIR/server/lib/commons-beanutils.jar | |
349 | ln -sf $(find-jar commons-digester) $TOMCATDIR/server/lib/commons-digester.jar | |
350 | ln -sf $(find-jar commons-fileupload) $TOMCATDIR/server/lib/commons-fileupload.jar | |
351 | ln -sf $(find-jar commons-logging) $TOMCATDIR/server/lib/commons-logging.jar | |
352 | ln -sf $(find-jar jaas) $TOMCATDIR/server/lib/jaas.jar | |
4f9f35cf ER |
353 | ln -sf $(find-jar regexp) $TOMCATDIR/server/lib/regexp.jar |
354 | ln -sf $(find-jar regexp) $TOMCATDIR/server/lib/jakarta-regexp-1.2.jar | |
355 | ln -sf $(find-jar regexp) $TOMCATDIR/server/lib/regexp-1.2.jar | |
356 | %endif | |
357 | ||
358 | ln -sf $(find-jar jaxp_parser_impl) $TOMCATDIR/common/endorsed/jaxp_parser_impl.jar | |
359 | ln -sf $(find-jar xml-commons-apis) $TOMCATDIR/common/endorsed/xml-commons-apis.jar | |
a48f26fe | 360 | ln -sf $(find-jar struts-core) $TOMCATDIR/server/webapps/admin/WEB-INF/lib/struts-core.jar |
a0446376 | 361 | |
d4ae229e SP |
362 | install -d $RPM_BUILD_ROOT%{_javadir} |
363 | mv $TOMCATDIR/common/lib/jasper* $RPM_BUILD_ROOT%{_javadir} | |
364 | ln -sf %{_javadir}/jasper-compiler-jdt.jar $TOMCATDIR/common/lib/ | |
365 | ln -sf %{_javadir}/jasper-compiler.jar $TOMCATDIR/common/lib/ | |
75e1b618 | 366 | ln -sf %{_javadir}/jasper-runtime.jar $TOMCATDIR/common/lib/ |
d4ae229e | 367 | |
623f0978 | 368 | %clean |
369 | rm -rf $RPM_BUILD_ROOT | |
370 | ||
2b56d949 | 371 | %pre |
bc75997d | 372 | %groupadd -g 234 -r -f tomcat |
373 | %useradd -u 234 -r -d /var/lib/tomcat -s /bin/false -c "Tomcat User" -g tomcat tomcat | |
2b56d949 | 374 | |
375 | %post | |
376 | /sbin/chkconfig --add tomcat | |
6c0937ca | 377 | %service tomcat restart |
2b56d949 | 378 | |
379 | %preun | |
380 | if [ "$1" = "0" ]; then | |
6c0937ca | 381 | %service tomcat stop |
2b56d949 | 382 | /sbin/chkconfig --del tomcat |
383 | fi | |
384 | ||
385 | %postun | |
386 | if [ "$1" = "0" ]; then | |
201f6baa | 387 | %userremove tomcat |
388 | %groupremove tomcat | |
2b56d949 | 389 | fi |
390 | ||
623f0978 | 391 | %files |
392 | %defattr(644,root,root,755) | |
a97a4eb2 | 393 | %doc build/{RELEASE-NOTES,RUNNING.txt} |
a97a4eb2 | 394 | %attr(754,root,root) /etc/rc.d/init.d/tomcat |
ab574f59 | 395 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/tomcat |
98133f85 | 396 | %{_sysconfdir} |
a0446376 | 397 | %dir %{_tomcatdir} |
98133f85 | 398 | %dir %{_tomcatdir}/conf |
a0446376 | 399 | %dir %{_tomcatdir}/bin |
a97a4eb2 ER |
400 | %{_tomcatdir}/bin/catalina-tasks.xml |
401 | %{_tomcatdir}/bin/jkstatus-tasks.xml | |
402 | %{_tomcatdir}/bin/jmxaccessor-tasks.xml | |
389e46b9 | 403 | %attr(755,root,root) %{_tomcatdir}/bin/*.sh |
389e46b9 | 404 | %{_tomcatdir}/bin/*.jar |
a0446376 JB |
405 | %dir %{_tomcatdir}/common |
406 | %dir %{_tomcatdir}/common/classes | |
2b56d949 | 407 | %dir %{_tomcatdir}/common/endorsed |
a97a4eb2 | 408 | %dir %{_tomcatdir}/common/i18n |
f271c61b | 409 | %{_tomcatdir}/common/endorsed/*.jar |
a97a4eb2 ER |
410 | %{_tomcatdir}/common/i18n/tomcat-i18n-en.jar |
411 | %lang(es) %{_tomcatdir}/common/i18n/tomcat-i18n-es.jar | |
412 | %lang(fr) %{_tomcatdir}/common/i18n/tomcat-i18n-fr.jar | |
413 | %lang(ja) %{_tomcatdir}/common/i18n/tomcat-i18n-ja.jar | |
623f0978 | 414 | %{_tomcatdir}/common/lib |
a0446376 JB |
415 | %dir %{_tomcatdir}/server |
416 | %dir %{_tomcatdir}/server/classes | |
623f0978 | 417 | %{_tomcatdir}/server/lib |
804609f8 SP |
418 | %{_tomcatdir}/server/webapps/host-manager |
419 | %{_tomcatdir}/server/webapps/manager | |
a0446376 JB |
420 | %{_tomcatdir}/webapps |
421 | %{_tomcatdir}/work | |
2b56d949 | 422 | %{_tomcatdir}/shared |
a0446376 | 423 | %dir %{_vardir} |
49a8ad15 ER |
424 | %dir %{_vardir}/conf/Catalina |
425 | %dir %{_vardir}/conf/Catalina/localhost | |
426 | # tomcat config has to be writeable because of tomacta-users.xml file and Catalina dir | |
427 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/MANIFEST.MF | |
428 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/catalina.policy | |
429 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/*.properties* | |
430 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/*.manifest | |
431 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/*.xml | |
432 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/balancer.xml | |
433 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/host-manager.xml | |
434 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/jsp-examples.xml | |
435 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/manager.xml | |
436 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/ROOT.xml | |
437 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/tomcat-docs.xml | |
438 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/webdav.xml | |
201f6baa | 439 | %dir %attr(1730,root,tomcat) %{_vardir}/work |
440 | %dir %attr(775,root,tomcat) %{_vardir}/webapps | |
441 | %dir %attr(775,root,tomcat) %{_vardir}/temp | |
442 | %dir %attr(775,root,tomcat) %{_logdir}/tomcat | |
9e1e98ce | 443 | %{_vardir}/logs |
623f0978 | 444 | |
a97a4eb2 | 445 | %if 0 |
623f0978 | 446 | %files doc |
ff740076 | 447 | %defattr(644,root,root,755) |
623f0978 | 448 | %doc catalina/docs/* |
a97a4eb2 | 449 | %endif |
d4ae229e | 450 | |
804609f8 SP |
451 | %files admin |
452 | %defattr(644,root,root,755) | |
49a8ad15 | 453 | %config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/admin.xml |
804609f8 SP |
454 | %{_tomcatdir}/server/webapps/admin |
455 | ||
d4ae229e | 456 | %files jasper |
7e500426 | 457 | %defattr(644,root,root,755) |
d4ae229e SP |
458 | %{_javadir}/jasper-compiler-jdt.jar |
459 | %{_javadir}/jasper-compiler.jar | |
460 | %{_javadir}/jasper-runtime.jar |