3 %bcond_without geoip # without GeoIP support
4 %bcond_without gnutls # build with tls=gnutls
5 %bcond_with openssl # build with tls=openssl
7 %if %{with gnutls} || %{with openssl}
10 Summary: Fast, Flexible and Lightweight Web server
11 Summary(pl.UTF-8): Cherokee - serwer WWW
16 Group: Networking/Daemons
17 Source0: http://www.cherokee-project.com/download/0.9/%{version}/%{name}-%{version}.tar.gz
18 # Source0-md5: 33a43d67baa93029c5fc60ef9f2520bd
20 Source2: %{name}.sysconfig
21 Patch0: %{name}-config.patch
22 Patch1: %{name}-php-path.patch
23 URL: http://www.cherokee-project.com/
24 %{?with_geoip:BuildRequires: GeoIP-devel}
25 BuildRequires: autoconf
26 BuildRequires: automake
27 %{?with_gnutls:BuildRequires: gnutls-devel >= 0.9.99}
28 BuildRequires: libtool
29 BuildRequires: mysql-devel
30 BuildRequires: openldap-devel
31 %{?with_openssl:BuildRequires: openssl-devel}
32 BuildRequires: pam-devel
33 BuildRequires: pcre-devel
34 BuildRequires: pkgconfig
35 BuildRequires: python-docutils
36 BuildRequires: rpm-pythonprov
37 BuildRequires: rpmbuild(macros) >= 1.268
38 BuildRequires: zlib-devel
39 Requires(post,postun): /sbin/ldconfig
40 Requires(post,preun): rc-scripts
41 Requires(postun): /usr/sbin/groupdel
42 Requires(postun): /usr/sbin/userdel
43 Requires(pre): /bin/id
44 Requires(pre): /usr/bin/getgid
45 Requires(pre): /usr/sbin/groupadd
46 Requires(pre): /usr/sbin/useradd
48 Provides: group(cherokee)
50 Provides: user(cherokee)
52 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
54 %define _sysconfdir /etc/cherokee
55 %define _wwwhome /home/services/%{name}
56 %define _wwwroot %{_wwwhome}/html
59 Cherokee is a flexible, very fast, lightweight Web server. It is
60 implemented entirely in C, and has no dependencies beyond a standard C
61 library. It is embeddable and extensible with plug-ins. It supports
62 on-the-fly configuration by reading files or strings, TLS/SSL (via
63 GNUTLS or OpenSSL), virtual hosts, authentication, cache friendly
64 features, PHP, custom error management, and much more.
66 %description -l pl.UTF-8
67 Cherokee to elastyczny, bardzo szybki i lekki serwer WWW. Jest
68 zaimplementowany całkowicie w C i nie ma zależności poza standardową
69 biblioteką C. Jest osadzalny i rozbudowywalny poprzez wtyczki.
70 Obsługuje konfigurację w locie poprzez odczyt plików lub łańcuchów
71 znaków, TLS/SSL (poprzez GNUTLS lub OpenSSL), hosty wirtualne,
72 uwierzytelnianie, opcje związane z pamięcią podręczną, PHP, własne
73 zarządzanie błędami i wiele więcej.
76 Summary: Header files for Cherokee web server
77 Summary(pl.UTF-8): Pliki nagłówkowe dla serwera WWW Cherokee
78 Group: Development/Libraries
79 Requires: %{name} = %{version}-%{release}
82 Header files for Cherokee web server.
84 %description devel -l pl.UTF-8
85 Pliki nagłówkowe dla serwera WWW Cherokee.
100 --enable-os-string="PLD Linux" \
101 %{?with_tls:--enable-tls=%{?with_gnutls:gnutls}%{?with_openssl:openssl}} \
103 --with-wwwroot=%{_wwwroot} \
104 %{!?with_geoip:--without-geoip} \
105 PHPCGI=%{_bindir}/php.fcgi
110 rm -rf $RPM_BUILD_ROOT
111 install -d $RPM_BUILD_ROOT{/etc/{pam.d,sysconfig,rc.d/init.d},/var/log/%{name}}
114 DESTDIR=$RPM_BUILD_ROOT
116 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
117 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
119 # users don't need this
120 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/cherokee-panic
122 # modules dlopened by *.so
123 rm -f $RPM_BUILD_ROOT%{_libdir}/cherokee/lib*.la
127 mv $RPM_BUILD_ROOT%{_docdir}/%{name} html
130 rm -rf $RPM_BUILD_ROOT
133 %groupadd -g 161 cherokee
135 %useradd -u 161 -d %{_wwwhome} -c "Cherokee User" -g cherokee cherokee
136 %addusertogroup cherokee http
140 /sbin/chkconfig --add %{name}
141 %service %{name} restart "Cherokee webserver"
145 if [ "$1" = "0" ]; then
146 %service %{name} stop
147 /sbin/chkconfig --del %{name}
152 if [ "$1" = "0" ]; then
154 %groupremove cherokee
159 %defattr(644,root,root,755)
160 %doc AUTHORS ChangeLog TODO html contrib/*to*.py
161 %dir %attr(750,root,root) %{_sysconfdir}
162 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cherokee.conf
163 %dir %attr(750,root,root) %{_sysconfdir}/ssl
165 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/cherokee
166 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cherokee
167 %attr(754,root,root) /etc/rc.d/init.d/cherokee
169 %attr(755,root,root) %{_bindir}/cget
170 %attr(755,root,root) %{_bindir}/cherokee-tweak
171 %attr(755,root,root) %{_bindir}/spawn-fcgi
172 %attr(755,root,root) %{_sbindir}/cherokee
173 %attr(755,root,root) %{_sbindir}/cherokee-admin
174 %attr(755,root,root) %{_sbindir}/cherokee-panic
175 %attr(755,root,root) %{_sbindir}/cherokee-worker
177 %dir %{_libdir}/cherokee
178 %attr(755,root,root) %{_libdir}/cherokee/libplugin_admin.so
179 %attr(755,root,root) %{_libdir}/cherokee/libplugin_and.so
180 %attr(755,root,root) %{_libdir}/cherokee/libplugin_cgi.so
181 %attr(755,root,root) %{_libdir}/cherokee/libplugin_combined.so
182 %attr(755,root,root) %{_libdir}/cherokee/libplugin_common.so
183 %attr(755,root,root) %{_libdir}/cherokee/libplugin_custom_error.so
184 %attr(755,root,root) %{_libdir}/cherokee/libplugin_dbslayer.so
185 %attr(755,root,root) %{_libdir}/cherokee/libplugin_deflate.so
186 %attr(755,root,root) %{_libdir}/cherokee/libplugin_directory.so
187 %attr(755,root,root) %{_libdir}/cherokee/libplugin_dirlist.so
188 %attr(755,root,root) %{_libdir}/cherokee/libplugin_error_nn.so
189 %attr(755,root,root) %{_libdir}/cherokee/libplugin_error_redir.so
190 %attr(755,root,root) %{_libdir}/cherokee/libplugin_extensions.so
191 %attr(755,root,root) %{_libdir}/cherokee/libplugin_fastcgi.so
192 %attr(755,root,root) %{_libdir}/cherokee/libplugin_fcgi.so
193 %attr(755,root,root) %{_libdir}/cherokee/libplugin_file.so
194 %{?with_geoip:%attr(755,root,root) %{_libdir}/cherokee/libplugin_geoip.so}
195 %attr(755,root,root) %{_libdir}/cherokee/libplugin_gzip.so
196 %attr(755,root,root) %{_libdir}/cherokee/libplugin_header.so
197 %attr(755,root,root) %{_libdir}/cherokee/libplugin_htdigest.so
198 %attr(755,root,root) %{_libdir}/cherokee/libplugin_htpasswd.so
199 %attr(755,root,root) %{_libdir}/cherokee/libplugin_ldap.so
200 %attr(755,root,root) %{_libdir}/cherokee/libplugin_mirror.so
201 %attr(755,root,root) %{_libdir}/cherokee/libplugin_mysql.so
202 %attr(755,root,root) %{_libdir}/cherokee/libplugin_ncsa.so
203 %attr(755,root,root) %{_libdir}/cherokee/libplugin_not.so
204 %attr(755,root,root) %{_libdir}/cherokee/libplugin_or.so
205 %attr(755,root,root) %{_libdir}/cherokee/libplugin_pam.so
206 %attr(755,root,root) %{_libdir}/cherokee/libplugin_phpcgi.so
207 %attr(755,root,root) %{_libdir}/cherokee/libplugin_plain.so
208 %attr(755,root,root) %{_libdir}/cherokee/libplugin_proxy.so
209 %attr(755,root,root) %{_libdir}/cherokee/libplugin_redir.so
210 %attr(755,root,root) %{_libdir}/cherokee/libplugin_request.so
211 %attr(755,root,root) %{_libdir}/cherokee/libplugin_round_robin.so
212 %attr(755,root,root) %{_libdir}/cherokee/libplugin_scgi.so
213 %attr(755,root,root) %{_libdir}/cherokee/libplugin_server_info.so
214 %attr(755,root,root) %{_libdir}/cherokee/libplugin_w3c.so
215 %attr(755,root,root) %{_libdir}/libcherokee-base.so.*.*.*
216 %attr(755,root,root) %ghost %{_libdir}/libcherokee-base.so.0
217 %attr(755,root,root) %{_libdir}/libcherokee-client.so.*.*.*
218 %attr(755,root,root) %ghost %{_libdir}/libcherokee-client.so.0
219 %attr(755,root,root) %{_libdir}/libcherokee-config.so.*.*.*
220 %attr(755,root,root) %ghost %{_libdir}/libcherokee-config.so.0
221 %attr(755,root,root) %{_libdir}/libcherokee-server.so.*.*.*
222 %attr(755,root,root) %ghost %{_libdir}/libcherokee-server.so.0
224 %{_mandir}/man1/cget.1*
225 %{_mandir}/man1/cherokee.1*
226 %{_mandir}/man1/cherokee-admin.1*
227 %{_mandir}/man1/cherokee-tweak.1*
228 %{_mandir}/man1/cherokee-worker.1*
229 # Conflicts: lighttpd
230 #%%{_mandir}/man1/spawn-fcgi.1*
232 %dir %{_datadir}/cherokee
233 %dir %{_datadir}/cherokee/admin
234 %{_datadir}/cherokee/admin/cherokee.conf.sample
235 %{_datadir}/cherokee/admin/*.html
236 %attr(755,root,root) %{_datadir}/cherokee/admin/*.py
237 %{_datadir}/cherokee/admin/static
238 %{_datadir}/cherokee/deps
239 %{_datadir}/cherokee/icons
240 %{_datadir}/cherokee/mime_types.txt
241 %{_datadir}/cherokee/themes
245 %config(missingok) %{_wwwroot}/*
247 %dir %attr(750,cherokee,logs) /var/log/%{name}
250 %defattr(644,root,root,755)
251 %attr(755,root,root) %{_bindir}/cherokee-config
253 %{_libdir}/libcherokee-base.la
254 %attr(755,root,root) %{_libdir}/libcherokee-base.so
255 %{_libdir}/libcherokee-client.la
256 %attr(755,root,root) %{_libdir}/libcherokee-client.so
257 %{_libdir}/libcherokee-config.la
258 %attr(755,root,root) %{_libdir}/libcherokee-config.so
259 %{_libdir}/libcherokee-server.la
260 %attr(755,root,root) %{_libdir}/libcherokee-server.so
262 %{_includedir}/cherokee
263 %{_pkgconfigdir}/cherokee.pc
264 %{_aclocaldir}/cherokee.m4
265 %{_mandir}/man1/cherokee-config.1*