]> git.pld-linux.org Git - packages/cherokee.git/blame - cherokee.spec
- unify with template.init
[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
37b1fd2c 16Version: 1.0.0
ac2feb08 17Release: 2
01d41beb 18License: GPL v2
8c503f01 19Group: Networking/Daemons
37b1fd2c
JK
20Source0: http://www.cherokee-project.com/download/1.0/%{version}/%{name}-%{version}.tar.gz
21# Source0-md5: 2287f647a0a6645347c525b3557f612c
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}
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
abf5f06b 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}
3319fba3 53Suggests: php-fcgi
e8c0b4db 54Suggests: %{name}-admin = %{version}-%{release}
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
99Requires: python
100Requires: python-modules
101Requires: %{name} = %{version}-%{release}
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
3b5f252d 136%patch2 -p1
0e85b34f 137
138%build
3319fba3 139%{__libtoolize}
1bdedc57
ER
140%{__aclocal} -I m4
141%{__autoconf}
142%{__autoheader}
143%{__automake}
abf5f06b 144export PHPCGI=%{_bindir}/php.fcgi
0e85b34f 145%configure \
cfbc51f9 146 --disable-static \
3319fba3 147 --enable-os-string="PLD Linux" \
3319fba3
KK
148 --sysconfdir=/etc \
149 --with-wwwroot=%{_wwwroot} \
abf5f06b 150 --with-wwwuser=cherokee \
151 --with-wwwgroup=http \
56ea9d0b
JK
152 %{!?with_geoip:--without-geoip} \
153 %{!?with_mysql:--without-mysql} \
154 %{!?with_ffmpeg:--without-ffmpeg} \
155 %{!?with_ldap:--without-ldap}
0e85b34f 156%{__make}
157
158%install
159rm -rf $RPM_BUILD_ROOT
ac2feb08 160install -d $RPM_BUILD_ROOT{/etc/{init,pam.d,sysconfig,rc.d/init.d},/var/log/%{name}}
8c503f01 161
223f9f35 162%{__make} -j1 install \
8c503f01
JB
163 DESTDIR=$RPM_BUILD_ROOT
164
01d41beb
ER
165install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
166install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
ac2feb08 167install %{SOURCE3} $RPM_BUILD_ROOT/etc/init/%{name}.conf
01d41beb 168
1bdedc57
ER
169# users don't need this
170mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/cherokee-panic
1bdedc57 171
cfbc51f9
JB
172# modules dlopened by *.so
173rm -f $RPM_BUILD_ROOT%{_libdir}/cherokee/lib*.la
174
01d41beb
ER
175# unify manual dir
176rm -rf html
177mv $RPM_BUILD_ROOT%{_docdir}/%{name} html
178
3b7d94a5
JK
179# provided via %doc
180rm $RPM_BUILD_ROOT/etc/cherokee/cherokee.conf.perf_sample
181
d469ca68
JK
182# compile python modules, otherwise *.pyc may get generated on runtime
183# and stay after package removal
184%py_comp $RPM_BUILD_ROOT%{_datadir}/cherokee/admin/
185
0bb5c2e0 186mv $RPM_BUILD_ROOT%{_localedir}/{sv_SE,sv}
3b7d94a5
JK
187%find_lang %{name}
188
d469ca68 189
8c503f01
JB
190%clean
191rm -rf $RPM_BUILD_ROOT
0e85b34f 192
1bdedc57
ER
193%pre
194%groupadd -g 161 cherokee
195%groupadd -g 51 http
196%useradd -u 161 -d %{_wwwhome} -c "Cherokee User" -g cherokee cherokee
197%addusertogroup cherokee http
198
01d41beb 199%post
01d41beb 200/sbin/chkconfig --add %{name}
c61a601c
ER
201%service %{name} restart "Cherokee webserver"
202exit 0
01d41beb
ER
203
204%preun
205if [ "$1" = "0" ]; then
206 %service %{name} stop
207 /sbin/chkconfig --del %{name}
208fi
209
1bdedc57 210%postun
1bdedc57 211if [ "$1" = "0" ]; then
c61a601c
ER
212 %userremove cherokee
213 %groupremove cherokee
1bdedc57
ER
214 %groupremove http
215fi
cfbc51f9 216
ac2feb08
JK
217%post upstart
218%upstart_post %{name}
219
220%postun upstart
221%upstart_postun %{name}
222
d8be9859
JB
223%post libs -p /sbin/ldconfig
224%postun libs -p /sbin/ldconfig
225
e8c0b4db 226%files
0e85b34f 227%defattr(644,root,root,755)
3b7d94a5 228%doc AUTHORS ChangeLog html contrib/*to*.py performance.conf.sample
0adbe1dc
ER
229%dir %attr(750,root,root) %{_sysconfdir}
230%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cherokee.conf
01d41beb 231
2911a3cb 232%config(noreplace) %verify(not md5 mtime size) /etc/pam.d/cherokee
01d41beb
ER
233%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cherokee
234%attr(754,root,root) /etc/rc.d/init.d/cherokee
235
236%attr(755,root,root) %{_bindir}/cget
72ce7982 237%attr(755,root,root) %{_bindir}/cherokee-tweak
01d41beb 238%attr(755,root,root) %{_sbindir}/cherokee
3319fba3
KK
239%attr(755,root,root) %{_sbindir}/cherokee-panic
240%attr(755,root,root) %{_sbindir}/cherokee-worker
01d41beb 241
0e85b34f 242%dir %{_libdir}/cherokee
1bdedc57 243%attr(755,root,root) %{_libdir}/cherokee/libplugin_admin.so
72ce7982 244%attr(755,root,root) %{_libdir}/cherokee/libplugin_and.so
abf5f06b 245%attr(755,root,root) %{_libdir}/cherokee/libplugin_authlist.so
246%attr(755,root,root) %{_libdir}/cherokee/libplugin_bind.so
01d41beb
ER
247%attr(755,root,root) %{_libdir}/cherokee/libplugin_cgi.so
248%attr(755,root,root) %{_libdir}/cherokee/libplugin_combined.so
249%attr(755,root,root) %{_libdir}/cherokee/libplugin_common.so
3319fba3 250%attr(755,root,root) %{_libdir}/cherokee/libplugin_custom_error.so
abf5f06b 251%attr(755,root,root) %{_libdir}/cherokee/libplugin_custom.so
56ea9d0b 252%{?with_mysql:%attr(755,root,root) %{_libdir}/cherokee/libplugin_dbslayer.so}
3319fba3 253%attr(755,root,root) %{_libdir}/cherokee/libplugin_deflate.so
72ce7982 254%attr(755,root,root) %{_libdir}/cherokee/libplugin_directory.so
01d41beb 255%attr(755,root,root) %{_libdir}/cherokee/libplugin_dirlist.so
abf5f06b 256%attr(755,root,root) %{_libdir}/cherokee/libplugin_empty_gif.so
3319fba3 257%attr(755,root,root) %{_libdir}/cherokee/libplugin_error_nn.so
01d41beb 258%attr(755,root,root) %{_libdir}/cherokee/libplugin_error_redir.so
abf5f06b 259%attr(755,root,root) %{_libdir}/cherokee/libplugin_evhost.so
260%attr(755,root,root) %{_libdir}/cherokee/libplugin_exists.so
72ce7982 261%attr(755,root,root) %{_libdir}/cherokee/libplugin_extensions.so
3b7d94a5 262#%attr(755,root,root) %{_libdir}/cherokee/libplugin_fastcgi.so
8c2165c6 263%attr(755,root,root) %{_libdir}/cherokee/libplugin_fcgi.so
01d41beb 264%attr(755,root,root) %{_libdir}/cherokee/libplugin_file.so
abf5f06b 265%attr(755,root,root) %{_libdir}/cherokee/libplugin_from.so
266%attr(755,root,root) %{_libdir}/cherokee/libplugin_fullpath.so
0a169935 267%{?with_geoip:%attr(755,root,root) %{_libdir}/cherokee/libplugin_geoip.so}
01d41beb 268%attr(755,root,root) %{_libdir}/cherokee/libplugin_gzip.so
72ce7982 269%attr(755,root,root) %{_libdir}/cherokee/libplugin_header.so
01d41beb
ER
270%attr(755,root,root) %{_libdir}/cherokee/libplugin_htdigest.so
271%attr(755,root,root) %{_libdir}/cherokee/libplugin_htpasswd.so
abf5f06b 272%attr(755,root,root) %{_libdir}/cherokee/libplugin_ip_hash.so
56ea9d0b 273%{?with_ldap:%attr(755,root,root) %{_libdir}/cherokee/libplugin_ldap.so}
abf5f06b 274%attr(755,root,root) %{_libdir}/cherokee/libplugin_libssl.so
275%attr(755,root,root) %{_libdir}/cherokee/libplugin_method.so
56ea9d0b 276%{?with_mysql:%attr(755,root,root) %{_libdir}/cherokee/libplugin_mysql.so}
01d41beb 277%attr(755,root,root) %{_libdir}/cherokee/libplugin_ncsa.so
72ce7982
PZ
278%attr(755,root,root) %{_libdir}/cherokee/libplugin_not.so
279%attr(755,root,root) %{_libdir}/cherokee/libplugin_or.so
01d41beb 280%attr(755,root,root) %{_libdir}/cherokee/libplugin_pam.so
01d41beb 281%attr(755,root,root) %{_libdir}/cherokee/libplugin_plain.so
3b7d94a5
JK
282%attr(755,root,root) %{_libdir}/cherokee/libplugin_post_report.so
283%attr(755,root,root) %{_libdir}/cherokee/libplugin_post_track.so
3319fba3 284%attr(755,root,root) %{_libdir}/cherokee/libplugin_proxy.so
01d41beb 285%attr(755,root,root) %{_libdir}/cherokee/libplugin_redir.so
abf5f06b 286%attr(755,root,root) %{_libdir}/cherokee/libplugin_rehost.so
287%attr(755,root,root) %{_libdir}/cherokee/libplugin_render_rrd.so
72ce7982 288%attr(755,root,root) %{_libdir}/cherokee/libplugin_request.so
8c2165c6 289%attr(755,root,root) %{_libdir}/cherokee/libplugin_round_robin.so
abf5f06b 290%attr(755,root,root) %{_libdir}/cherokee/libplugin_rrd.so
8c2165c6 291%attr(755,root,root) %{_libdir}/cherokee/libplugin_scgi.so
abf5f06b 292%attr(755,root,root) %{_libdir}/cherokee/libplugin_secdownload.so
01d41beb 293%attr(755,root,root) %{_libdir}/cherokee/libplugin_server_info.so
abf5f06b 294%attr(755,root,root) %{_libdir}/cherokee/libplugin_ssi.so
295%attr(755,root,root) %{_libdir}/cherokee/libplugin_streaming.so
296%attr(755,root,root) %{_libdir}/cherokee/libplugin_target_ip.so
3b7d94a5 297%attr(755,root,root) %{_libdir}/cherokee/libplugin_url_arg.so
abf5f06b 298%attr(755,root,root) %{_libdir}/cherokee/libplugin_uwsgi.so
299%attr(755,root,root) %{_libdir}/cherokee/libplugin_wildcard.so
01d41beb 300
01d41beb 301%{_mandir}/man1/cget.1*
72ce7982 302%{_mandir}/man1/cherokee.1*
3319fba3
KK
303%{_mandir}/man1/cherokee-tweak.1*
304%{_mandir}/man1/cherokee-worker.1*
01d41beb 305
72ce7982 306%dir %{_datadir}/cherokee
72ce7982
PZ
307%{_datadir}/cherokee/deps
308%{_datadir}/cherokee/icons
72ce7982 309%{_datadir}/cherokee/themes
01d41beb
ER
310
311%dir %{_wwwhome}
0adbe1dc
ER
312%dir %{_wwwroot}
313%config(missingok) %{_wwwroot}/*
314
3319fba3 315%dir %attr(750,cherokee,logs) /var/log/%{name}
0e85b34f 316
0bb5c2e0
JK
317%dir %attr(771,root,cherokee) /var/lib/%{name}
318%dir %attr(771,cherokee,cherokee) /var/lib/%{name}/graphs
319%dir %attr(771,cherokee,cherokee) /var/lib/%{name}/graphs/images
320
ac2feb08
JK
321%files upstart
322%defattr(644,root,root,755)
323%config(noreplace) %verify(not md5 mtime size) /etc/init/%{name}.conf
324
e8c0b4db
JK
325%files admin -f %{name}.lang
326%defattr(644,root,root,755)
327%attr(755,root,root) %{_sbindir}/cherokee-admin
328%{_mandir}/man1/cherokee-admin.1*
329%dir %{_datadir}/cherokee/admin
330%{_datadir}/cherokee/admin/cherokee.conf.sample
331%{_datadir}/cherokee/admin/performance.conf.sample
332%{_datadir}/cherokee/admin/*.html
333%attr(755,root,root) %{_datadir}/cherokee/admin/*.py
d469ca68 334%{_datadir}/cherokee/admin/*.pyc
e8c0b4db 335%{_datadir}/cherokee/admin/static
d469ca68
JK
336%dir %{_datadir}/cherokee/admin/CTK
337%dir %{_datadir}/cherokee/admin/CTK/CTK
338%{_datadir}/cherokee/admin/CTK/CTK/*.py
339%{_datadir}/cherokee/admin/CTK/CTK/*.pyc
340%{_datadir}/cherokee/admin/CTK/static
341%dir %{_datadir}/cherokee/admin/plugins
342%{_datadir}/cherokee/admin/plugins/*.py
343%{_datadir}/cherokee/admin/plugins/*.pyc
344%dir %{_datadir}/cherokee/admin/wizards
345%{_datadir}/cherokee/admin/wizards/*.py
346%{_datadir}/cherokee/admin/wizards/*.pyc
e8c0b4db 347
d8be9859
JB
348%files libs
349%defattr(644,root,root,755)
350%attr(755,root,root) %{_libdir}/libcherokee-base.so.*.*.*
351%attr(755,root,root) %ghost %{_libdir}/libcherokee-base.so.0
352%attr(755,root,root) %{_libdir}/libcherokee-client.so.*.*.*
353%attr(755,root,root) %ghost %{_libdir}/libcherokee-client.so.0
354%attr(755,root,root) %{_libdir}/libcherokee-config.so.*.*.*
355%attr(755,root,root) %ghost %{_libdir}/libcherokee-config.so.0
356%attr(755,root,root) %{_libdir}/libcherokee-server.so.*.*.*
357%attr(755,root,root) %ghost %{_libdir}/libcherokee-server.so.0
358
0e85b34f 359%files devel
8c503f01 360%defattr(644,root,root,755)
0e85b34f 361%attr(755,root,root) %{_bindir}/cherokee-config
72ce7982 362%attr(755,root,root) %{_libdir}/libcherokee-base.so
72ce7982 363%attr(755,root,root) %{_libdir}/libcherokee-client.so
72ce7982 364%attr(755,root,root) %{_libdir}/libcherokee-config.so
72ce7982 365%attr(755,root,root) %{_libdir}/libcherokee-server.so
d8be9859
JB
366%{_libdir}/libcherokee-base.la
367%{_libdir}/libcherokee-client.la
368%{_libdir}/libcherokee-config.la
369%{_libdir}/libcherokee-server.la
8c503f01
JB
370%{_includedir}/cherokee
371%{_pkgconfigdir}/cherokee.pc
372%{_aclocaldir}/cherokee.m4
373%{_mandir}/man1/cherokee-config.1*
This page took 0.121569 seconds and 4 git commands to generate.