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