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