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