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