]> git.pld-linux.org Git - packages/cherokee.git/blame - cherokee.spec
- Release: 2
[packages/cherokee.git] / cherokee.spec
CommitLineData
0f615d6e 1#
abf5f06b 2# TODO:
0f615d6e
JK
3# - think about moving modules to subpackages. At least, those with extra
4# dependencies.
d469ca68 5# - maybe there is no need to pack *.py (are *.pyc enough?)
01abcdff
JB
6#
7# Conditional build:
3319fba3 8%bcond_without geoip # without GeoIP support
56ea9d0b
JK
9%bcond_without mysql # without MySQL support
10%bcond_without ldap # without LDAP support
11%bcond_without ffmpeg # without ffmpeg support
01d41beb 12#
01d41beb 13Summary: Fast, Flexible and Lightweight Web server
56ec7482 14Summary(pl.UTF-8): Cherokee - serwer WWW
0e85b34f 15Name: cherokee
130cf5b2 16Version: 1.0.5
2ff65984 17Release: 2
01d41beb 18License: GPL v2
8c503f01 19Group: Networking/Daemons
37b1fd2c 20Source0: http://www.cherokee-project.com/download/1.0/%{version}/%{name}-%{version}.tar.gz
130cf5b2 21# Source0-md5: 28261c77f0181994e7c372aed37f5ea3
01d41beb
ER
22Source1: %{name}.init
23Source2: %{name}.sysconfig
ac2feb08 24Source3: %{name}.upstart
1bdedc57
ER
25Patch0: %{name}-config.patch
26Patch1: %{name}-php-path.patch
3b5f252d 27Patch2: %{name}-panic_path.patch
72ce7982 28URL: http://www.cherokee-project.com/
90a7df58 29%{?with_geoip:BuildRequires: GeoIP-devel}
1bdedc57
ER
30BuildRequires: autoconf
31BuildRequires: automake
56ea9d0b 32%{?with_ffmpeg:BuildRequires: ffmpeg-devel}
ca7698e4 33BuildRequires: gettext-devel
3319fba3 34BuildRequires: libtool
56ea9d0b
JK
35%{?with_mysql:BuildRequires: mysql-devel}
36%{?with_ldap:BuildRequires: openldap-devel}
abf5f06b 37BuildRequires: openssl-devel
cfbc51f9 38BuildRequires: pam-devel
01d41beb 39BuildRequires: pcre-devel
68df699b 40BuildRequires: php(fcgi)
cfbc51f9 41BuildRequires: pkgconfig
8c2165c6 42BuildRequires: python-docutils
3319fba3 43BuildRequires: rpm-pythonprov
ac2feb08 44BuildRequires: rpmbuild(macros) >= 1.561
cfbc51f9 45BuildRequires: zlib-devel
ac2feb08 46Requires(post,preun): rc-scripts >= 0.4.3.2
1bdedc57
ER
47Requires(postun): /usr/sbin/groupdel
48Requires(postun): /usr/sbin/userdel
49Requires(pre): /bin/id
50Requires(pre): /usr/bin/getgid
51Requires(pre): /usr/sbin/groupadd
52Requires(pre): /usr/sbin/useradd
d8be9859 53Requires: %{name}-libs = %{version}-%{release}
e8c0b4db 54Suggests: %{name}-admin = %{version}-%{release}
68df699b 55Suggests: php(fcgi)
1bdedc57
ER
56Provides: group(cherokee)
57Provides: group(http)
58Provides: user(cherokee)
bdfcbc7b 59Provides: webserver
8c503f01 60BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
0e85b34f 61
01d41beb
ER
62%define _sysconfdir /etc/cherokee
63%define _wwwhome /home/services/%{name}
64%define _wwwroot %{_wwwhome}/html
65
0e85b34f 66%description
01d41beb
ER
67Cherokee is a flexible, very fast, lightweight Web server. It is
68implemented entirely in C, and has no dependencies beyond a standard C
a40f27e9 69library. It is embeddable and extensible with plug-ins. It supports
abf5f06b 70on-the-fly configuration by reading files or strings, TLS/SSL via
71OpenSSL, virtual hosts, authentication, cache friendly features, PHP,
72custom error management, and much more.
0e85b34f 73
fd499fdf 74%description -l pl.UTF-8
a40f27e9 75Cherokee to elastyczny, bardzo szybki i lekki serwer WWW. Jest
fd499fdf
JR
76zaimplementowany całkowicie w C i nie ma zależności poza standardową
77biblioteką C. Jest osadzalny i rozbudowywalny poprzez wtyczki.
78Obsługuje konfigurację w locie poprzez odczyt plików lub łańcuchów
abf5f06b 79znaków, TLS/SSL poprzez OpenSSL, hosty wirtualne, uwierzytelnianie,
80opcje związane z pamięcią podręczną, PHP, własne zarządzanie błędami i
81wiele więcej.
8c503f01 82
ac2feb08
JK
83%package upstart
84Summary: Upstart job description for the Cherokee web server
85Summary(pl.UTF-8): Opis zadania Upstart dla serwera Cherokee
86Group: Daemons
87Requires: %{name} = %{version}-%{release}
88Requires: upstart >= 0.6
89
90%description upstart
91Upstart job description for the Cherokee web server.
92
93%description upstart -l pl.UTF-8
94Opis zadania Upstart dla serwera WWW Cherokee.
95
e8c0b4db
JK
96%package admin
97Summary: Cherokee web server administration interface
98Summary(pl.UTF-8): Interfejs administracyjny serwera WWW Cherokee
99Group: Networking/Daemons
ca7698e4 100Requires: %{name} = %{version}-%{release}
e8c0b4db
JK
101Requires: python
102Requires: python-modules
d8be9859 103
e8c0b4db
JK
104%description admin
105Cherokee web server administration interface.
d8be9859 106
e8c0b4db
JK
107%description admin -l pl.UTF-8
108Interfejs administracyjny serwera WWW Cherokee.
d8be9859 109
0e85b34f 110%package devel
8c503f01 111Summary: Header files for Cherokee web server
56ec7482 112Summary(pl.UTF-8): Pliki nagłówkowe dla serwera WWW Cherokee
8c503f01 113Group: Development/Libraries
d8be9859 114Requires: %{name}-libs = %{version}-%{release}
0e85b34f 115
116%description devel
8c503f01
JB
117Header files for Cherokee web server.
118
fd499fdf
JR
119%description devel -l pl.UTF-8
120Pliki nagłówkowe dla serwera WWW Cherokee.
0e85b34f 121
e8c0b4db
JK
122%package libs
123Summary: Cherokee web server libraries
124Summary(pl.UTF-8): Biblioteki serwera WWW Cherokee
125Group: Libraries
126
127%description libs
128Cherokee web server libraries.
129
130%description libs -l pl.UTF-8
131Biblioteki serwera WWW Cherokee.
132
0e85b34f 133%prep
134%setup -q
1bdedc57
ER
135%patch0 -p1
136%patch1 -p1
3b5f252d 137%patch2 -p1
0e85b34f 138
139%build
3319fba3 140%{__libtoolize}
1bdedc57
ER
141%{__aclocal} -I m4
142%{__autoconf}
143%{__autoheader}
144%{__automake}
abf5f06b 145export PHPCGI=%{_bindir}/php.fcgi
0e85b34f 146%configure \
cfbc51f9 147 --disable-static \
3319fba3 148 --enable-os-string="PLD Linux" \
3319fba3
KK
149 --sysconfdir=/etc \
150 --with-wwwroot=%{_wwwroot} \
abf5f06b 151 --with-wwwuser=cherokee \
152 --with-wwwgroup=http \
56ea9d0b
JK
153 %{!?with_geoip:--without-geoip} \
154 %{!?with_mysql:--without-mysql} \
155 %{!?with_ffmpeg:--without-ffmpeg} \
156 %{!?with_ldap:--without-ldap}
0e85b34f 157%{__make}
158
159%install
160rm -rf $RPM_BUILD_ROOT
ac2feb08 161install -d $RPM_BUILD_ROOT{/etc/{init,pam.d,sysconfig,rc.d/init.d},/var/log/%{name}}
8c503f01 162
223f9f35 163%{__make} -j1 install \
8c503f01
JB
164 DESTDIR=$RPM_BUILD_ROOT
165
01d41beb
ER
166install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
167install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
ac2feb08 168install %{SOURCE3} $RPM_BUILD_ROOT/etc/init/%{name}.conf
01d41beb 169
1bdedc57
ER
170# users don't need this
171mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/cherokee-panic
1bdedc57 172
cfbc51f9
JB
173# modules dlopened by *.so
174rm -f $RPM_BUILD_ROOT%{_libdir}/cherokee/lib*.la
175
01d41beb
ER
176# unify manual dir
177rm -rf html
178mv $RPM_BUILD_ROOT%{_docdir}/%{name} html
179
3b7d94a5
JK
180# provided via %doc
181rm $RPM_BUILD_ROOT/etc/cherokee/cherokee.conf.perf_sample
182
d469ca68
JK
183# compile python modules, otherwise *.pyc may get generated on runtime
184# and stay after package removal
185%py_comp $RPM_BUILD_ROOT%{_datadir}/cherokee/admin/
186
0bb5c2e0 187mv $RPM_BUILD_ROOT%{_localedir}/{sv_SE,sv}
3b7d94a5
JK
188%find_lang %{name}
189
d469ca68 190
8c503f01
JB
191%clean
192rm -rf $RPM_BUILD_ROOT
0e85b34f 193
1bdedc57
ER
194%pre
195%groupadd -g 161 cherokee
196%groupadd -g 51 http
197%useradd -u 161 -d %{_wwwhome} -c "Cherokee User" -g cherokee cherokee
198%addusertogroup cherokee http
199
01d41beb 200%post
01d41beb 201/sbin/chkconfig --add %{name}
c61a601c
ER
202%service %{name} restart "Cherokee webserver"
203exit 0
01d41beb
ER
204
205%preun
206if [ "$1" = "0" ]; then
207 %service %{name} stop
208 /sbin/chkconfig --del %{name}
209fi
210
1bdedc57 211%postun
1bdedc57 212if [ "$1" = "0" ]; then
c61a601c
ER
213 %userremove cherokee
214 %groupremove cherokee
1bdedc57
ER
215 %groupremove http
216fi
cfbc51f9 217
ac2feb08
JK
218%post upstart
219%upstart_post %{name}
220
221%postun upstart
222%upstart_postun %{name}
223
d8be9859
JB
224%post libs -p /sbin/ldconfig
225%postun libs -p /sbin/ldconfig
226
e8c0b4db 227%files
0e85b34f 228%defattr(644,root,root,755)
3b7d94a5 229%doc AUTHORS ChangeLog html contrib/*to*.py performance.conf.sample
0adbe1dc
ER
230%dir %attr(750,root,root) %{_sysconfdir}
231%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cherokee.conf
01d41beb 232
2911a3cb 233%config(noreplace) %verify(not md5 mtime size) /etc/pam.d/cherokee
01d41beb
ER
234%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cherokee
235%attr(754,root,root) /etc/rc.d/init.d/cherokee
236
237%attr(755,root,root) %{_bindir}/cget
72ce7982 238%attr(755,root,root) %{_bindir}/cherokee-tweak
01d41beb 239%attr(755,root,root) %{_sbindir}/cherokee
3319fba3
KK
240%attr(755,root,root) %{_sbindir}/cherokee-panic
241%attr(755,root,root) %{_sbindir}/cherokee-worker
01d41beb 242
0e85b34f 243%dir %{_libdir}/cherokee
1bdedc57 244%attr(755,root,root) %{_libdir}/cherokee/libplugin_admin.so
72ce7982 245%attr(755,root,root) %{_libdir}/cherokee/libplugin_and.so
abf5f06b 246%attr(755,root,root) %{_libdir}/cherokee/libplugin_authlist.so
247%attr(755,root,root) %{_libdir}/cherokee/libplugin_bind.so
01d41beb
ER
248%attr(755,root,root) %{_libdir}/cherokee/libplugin_cgi.so
249%attr(755,root,root) %{_libdir}/cherokee/libplugin_combined.so
250%attr(755,root,root) %{_libdir}/cherokee/libplugin_common.so
3319fba3 251%attr(755,root,root) %{_libdir}/cherokee/libplugin_custom_error.so
abf5f06b 252%attr(755,root,root) %{_libdir}/cherokee/libplugin_custom.so
56ea9d0b 253%{?with_mysql:%attr(755,root,root) %{_libdir}/cherokee/libplugin_dbslayer.so}
3319fba3 254%attr(755,root,root) %{_libdir}/cherokee/libplugin_deflate.so
72ce7982 255%attr(755,root,root) %{_libdir}/cherokee/libplugin_directory.so
01d41beb 256%attr(755,root,root) %{_libdir}/cherokee/libplugin_dirlist.so
abf5f06b 257%attr(755,root,root) %{_libdir}/cherokee/libplugin_empty_gif.so
3319fba3 258%attr(755,root,root) %{_libdir}/cherokee/libplugin_error_nn.so
01d41beb 259%attr(755,root,root) %{_libdir}/cherokee/libplugin_error_redir.so
abf5f06b 260%attr(755,root,root) %{_libdir}/cherokee/libplugin_evhost.so
261%attr(755,root,root) %{_libdir}/cherokee/libplugin_exists.so
72ce7982 262%attr(755,root,root) %{_libdir}/cherokee/libplugin_extensions.so
3b7d94a5 263#%attr(755,root,root) %{_libdir}/cherokee/libplugin_fastcgi.so
8c2165c6 264%attr(755,root,root) %{_libdir}/cherokee/libplugin_fcgi.so
01d41beb 265%attr(755,root,root) %{_libdir}/cherokee/libplugin_file.so
abf5f06b 266%attr(755,root,root) %{_libdir}/cherokee/libplugin_from.so
267%attr(755,root,root) %{_libdir}/cherokee/libplugin_fullpath.so
0a169935 268%{?with_geoip:%attr(755,root,root) %{_libdir}/cherokee/libplugin_geoip.so}
01d41beb 269%attr(755,root,root) %{_libdir}/cherokee/libplugin_gzip.so
72ce7982 270%attr(755,root,root) %{_libdir}/cherokee/libplugin_header.so
01d41beb
ER
271%attr(755,root,root) %{_libdir}/cherokee/libplugin_htdigest.so
272%attr(755,root,root) %{_libdir}/cherokee/libplugin_htpasswd.so
abf5f06b 273%attr(755,root,root) %{_libdir}/cherokee/libplugin_ip_hash.so
56ea9d0b 274%{?with_ldap:%attr(755,root,root) %{_libdir}/cherokee/libplugin_ldap.so}
abf5f06b 275%attr(755,root,root) %{_libdir}/cherokee/libplugin_libssl.so
276%attr(755,root,root) %{_libdir}/cherokee/libplugin_method.so
56ea9d0b 277%{?with_mysql:%attr(755,root,root) %{_libdir}/cherokee/libplugin_mysql.so}
01d41beb 278%attr(755,root,root) %{_libdir}/cherokee/libplugin_ncsa.so
72ce7982
PZ
279%attr(755,root,root) %{_libdir}/cherokee/libplugin_not.so
280%attr(755,root,root) %{_libdir}/cherokee/libplugin_or.so
01d41beb 281%attr(755,root,root) %{_libdir}/cherokee/libplugin_pam.so
01d41beb 282%attr(755,root,root) %{_libdir}/cherokee/libplugin_plain.so
3b7d94a5
JK
283%attr(755,root,root) %{_libdir}/cherokee/libplugin_post_report.so
284%attr(755,root,root) %{_libdir}/cherokee/libplugin_post_track.so
3319fba3 285%attr(755,root,root) %{_libdir}/cherokee/libplugin_proxy.so
01d41beb 286%attr(755,root,root) %{_libdir}/cherokee/libplugin_redir.so
abf5f06b 287%attr(755,root,root) %{_libdir}/cherokee/libplugin_rehost.so
288%attr(755,root,root) %{_libdir}/cherokee/libplugin_render_rrd.so
72ce7982 289%attr(755,root,root) %{_libdir}/cherokee/libplugin_request.so
8c2165c6 290%attr(755,root,root) %{_libdir}/cherokee/libplugin_round_robin.so
abf5f06b 291%attr(755,root,root) %{_libdir}/cherokee/libplugin_rrd.so
8c2165c6 292%attr(755,root,root) %{_libdir}/cherokee/libplugin_scgi.so
abf5f06b 293%attr(755,root,root) %{_libdir}/cherokee/libplugin_secdownload.so
01d41beb 294%attr(755,root,root) %{_libdir}/cherokee/libplugin_server_info.so
abf5f06b 295%attr(755,root,root) %{_libdir}/cherokee/libplugin_ssi.so
296%attr(755,root,root) %{_libdir}/cherokee/libplugin_streaming.so
297%attr(755,root,root) %{_libdir}/cherokee/libplugin_target_ip.so
2ff65984 298%attr(755,root,root) %{_libdir}/cherokee/libplugin_tls.so
3b7d94a5 299%attr(755,root,root) %{_libdir}/cherokee/libplugin_url_arg.so
abf5f06b 300%attr(755,root,root) %{_libdir}/cherokee/libplugin_uwsgi.so
301%attr(755,root,root) %{_libdir}/cherokee/libplugin_wildcard.so
01d41beb 302
01d41beb 303%{_mandir}/man1/cget.1*
72ce7982 304%{_mandir}/man1/cherokee.1*
3319fba3
KK
305%{_mandir}/man1/cherokee-tweak.1*
306%{_mandir}/man1/cherokee-worker.1*
01d41beb 307
72ce7982 308%dir %{_datadir}/cherokee
72ce7982
PZ
309%{_datadir}/cherokee/deps
310%{_datadir}/cherokee/icons
72ce7982 311%{_datadir}/cherokee/themes
01d41beb
ER
312
313%dir %{_wwwhome}
0adbe1dc
ER
314%dir %{_wwwroot}
315%config(missingok) %{_wwwroot}/*
316
3319fba3 317%dir %attr(750,cherokee,logs) /var/log/%{name}
0e85b34f 318
0bb5c2e0
JK
319%dir %attr(771,root,cherokee) /var/lib/%{name}
320%dir %attr(771,cherokee,cherokee) /var/lib/%{name}/graphs
321%dir %attr(771,cherokee,cherokee) /var/lib/%{name}/graphs/images
322
ac2feb08
JK
323%files upstart
324%defattr(644,root,root,755)
325%config(noreplace) %verify(not md5 mtime size) /etc/init/%{name}.conf
326
e8c0b4db
JK
327%files admin -f %{name}.lang
328%defattr(644,root,root,755)
329%attr(755,root,root) %{_sbindir}/cherokee-admin
330%{_mandir}/man1/cherokee-admin.1*
331%dir %{_datadir}/cherokee/admin
332%{_datadir}/cherokee/admin/cherokee.conf.sample
333%{_datadir}/cherokee/admin/performance.conf.sample
334%{_datadir}/cherokee/admin/*.html
335%attr(755,root,root) %{_datadir}/cherokee/admin/*.py
d469ca68 336%{_datadir}/cherokee/admin/*.pyc
e8c0b4db 337%{_datadir}/cherokee/admin/static
d469ca68
JK
338%dir %{_datadir}/cherokee/admin/CTK
339%dir %{_datadir}/cherokee/admin/CTK/CTK
340%{_datadir}/cherokee/admin/CTK/CTK/*.py
341%{_datadir}/cherokee/admin/CTK/CTK/*.pyc
342%{_datadir}/cherokee/admin/CTK/static
343%dir %{_datadir}/cherokee/admin/plugins
344%{_datadir}/cherokee/admin/plugins/*.py
345%{_datadir}/cherokee/admin/plugins/*.pyc
346%dir %{_datadir}/cherokee/admin/wizards
347%{_datadir}/cherokee/admin/wizards/*.py
348%{_datadir}/cherokee/admin/wizards/*.pyc
e8c0b4db 349
d8be9859
JB
350%files libs
351%defattr(644,root,root,755)
352%attr(755,root,root) %{_libdir}/libcherokee-base.so.*.*.*
353%attr(755,root,root) %ghost %{_libdir}/libcherokee-base.so.0
354%attr(755,root,root) %{_libdir}/libcherokee-client.so.*.*.*
355%attr(755,root,root) %ghost %{_libdir}/libcherokee-client.so.0
356%attr(755,root,root) %{_libdir}/libcherokee-config.so.*.*.*
357%attr(755,root,root) %ghost %{_libdir}/libcherokee-config.so.0
358%attr(755,root,root) %{_libdir}/libcherokee-server.so.*.*.*
359%attr(755,root,root) %ghost %{_libdir}/libcherokee-server.so.0
360
0e85b34f 361%files devel
8c503f01 362%defattr(644,root,root,755)
0e85b34f 363%attr(755,root,root) %{_bindir}/cherokee-config
72ce7982 364%attr(755,root,root) %{_libdir}/libcherokee-base.so
72ce7982 365%attr(755,root,root) %{_libdir}/libcherokee-client.so
72ce7982 366%attr(755,root,root) %{_libdir}/libcherokee-config.so
72ce7982 367%attr(755,root,root) %{_libdir}/libcherokee-server.so
d8be9859
JB
368%{_libdir}/libcherokee-base.la
369%{_libdir}/libcherokee-client.la
370%{_libdir}/libcherokee-config.la
371%{_libdir}/libcherokee-server.la
8c503f01
JB
372%{_includedir}/cherokee
373%{_pkgconfigdir}/cherokee.pc
374%{_aclocaldir}/cherokee.m4
375%{_mandir}/man1/cherokee-config.1*
This page took 0.168559 seconds and 4 git commands to generate.