]> git.pld-linux.org Git - SPECS.git/blob - resin-cmp.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / resin-cmp.spec
1 Summary:        A fast servlet and JSP engine
2 Summary(pl.UTF-8):      Szybki silnik servletów i JSP
3 Name:           resin-cmp
4 Version:        1.0.4
5 Release:        2
6 License:        Caucho Developer Source License
7 Group:          Networking/Daemons/Java
8 Source0:        http://www.caucho.com/download/%{name}-%{version}.tar.gz
9 # Source0-md5:  f1f794fd9ed9f8c90c3832a99f2227d5
10 Source2:        %{name}.init
11 Source3:        %{name}.sysconfig
12 Source4:        %{name}.logrotate
13 Source10:       %{name}-mod_caucho.conf
14 Source11:       %{name}-conf_resin.conf
15 Source12:       %{name}-conf_apache2resin.conf
16 Source13:       %{name}-conf_examples-params.conf
17 Source14:       %{name}-conf_examples-webapps.conf
18 Patch0:         %{name}-configure-test-httpd.conf.patch
19 Patch1:         %{name}-configure-libssl_so.patch
20 Patch2:         %{name}-mod_caucho-ipv6.patch
21 Patch3:         %{name}-makefile_in-jni_include.patch
22 Patch4:         %{name}-pidfile.patch
23 URL:            http://www.caucho.com/
24 BuildRequires:  apache-devel
25 BuildRequires:  autoconf >= 1.4
26 BuildRequires:  automake >= 1.4d
27 BuildRequires:  jdk >= 1.2
28 BuildRequires:  libtool >= 1.4
29 BuildRequires:  openssl-devel >= 0.9.7d
30 Requires(post,preun):   /sbin/chkconfig
31 Requires:       jdk >= 1.2
32 Requires:       rc-scripts
33 Requires:       sed
34 # it's known it's better to use apache as HTTP server, but
35 # resin itself has got httpd too.
36 Provides:       ejb
37 Provides:       jsp
38 Provides:       servlet
39 Provides:       webserver
40 Conflicts:      logrotate < 3.7-4
41 Conflicts:      resin
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %define         apxs            /usr/sbin/apxs
45 %define         httpdir         /home/services/httpd
46 %define         _libexecdir     %{_prefix}/lib/apache
47
48 %description
49 Resin-CMP brings Enterprise Java Bean's container managed persistence
50 (CMP) to servlet applications, letting modest sites eliminate
51 hardcoded JDBC calls without requiring the complexity of distributed
52 objects.
53
54 Resin-CMP contains Resin 2.0. Resin is a fast servlet and JSP engine
55 supporting load balancing for increased reliability. Resin encourages
56 separation of content from style with its XSL support. Servlets can
57 generate simple XML and use an XSL filter to format results for each
58 client's capability, from palm pilots to Mozilla.
59
60 %description -l pl.UTF-8
61 Resin-CMP dostarcza aplikacjom servletowym Enterprise Java Bean's
62 Container Managed Persistence (CMP), pozwalając przyzwoitym witrynom
63 wyeliminować wpisane na stałe wywołania JDBC bez potrzeby
64 komplikowania rozproszonych obiektów.
65
66 Resin-CMP zawiera Resina 2.0. Resin to szybki silnik servletowy i JSP,
67 obsługujący load balancing aby osiągnąć większą niezawodność. Resin
68 wspiera oddzielenie treści od stylu poprzez obsługę XSL. Servlety mogą
69 generować prosty XML i używać filtra XSL do formatowania wyników
70 zależnie od możliwości klienta, od Palm Pilotów do Mozilli.
71
72 %package doc
73 Summary:        Additional documentation for Resin
74 Summary(pl.UTF-8):      Dodatkowa dokumentacja do Resina
75 Group:          Networking/Daemons/Java
76 Requires(post): fileutils
77 Requires(post): findutils
78 Requires:       %{name} = %{version}-%{release}
79
80 %description doc
81 Documentation for Resin. Contains:
82 - The Servlet Demos, The FAQ
83 - Installation configurations: Standalone Resin Web Server Resin with
84   Unix Apache, Win32 Apache, IIS, O'Reilly WebSite, Netscape.
85 - Basic resin.conf: Servlet configuration, Database configuration, Web
86   application configuration, HTTP and srun configuration, General Resin
87   configuration.
88 - Servlet Example, Virtual Hosts, Caching, Load Balancing
89 - The Reference guide, The JavaDoc
90
91 %description doc -l pl.UTF-8
92 Dokumentacja dla Resina. Zawiera:
93 - servlety demonstracyjne, FAQ
94 - konfiguracje instalacji: dla samodzielnego Resina, Resina z Apache
95   pod Uniksem, z Apache pod Win32, IIS, O'Reilly WebSite, Netscape.
96 - podstawowy resin.conf: konfiguracja servletów, konfiguracja bazy
97   danych, konfiguracja aplikacji WWW, konfiguracja HTTP i srun, ogólna
98   konfiguracja Resina
99 - przykład servletu, wirtualnych hostów, cachowania, load balancingu
100 - przewodnik, JavaDoc.
101
102 %package mod_caucho
103 Summary:        Resin module for Apache
104 Summary(pl.UTF-8):      Moduł Resina dla Apache
105 Group:          Networking/Daemons
106 Requires(post,preun):   %{apxs}
107 Requires(post,preun):   grep
108 Requires(preun):        fileutils
109 Requires:       %{name} = %{version}-%{release}
110 Requires:       apache(EAPI)
111
112 %description mod_caucho
113 Allows to serve JSP requests under Apache.
114
115 %description mod_caucho -l pl.UTF-8
116 Pozwala obsługiwać żądania JSP spod Apache.
117
118 %package hardcore
119 Summary:        Resin kernel module
120 Summary(pl.UTF-8):      Moduł jądra do Resina
121 Group:          Networking/Daemons
122 Requires:       %{name} = %{version}-%{release}
123 Provides:       webserver
124
125 %description hardcore
126 Resin HardCore is a Linux kernel module. By pulling the webserver into
127 the kernel single-computer Resin servers and load-balanced servers can
128 greatly improve their performance. HardCore replaces Apache as a
129 web-server, grabbing HTTP requests and passing them to the backend
130 Resin JVMs. Because HardCore operates entirely in the kernel, it has
131 very low overhead.
132
133 Details at http://localhost:8880/java_tut/hardcore.xtp .
134
135 %description hardcore -l pl.UTF-8
136 Resin HardCore jest modułem jądra Linuksa. Poprzez wciągnięcie serwera
137 WWW do jądra, jednokomputerowe serwery Resin, jak i te z
138 load-balancingiem mogą znacznie poprawić wydajność. HardCore zastępuje
139 Apache jako serwer WWW, pobierając zapytania HTTP i przesyłając je do
140 backendu Resin JVM. Ponieważ HardCore działa całkowicie w jądrze, ma
141 bardzo małe opóźnienia.
142
143 Szczegóły na http://localhost:8880/java_tut/hardcore.xtp .
144
145 %prep
146 %setup -q
147 %patch0 -p1
148 %patch1 -p1
149 %patch2 -p1
150 %patch3 -p1
151 %patch4 -p1
152
153 %build
154 %{__libtoolize}
155 %{__aclocal}
156 %{__autoconf}
157 %configure \
158         --with-apache \
159         --with-apache-eapi \
160         --with-java-home=%{_libdir}/java \
161         --with-jni-include=%{_libdir}/java/include \
162         --with-openssl=/usr \
163         --enable-linux-smp
164
165 %{__make}
166
167 %install
168 rm -rf $RPM_BUILD_ROOT
169 install -d $RPM_BUILD_ROOT%{_libexecdir} \
170           $RPM_BUILD_ROOT%{_sysconfdir}/{resin/examples,httpd} \
171           $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig,logrotate.d} \
172           $RPM_BUILD_ROOT%{_datadir}/resin/{lib,sql,xsl,libexec} \
173           $RPM_BUILD_ROOT%{httpdir}/resin/webapps \
174           $RPM_BUILD_ROOT%{_localstatedir}/{run,log,log/archive}/resin \
175           $RPM_BUILD_ROOT%{_localstatedir}/lib/resin/{cache,work,war_expand} \
176           $RPM_BUILD_ROOT%{_bindir}
177
178 cp -R bin lib xsl sql $RPM_BUILD_ROOT%{_datadir}/resin
179 cp -R doc/*  $RPM_BUILD_ROOT%{httpdir}/resin
180 install src/c/plugin/resin/resin.o $RPM_BUILD_ROOT%{_datadir}/resin/libexec
181
182 install %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/httpd/mod_caucho.conf
183
184 for conf in %{SOURCE11} %{SOURCE12} ; do
185         install $conf \
186                 $RPM_BUILD_ROOT%{_sysconfdir}/resin/$(basename $conf|sed "s/%{name}-conf_//")
187 done
188 for conf in %{SOURCE13} %{SOURCE14} ; do
189         install $conf \
190                 $RPM_BUILD_ROOT%{_sysconfdir}/resin/examples/$(basename $conf|sed "s/%{name}-conf_examples-//")
191 done
192
193 install src/c/plugin/apache/mod_caucho.so $RPM_BUILD_ROOT%{_libexecdir}
194 install src/c/plugin/resin/resin $RPM_BUILD_ROOT%{_bindir}
195 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/resin
196 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/resin
197 install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d
198
199 touch $RPM_BUILD_ROOT/var/log/resin/{access,error,stdout,sterr}_log
200
201 %clean
202 rm -rf $RPM_BUILD_ROOT
203
204 %post
205 /sbin/chkconfig --add resin
206 if [ -f %{_localstatedir}/lock/subsys/resin ]; then
207         /etc/rc.d/init.d/resin restart 1>&2
208 else
209         echo "Run \"/etc/rc.d/init.d/resin start\" to start resin daemon."
210 fi
211
212 %preun
213 if [ "$1" = "0" ]; then
214         if [ -f %{_localstatedir}/lock/subsys/resin ]; then
215                 /etc/rc.d/init.d/resin stop 1>&2
216         fi
217         /sbin/chkconfig --del resin
218 fi
219 rm -rf %{_localstatedir}/lib/resin/cache/*
220 rm -rf %{httpdir}/resin/WEB-INF/{tmp,work}
221
222 %post mod_caucho
223 %{apxs} -e -a -n caucho %{_libexecdir}/mod_caucho.so 1>&2
224 if ! grep -q "^Include.*mod_caucho.conf" /etc/httpd/httpd.conf ; then
225         echo "Include /etc/httpd/mod_caucho.conf" >> /etc/httpd/httpd.conf
226 fi
227 if [ -f %{_localstatedir}/lock/subsys/httpd ]; then
228         /etc/rc.d/init.d/httpd restart 1>&2
229 else
230         echo "Run \"/etc/rc.d/init.d/httpd start\" to start httpd daemon."
231 fi
232 echo "You may want to uncomment apache2resin.conf in resin.conf"
233
234 %preun mod_caucho
235 if [ "$1" = "0" ]; then
236         umask 027
237         %{apxs} -e -A -n caucho %{_libexecdir}/mod_caucho.so 1>&2
238         grep -v "^Include.*mod_caucho.conf" /etc/httpd/httpd.conf > \
239                 /etc/httpd/httpd.conf.tmp
240         mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
241         if [ -f %{_localstatedir}/lock/subsys/httpd ]; then
242                 /etc/rc.d/init.d/httpd restart 1>&2
243         fi
244         echo "You may want to disable apache2resin.conf in resin.conf"
245 fi
246
247 %post doc
248 echo "Setting permissions to WEB-INF directories"
249 find %{httpdir}/resin -type d -name WEB-INF -exec chown -R root:http {} \; -exec chmod -R g+w {} \;
250 echo "Don't forget to uncomment examples in resin.conf and restart resin-cmp"
251
252 %preun doc
253 echo "Don't forget to disable examples in resin.conf and restart resin-cmp"
254
255 %files
256 %defattr(644,root,root,755)
257 %doc LICENSE readme.txt conf/*
258 %attr(750,root,http) %dir %{_sysconfdir}/resin
259 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/resin/resin.conf
260 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/resin
261 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/*
262 %attr(754,root,root) /etc/rc.d/init.d/resin
263 %attr(755,root,root) %{_bindir}/resin
264 %dir %{httpdir}/resin
265 %{httpdir}/resin/webapps
266 %attr(775,root,http) %dir %{httpdir}/resin/WEB-INF
267 %{httpdir}/resin/WEB-INF/*
268 %{_datadir}/resin
269 %attr(770,root,http) %dir /var/log/resin
270 %attr(660,root,http) %ghost /var/log/resin/*
271 %attr(750,root,root) %dir /var/log/archive/resin
272 %defattr(660,root,http,0770)
273 %{_localstatedir}/lib/resin/cache
274 %{_localstatedir}/lib/resin/work
275 %{_localstatedir}/lib/resin/war_expand
276
277 %files doc
278 %defattr(644,root,root,755)
279 %attr(750,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/resin/examples
280 %{httpdir}/resin
281
282 %files mod_caucho
283 %defattr(644,root,root,755)
284 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd/mod_caucho.conf
285 %attr(640,root,http) %config %verify(not md5 mtime size) %{_sysconfdir}/resin/apache2resin.conf
286 %attr(755,root,root) %{_libexecdir}/mod_caucho.so
287
288 %files hardcore
289 %defattr(644,root,root,755)
290 %attr(755,root,root) %{_datadir}/resin/libexec/resin.o
This page took 0.099846 seconds and 3 git commands to generate.