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