3 # - test the Apache module
4 # - review by PLD Java and Apache specialists
6 %define apxs /usr/sbin/apxs
7 %define _pkglibdir %(%{apxs} -q LIBEXECDIR)
8 Summary: A fast servlet and JSP engine
9 Summary(pl.UTF-8): Szybki silnik servletów i JSP
14 Group: Networking/Daemons
15 Source0: http://www.caucho.com/download/%{name}-%{version}.tar.gz
16 # Source0-md5: 4e5a07b29b6b8ed86630c169bf62aba2
17 Source1: %{name}-mod_caucho.conf
19 Source3: %{name}.sysconfig
20 Patch0: %{name}-configure-test-httpd.conf.patch
21 Patch1: %{name}-apache2-test.patch
22 Patch2: %{name}-paths.patch
23 URL: http://www.caucho.com/resin/
24 BuildRequires: apache-devel
25 BuildRequires: jdk >= 1.2
26 Requires(post,preun): /sbin/chkconfig
27 Requires(postun): /usr/sbin/groupdel
28 Requires(postun): /usr/sbin/userdel
29 Requires(pre): /bin/id
30 Requires(pre): /usr/bin/getgid
31 Requires(pre): /usr/sbin/groupadd
32 Requires(pre): /usr/sbin/useradd
33 # for running even kaffe should be enough, since it's java 1.1
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43 Resin is a fast servlet and JSP engine supporting load balancing for
44 increased reliability. Resin encourages separation of content from
45 style with its XSL support. Servlets can generate simple XML and use
46 an XSL filter to format results for each client's capability, from
47 palm pilots to Mozilla.
49 This package provides the standalone Resin webserver only. Install
50 "apache-mod_caucho" package to use Resin with apache.
52 %description -l pl.UTF-8
53 Resin to szybki silnik servletowy i JSP, obsługujący load balancing
54 aby osiągnąć większą niezawodność. Resin wspiera oddzielenie treści od
55 stylu poprzez obsługę XSL-a. Servlety mogą generować prosty XML i
56 używać filtra XSL do formatowania wyników zależnie od możliwości
57 klienta, od Palm Pilotów do Mozilli.
59 Ten pakiet zawiera jedynie samodzielny serwer WWW Resina. Aby użyć
60 Resin z Apache należy zainstalować dodatkowo pakiet
63 %package -n apache-mod_caucho
64 Summary: An Apache module for Resin servlet and JSP engine
65 Summary(pl.UTF-8): Moduł Apache dla silnika servletów i JSP
66 Group: Networking/Daemons
67 Requires(post,preun): /usr/sbin/apxs
69 Requires: resin = %{epoch}:%{version}-%{release}
71 %description -n apache-mod_caucho
72 An Apache module for Resin servlet and JSP engine.
74 %description -n apache-mod_caucho -l pl.UTF-8
75 Moduł Apache dla silnika servletów i JSP.
78 Summary: Resin online documentation
79 Summary(pl.UTF-8): Dokumentacja online dla Resina
80 Group: Networking/Daemons
81 Requires: %{name} = %{epoch}:%{version}-%{release}
84 Provides Resin documentation as http://localhost:8080/resin-doc/
85 (assuming default Resin configuration).
87 %description doc -l pl.UTF-8
88 Udostępnia dokumentację Resina jako http://localhost:8080/resin-doc/
89 (zakładając domyślną konfigurację Resina).
98 # this are available in the -src tarball only, which is harder to build
99 #rm -f configure # to get permissions right
103 cp -f /usr/share/automake/config.* automake
105 --with-apxs=%{_sbindir}/apxs \
107 --with-jni-include="-I/usr/%{_lib}/java/include -I/usr/%{_lib}/java/include/linux" \
108 CFLAGS="%{rpmcflags} `/usr/bin/apr-1-config --includes --cppflags` `/usr/bin/apu-1-config --includes`"
109 # should be found depending on location of `java' binary
111 # --with-java-home=%{_libdir}/java \
116 rm -rf $RPM_BUILD_ROOT
117 install -d $RPM_BUILD_ROOT%{_pkglibdir} \
118 $RPM_BUILD_ROOT%{_sysconfdir}/{resin,httpd/httpd.conf,rc.d/init.d,sysconfig} \
119 $RPM_BUILD_ROOT%{_datadir}/resin/{lib,bin,webapps} \
120 $RPM_BUILD_ROOT%{_libdir}/resin \
121 $RPM_BUILD_ROOT/var/{run,log}/resin \
122 $RPM_BUILD_ROOT/var/lib/resin/{cache,work,tmp,webapps}
124 libtool --mode=install install modules/c/src/apache2/mod_caucho.la $RPM_BUILD_ROOT%{_pkglibdir}/wtf
126 cp -R bin/*{.sh,.pl} $RPM_BUILD_ROOT%{_datadir}/resin/bin
127 cp -R conf/* $RPM_BUILD_ROOT%{_sysconfdir}/resin
128 cp -R lib/* $RPM_BUILD_ROOT%{_datadir}/resin/lib
129 cp -R webapps/* $RPM_BUILD_ROOT%{_datadir}/resin/webapps
131 install modules/c/src/resin_os/libresin_os.so $RPM_BUILD_ROOT%{_libdir}/resin
133 install %{SOURCE1} $RPM_BUILD_ROOT/etc/httpd/httpd.conf/70_mod_caucho.conf
134 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/resin
135 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/resin
138 rm -rf $RPM_BUILD_ROOT
142 %useradd -u 51 -r -d /home/services/httpd -s /bin/false -c "HTTP User" -g http http
145 if [ "$1" = "0" ]; then
151 if [ "$1" = "0" ]; then
152 if [ -f /var/lock/subsys/resin ]; then
153 /etc/rc.d/init.d/resin stop 1>&2
155 /sbin/chkconfig --del resin
159 /sbin/chkconfig --add resin
160 if [ -f /var/lock/subsys/resin ]; then
161 /etc/rc.d/init.d/resin restart 1>&2
163 echo "Run \"/etc/rc.d/init.d/resin start\" to start resin daemon."
166 %preun -n apache-mod_caucho
167 if [ "$1" = "0" ]; then
168 if [ -f /var/lock/subsys/httpd ]; then
169 /etc/rc.d/init.d/httpd restart 1>&2
173 %post -n apache-mod_caucho
174 if [ -f /var/lock/subsys/httpd ]; then
175 /etc/rc.d/init.d/httpd restart 1>&2
177 echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
181 if [ -f /var/lock/subsys/resin ]; then
182 /etc/rc.d/init.d/resin restart 1>&2
186 if [ -f /var/lock/subsys/resin ]; then
187 /etc/rc.d/init.d/resin restart 1>&2
188 rm -f /var/lib/resin/webapps/resin-doc 2>/dev/null
193 %defattr(644,root,root,755)
195 %attr(660,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/resin/*
196 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/resin
197 %attr(754,root,root) /etc/rc.d/init.d/resin
199 %dir %{_libdir}/resin
200 %attr(755,root,root) %{_libdir}/resin/*
202 %dir %{_datadir}/resin
203 %dir %{_datadir}/resin/bin
204 %attr(755,root,root) %{_datadir}/resin/bin/*
205 %dir %{_datadir}/resin/lib
206 %{_datadir}/resin/lib/*
207 %dir %{_datadir}/resin/webapps
208 %{_datadir}/resin/webapps/ROOT
211 %attr(770,root,http) /var/lib/resin/*
212 %attr(770,root,http) %dir /var/log/resin
213 %attr(770,root,http) %dir /var/run/resin
215 %files -n apache-mod_caucho
216 %defattr(644,root,root,755)
217 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/httpd/httpd.conf/70_mod_caucho.conf
218 %attr(755,root,root) %{_pkglibdir}/mod_caucho.so
221 %defattr(644,root,root,755)
222 %{_datadir}/resin/webapps/resin-doc*