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