3 # - think about moving modules to subpackages. At least, those with extra
5 # - maybe there is no need to pack *.py (are *.pyc enough?)
8 %bcond_without geoip # without GeoIP support
9 %bcond_without mysql # without MySQL support
10 %bcond_without ldap # without LDAP support
11 %bcond_without ffmpeg # without ffmpeg support
13 Summary: Fast, Flexible and Lightweight Web server
14 Summary(pl.UTF-8): Cherokee - serwer WWW
19 Group: Networking/Daemons
20 Source0: https://github.com/cherokee/webserver/archive/v%{version}.zip
21 # Source0-md5: 9e6d8e0dd95808d365d32ecb0a9b80fe
22 # the last snapshot from https://github.com/cherokee/CTK
23 Source1: CTK-20120806.tar.xz
24 # Source1-md5: 567f087cd6cdf10b89047535cbe94f8e
26 Source3: %{name}.sysconfig
27 Source4: %{name}.service
28 Patch0: %{name}-config.patch
29 Patch1: %{name}-panic_path.patch
30 Patch2: ffmpeg0.11.patch
31 URL: http://www.cherokee-project.com/
32 %{?with_geoip:BuildRequires: GeoIP-devel}
33 BuildRequires: autoconf
34 BuildRequires: automake
35 %{?with_ffmpeg:BuildRequires: ffmpeg-devel >= 1.0}
36 BuildRequires: gettext-tools
37 BuildRequires: libtool
38 %{?with_mysql:BuildRequires: mysql-devel}
39 %{?with_ldap:BuildRequires: openldap-devel}
40 BuildRequires: openssl-devel
41 BuildRequires: pam-devel
42 BuildRequires: pcre-devel
43 BuildRequires: php(fcgi)
44 BuildRequires: pkgconfig
45 BuildRequires: python-docutils
46 BuildRequires: rpm-pythonprov
47 BuildRequires: rpmbuild(macros) >= 1.647
48 BuildRequires: zlib-devel
49 Requires(post,preun): /sbin/chkconfig
50 Requires(postun): /usr/sbin/groupdel
51 Requires(postun): /usr/sbin/userdel
52 Requires(pre): /bin/id
53 Requires(pre): /usr/bin/getgid
54 Requires(pre): /usr/sbin/groupadd
55 Requires(pre): /usr/sbin/useradd
56 Requires: %{name}-libs = %{version}-%{release}
57 Requires: rc-scripts >= 0.4.3.0
58 Requires: systemd-units >= 38
59 Suggests: %{name}-admin = %{version}-%{release}
61 Provides: group(cherokee)
63 Provides: user(cherokee)
65 Provides: webserver(indexfile)
66 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
68 %define _sysconfdir /etc/cherokee
69 %define _wwwhome /home/services/%{name}
70 %define _wwwroot %{_wwwhome}/html
73 Cherokee is a flexible, very fast, lightweight Web server. It is
74 implemented entirely in C, and has no dependencies beyond a standard C
75 library. It is embeddable and extensible with plug-ins. It supports
76 on-the-fly configuration by reading files or strings, TLS/SSL via
77 OpenSSL, virtual hosts, authentication, cache friendly features, PHP,
78 custom error management, and much more.
80 %description -l pl.UTF-8
81 Cherokee to elastyczny, bardzo szybki i lekki serwer WWW. Jest
82 zaimplementowany całkowicie w C i nie ma zależności poza standardową
83 biblioteką C. Jest osadzalny i rozbudowywalny poprzez wtyczki.
84 Obsługuje konfigurację w locie poprzez odczyt plików lub łańcuchów
85 znaków, TLS/SSL poprzez OpenSSL, hosty wirtualne, uwierzytelnianie,
86 opcje związane z pamięcią podręczną, PHP, własne zarządzanie błędami i
90 Summary: Cherokee web server administration interface
91 Summary(pl.UTF-8): Interfejs administracyjny serwera WWW Cherokee
92 Group: Networking/Daemons
93 Requires: %{name} = %{version}-%{release}
95 Requires: python-modules
98 Cherokee web server administration interface.
100 %description admin -l pl.UTF-8
101 Interfejs administracyjny serwera WWW Cherokee.
104 Summary: Header files for Cherokee web server
105 Summary(pl.UTF-8): Pliki nagłówkowe dla serwera WWW Cherokee
106 Group: Development/Libraries
107 Requires: %{name}-libs = %{version}-%{release}
110 Header files for Cherokee web server.
112 %description devel -l pl.UTF-8
113 Pliki nagłówkowe dla serwera WWW Cherokee.
116 Summary: Cherokee web server libraries
117 Summary(pl.UTF-8): Biblioteki serwera WWW Cherokee
121 Cherokee web server libraries.
123 %description libs -l pl.UTF-8
124 Biblioteki serwera WWW Cherokee.
127 %setup -qn webserver-%{version} -a1
138 po/admin/generate_POTFILESin.py > po/admin/POTFILES.in
140 --with-php=/usr/bin/php.cgi \
142 --enable-os-string="PLD Linux" \
144 --with-wwwroot=%{_wwwroot} \
145 --with-wwwuser=cherokee \
146 --with-wwwgroup=http \
147 %{!?with_geoip:--without-geoip} \
148 %{!?with_mysql:--without-mysql} \
149 %{!?with_ffmpeg:--without-ffmpeg} \
150 %{!?with_ldap:--without-ldap}
152 # workaround for missing pot file and no way to build it
153 touch po/admin/cherokee.pot
159 rm -rf $RPM_BUILD_ROOT
160 install -d $RPM_BUILD_ROOT/etc/{pam.d,sysconfig,rc.d/init.d} \
161 $RPM_BUILD_ROOT/var/log/%{name} \
162 $RPM_BUILD_ROOT%{systemdunitdir}
164 %{__make} -j1 install \
165 DESTDIR=$RPM_BUILD_ROOT
167 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
168 install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
169 install %{SOURCE4} $RPM_BUILD_ROOT%{systemdunitdir}/cherokee.service
171 # users don't need this
172 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/cherokee-panic
174 # modules dlopened by *.so
175 rm -f $RPM_BUILD_ROOT%{_libdir}/cherokee/lib*.la
179 mv $RPM_BUILD_ROOT%{_docdir}/%{name} html
182 rm $RPM_BUILD_ROOT/etc/cherokee/cherokee.conf.perf_sample
184 # compile python modules, otherwise *.pyc may get generated on runtime
185 # and stay after package removal
186 %py_comp $RPM_BUILD_ROOT%{_datadir}/cherokee/admin/
188 # seems like this is not needed on Linux
189 rm $RPM_BUILD_ROOT%{_bindir}/cherokee-macos-askpass
191 mv $RPM_BUILD_ROOT%{_localedir}/{sv_SE,sv}
192 mv $RPM_BUILD_ROOT%{_localedir}/{jp,ja}
197 rm -rf $RPM_BUILD_ROOT
200 %groupadd -g 161 cherokee
202 %useradd -u 161 -d %{_wwwhome} -c "Cherokee User" -g cherokee cherokee
203 %addusertogroup cherokee http
206 if [ "$1" = "2" -a -e %{_sysconfdir}/cherokee.conf ]; then
207 %{_datadir}/%{name}/admin/upgrade_config.py %{_sysconfdir}/cherokee.conf
209 /sbin/chkconfig --add %{name}
210 %service %{name} restart "Cherokee webserver"
211 %systemd_post %{name}.service
214 if [ "$1" = "0" ]; then
215 %service %{name} stop
216 /sbin/chkconfig --del %{name}
218 %systemd_preun %{name}.service
221 if [ "$1" = "0" ]; then
223 %groupremove cherokee
228 %triggerpostun -- %{name} < 1.2.103-1
229 %systemd_trigger %{name}.service
231 %post libs -p /sbin/ldconfig
232 %postun libs -p /sbin/ldconfig
235 %defattr(644,root,root,755)
236 %doc AUTHORS html performance.conf.sample
237 %dir %attr(750,root,root) %{_sysconfdir}
238 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cherokee.conf
240 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/cherokee
241 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cherokee
242 %attr(754,root,root) /etc/rc.d/init.d/cherokee
243 %{systemdunitdir}/%{name}.service
245 %attr(755,root,root) %{_bindir}/CTK-run
246 %attr(755,root,root) %{_bindir}/cget
247 %attr(755,root,root) %{_bindir}/cherokee-tweak
248 %attr(755,root,root) %{_sbindir}/cherokee
249 %attr(755,root,root) %{_sbindir}/cherokee-panic
250 %attr(755,root,root) %{_sbindir}/cherokee-worker
252 %dir %{_libdir}/cherokee
253 %attr(755,root,root) %{_libdir}/cherokee/libplugin_admin.so
254 %attr(755,root,root) %{_libdir}/cherokee/libplugin_and.so
255 %attr(755,root,root) %{_libdir}/cherokee/libplugin_authlist.so
256 %attr(755,root,root) %{_libdir}/cherokee/libplugin_bind.so
257 %attr(755,root,root) %{_libdir}/cherokee/libplugin_cgi.so
258 %attr(755,root,root) %{_libdir}/cherokee/libplugin_combined.so
259 %attr(755,root,root) %{_libdir}/cherokee/libplugin_common.so
260 %attr(755,root,root) %{_libdir}/cherokee/libplugin_custom_error.so
261 %attr(755,root,root) %{_libdir}/cherokee/libplugin_custom.so
262 %{?with_mysql:%attr(755,root,root) %{_libdir}/cherokee/libplugin_dbslayer.so}
263 %attr(755,root,root) %{_libdir}/cherokee/libplugin_deflate.so
264 %attr(755,root,root) %{_libdir}/cherokee/libplugin_directory.so
265 %attr(755,root,root) %{_libdir}/cherokee/libplugin_dirlist.so
266 %attr(755,root,root) %{_libdir}/cherokee/libplugin_drop.so
267 %attr(755,root,root) %{_libdir}/cherokee/libplugin_empty_gif.so
268 %attr(755,root,root) %{_libdir}/cherokee/libplugin_error_nn.so
269 %attr(755,root,root) %{_libdir}/cherokee/libplugin_error_redir.so
270 %attr(755,root,root) %{_libdir}/cherokee/libplugin_evhost.so
271 %attr(755,root,root) %{_libdir}/cherokee/libplugin_exists.so
272 %attr(755,root,root) %{_libdir}/cherokee/libplugin_extensions.so
273 %attr(755,root,root) %{_libdir}/cherokee/libplugin_failover.so
274 %attr(755,root,root) %{_libdir}/cherokee/libplugin_fcgi.so
275 %attr(755,root,root) %{_libdir}/cherokee/libplugin_file.so
276 %attr(755,root,root) %{_libdir}/cherokee/libplugin_from.so
277 %attr(755,root,root) %{_libdir}/cherokee/libplugin_fullpath.so
278 %{?with_geoip:%attr(755,root,root) %{_libdir}/cherokee/libplugin_geoip.so}
279 %attr(755,root,root) %{_libdir}/cherokee/libplugin_gzip.so
280 %attr(755,root,root) %{_libdir}/cherokee/libplugin_header.so
281 %attr(755,root,root) %{_libdir}/cherokee/libplugin_htdigest.so
282 %attr(755,root,root) %{_libdir}/cherokee/libplugin_htpasswd.so
283 %attr(755,root,root) %{_libdir}/cherokee/libplugin_ip_hash.so
284 %{?with_ldap:%attr(755,root,root) %{_libdir}/cherokee/libplugin_ldap.so}
285 %attr(755,root,root) %{_libdir}/cherokee/libplugin_libssl.so
286 %attr(755,root,root) %{_libdir}/cherokee/libplugin_method.so
287 %{?with_mysql:%attr(755,root,root) %{_libdir}/cherokee/libplugin_mysql.so}
288 %attr(755,root,root) %{_libdir}/cherokee/libplugin_ncsa.so
289 %attr(755,root,root) %{_libdir}/cherokee/libplugin_not.so
290 %attr(755,root,root) %{_libdir}/cherokee/libplugin_or.so
291 %attr(755,root,root) %{_libdir}/cherokee/libplugin_pam.so
292 %attr(755,root,root) %{_libdir}/cherokee/libplugin_plain.so
293 %attr(755,root,root) %{_libdir}/cherokee/libplugin_post_report.so
294 %attr(755,root,root) %{_libdir}/cherokee/libplugin_post_track.so
295 %attr(755,root,root) %{_libdir}/cherokee/libplugin_proxy.so
296 %attr(755,root,root) %{_libdir}/cherokee/libplugin_redir.so
297 %attr(755,root,root) %{_libdir}/cherokee/libplugin_rehost.so
298 %attr(755,root,root) %{_libdir}/cherokee/libplugin_render_rrd.so
299 %attr(755,root,root) %{_libdir}/cherokee/libplugin_request.so
300 %attr(755,root,root) %{_libdir}/cherokee/libplugin_round_robin.so
301 %attr(755,root,root) %{_libdir}/cherokee/libplugin_rrd.so
302 %attr(755,root,root) %{_libdir}/cherokee/libplugin_scgi.so
303 %attr(755,root,root) %{_libdir}/cherokee/libplugin_secdownload.so
304 %attr(755,root,root) %{_libdir}/cherokee/libplugin_server_info.so
305 %attr(755,root,root) %{_libdir}/cherokee/libplugin_ssi.so
307 %attr(755,root,root) %{_libdir}/cherokee/libplugin_streaming.so
309 %attr(755,root,root) %{_libdir}/cherokee/libplugin_target_ip.so
310 %attr(755,root,root) %{_libdir}/cherokee/libplugin_tls.so
311 %attr(755,root,root) %{_libdir}/cherokee/libplugin_url_arg.so
312 %attr(755,root,root) %{_libdir}/cherokee/libplugin_uwsgi.so
313 %attr(755,root,root) %{_libdir}/cherokee/libplugin_v_or.so
314 %attr(755,root,root) %{_libdir}/cherokee/libplugin_wildcard.so
316 %{_mandir}/man1/cget.1*
317 %{_mandir}/man1/cherokee.1*
318 %{_mandir}/man1/cherokee-tweak.1*
319 %{_mandir}/man1/cherokee-worker.1*
321 %dir %{_datadir}/cherokee
322 %{_datadir}/cherokee/deps
323 %{_datadir}/cherokee/icons
324 %{_datadir}/cherokee/themes
328 %config(missingok) %{_wwwroot}/*
330 %dir %attr(750,cherokee,logs) /var/log/%{name}
332 %dir %attr(771,root,cherokee) /var/lib/%{name}
333 %dir %attr(771,cherokee,cherokee) /var/lib/%{name}/graphs
334 %dir %attr(771,cherokee,cherokee) /var/lib/%{name}/graphs/images
336 %files admin -f %{name}.lang
337 %defattr(644,root,root,755)
338 %attr(755,root,root) %{_sbindir}/cherokee-admin
339 %attr(755,root,root) %{_bindir}/cherokee-admin-launcher
340 %{_mandir}/man1/cherokee-admin.1*
341 %{_mandir}/man1/cherokee-admin-launcher.1*
342 %dir %{_datadir}/cherokee/admin
343 %{_datadir}/cherokee/admin/cherokee.conf.sample
344 %{_datadir}/cherokee/admin/performance.conf.sample
345 %{_datadir}/cherokee/admin/*.html
346 %attr(755,root,root) %{_datadir}/cherokee/admin/*.py
347 %{_datadir}/cherokee/admin/*.pyc
348 %{_datadir}/cherokee/admin/static
349 %dir %{_datadir}/cherokee/admin/CTK
350 %dir %{_datadir}/cherokee/admin/CTK/CTK
351 %{_datadir}/cherokee/admin/CTK/CTK/*.py
352 %{_datadir}/cherokee/admin/CTK/CTK/*.pyc
353 %{_datadir}/cherokee/admin/CTK/static
354 %dir %{_datadir}/cherokee/admin/plugins
355 %{_datadir}/cherokee/admin/plugins/*.py
356 %{_datadir}/cherokee/admin/plugins/*.pyc
357 %dir %{_datadir}/cherokee/admin/wizards
358 %{_datadir}/cherokee/admin/wizards/*.py
359 %{_datadir}/cherokee/admin/wizards/*.pyc
360 #%dir %{_datadir}/cherokee/admin/market
361 #%{_datadir}/cherokee/admin/market/*.py
362 #%{_datadir}/cherokee/admin/market/*.pyc
363 %dir %{_datadir}/cherokee/admin/icons
364 %{_datadir}/cherokee/admin/icons/*.png
365 %{_datadir}/cherokee/admin/icons/*.svg
368 %defattr(644,root,root,755)
369 %attr(755,root,root) %{_libdir}/libcherokee-base.so.*.*.*
370 %attr(755,root,root) %ghost %{_libdir}/libcherokee-base.so.0
371 %attr(755,root,root) %{_libdir}/libcherokee-client.so.*.*.*
372 %attr(755,root,root) %ghost %{_libdir}/libcherokee-client.so.0
373 %attr(755,root,root) %{_libdir}/libcherokee-server.so.*.*.*
374 %attr(755,root,root) %ghost %{_libdir}/libcherokee-server.so.0
377 %defattr(644,root,root,755)
378 %attr(755,root,root) %{_bindir}/cherokee-config
379 %attr(755,root,root) %{_libdir}/libcherokee-base.so
380 %attr(755,root,root) %{_libdir}/libcherokee-client.so
381 %attr(755,root,root) %{_libdir}/libcherokee-server.so
382 %{_libdir}/libcherokee-base.la
383 %{_libdir}/libcherokee-client.la
384 %{_libdir}/libcherokee-server.la
385 %{_includedir}/cherokee
386 %{_pkgconfigdir}/cherokee.pc
387 %{_aclocaldir}/cherokee.m4
388 %{_mandir}/man1/cherokee-config.1*