]>
Commit | Line | Data |
---|---|---|
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 | 11 | Summary: Fast, Flexible and Lightweight Web server |
56ec7482 | 12 | Summary(pl.UTF-8): Cherokee - serwer WWW |
0e85b34f | 13 | Name: cherokee |
3b7d94a5 | 14 | Version: 0.99.44 |
d8832580 | 15 | Release: 0.1 |
01d41beb | 16 | License: GPL v2 |
8c503f01 | 17 | Group: Networking/Daemons |
d8832580 | 18 | Source0: http://www.cherokee-project.com/download/0.99/%{version}/%{name}-%{version}.tar.gz |
3b7d94a5 | 19 | # Source0-md5: 268e7130c12b441523de963f95b9b85d |
01d41beb ER |
20 | Source1: %{name}.init |
21 | Source2: %{name}.sysconfig | |
1bdedc57 ER |
22 | Patch0: %{name}-config.patch |
23 | Patch1: %{name}-php-path.patch | |
3b5f252d | 24 | Patch2: %{name}-panic_path.patch |
72ce7982 | 25 | URL: http://www.cherokee-project.com/ |
90a7df58 | 26 | %{?with_geoip:BuildRequires: GeoIP-devel} |
1bdedc57 ER |
27 | BuildRequires: autoconf |
28 | BuildRequires: automake | |
56ea9d0b | 29 | %{?with_ffmpeg:BuildRequires: ffmpeg-devel} |
3319fba3 | 30 | BuildRequires: libtool |
56ea9d0b JK |
31 | %{?with_mysql:BuildRequires: mysql-devel} |
32 | %{?with_ldap:BuildRequires: openldap-devel} | |
abf5f06b | 33 | BuildRequires: openssl-devel |
cfbc51f9 | 34 | BuildRequires: pam-devel |
01d41beb | 35 | BuildRequires: pcre-devel |
abf5f06b | 36 | BuildRequires: php-fcgi |
cfbc51f9 | 37 | BuildRequires: pkgconfig |
8c2165c6 | 38 | BuildRequires: python-docutils |
3319fba3 | 39 | BuildRequires: rpm-pythonprov |
1bdedc57 | 40 | BuildRequires: rpmbuild(macros) >= 1.268 |
cfbc51f9 | 41 | BuildRequires: zlib-devel |
1bdedc57 ER |
42 | Requires(post,preun): rc-scripts |
43 | Requires(postun): /usr/sbin/groupdel | |
44 | Requires(postun): /usr/sbin/userdel | |
45 | Requires(pre): /bin/id | |
46 | Requires(pre): /usr/bin/getgid | |
47 | Requires(pre): /usr/sbin/groupadd | |
48 | Requires(pre): /usr/sbin/useradd | |
d8be9859 | 49 | Requires: %{name}-libs = %{version}-%{release} |
3319fba3 | 50 | Suggests: php-fcgi |
1bdedc57 ER |
51 | Provides: group(cherokee) |
52 | Provides: group(http) | |
53 | Provides: user(cherokee) | |
bdfcbc7b | 54 | Provides: webserver |
8c503f01 | 55 | BuildRoot: %{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 |
62 | Cherokee is a flexible, very fast, lightweight Web server. It is |
63 | implemented entirely in C, and has no dependencies beyond a standard C | |
a40f27e9 | 64 | library. It is embeddable and extensible with plug-ins. It supports |
abf5f06b | 65 | on-the-fly configuration by reading files or strings, TLS/SSL via |
66 | OpenSSL, virtual hosts, authentication, cache friendly features, PHP, | |
67 | custom error management, and much more. | |
0e85b34f | 68 | |
fd499fdf | 69 | %description -l pl.UTF-8 |
a40f27e9 | 70 | Cherokee to elastyczny, bardzo szybki i lekki serwer WWW. Jest |
fd499fdf JR |
71 | zaimplementowany całkowicie w C i nie ma zależności poza standardową |
72 | biblioteką C. Jest osadzalny i rozbudowywalny poprzez wtyczki. | |
73 | Obsługuje konfigurację w locie poprzez odczyt plików lub łańcuchów | |
abf5f06b | 74 | znaków, TLS/SSL poprzez OpenSSL, hosty wirtualne, uwierzytelnianie, |
75 | opcje związane z pamięcią podręczną, PHP, własne zarządzanie błędami i | |
76 | wiele więcej. | |
8c503f01 | 77 | |
d8be9859 JB |
78 | %package libs |
79 | Summary: Cherokee web server libraries | |
80 | Summary(pl.UTF-8): Biblioteki serwera WWW Cherokee | |
81 | Group: Libraries | |
82 | ||
83 | %description libs | |
84 | Cherokee web server libraries. | |
85 | ||
86 | %description libs -l pl.UTF-8 | |
87 | Biblioteki serwera WWW Cherokee. | |
88 | ||
0e85b34f | 89 | %package devel |
8c503f01 | 90 | Summary: Header files for Cherokee web server |
56ec7482 | 91 | Summary(pl.UTF-8): Pliki nagłówkowe dla serwera WWW Cherokee |
8c503f01 | 92 | Group: Development/Libraries |
d8be9859 | 93 | Requires: %{name}-libs = %{version}-%{release} |
0e85b34f | 94 | |
95 | %description devel | |
8c503f01 JB |
96 | Header files for Cherokee web server. |
97 | ||
fd499fdf JR |
98 | %description devel -l pl.UTF-8 |
99 | Pliki 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 | 113 | export 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 | |
128 | rm -rf $RPM_BUILD_ROOT | |
2911a3cb | 129 | install -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 |
134 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
135 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
136 | ||
1bdedc57 ER |
137 | # users don't need this |
138 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/cherokee-panic | |
1bdedc57 | 139 | |
cfbc51f9 JB |
140 | # modules dlopened by *.so |
141 | rm -f $RPM_BUILD_ROOT%{_libdir}/cherokee/lib*.la | |
142 | ||
01d41beb ER |
143 | # unify manual dir |
144 | rm -rf html | |
145 | mv $RPM_BUILD_ROOT%{_docdir}/%{name} html | |
146 | ||
3b7d94a5 JK |
147 | # provided via %doc |
148 | rm $RPM_BUILD_ROOT/etc/cherokee/cherokee.conf.perf_sample | |
149 | ||
150 | %find_lang %{name} | |
151 | ||
8c503f01 JB |
152 | %clean |
153 | rm -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" |
164 | exit 0 | |
01d41beb ER |
165 | |
166 | %preun | |
167 | if [ "$1" = "0" ]; then | |
168 | %service %{name} stop | |
169 | /sbin/chkconfig --del %{name} | |
170 | fi | |
171 | ||
1bdedc57 | 172 | %postun |
1bdedc57 | 173 | if [ "$1" = "0" ]; then |
c61a601c ER |
174 | %userremove cherokee |
175 | %groupremove cherokee | |
1bdedc57 ER |
176 | %groupremove http |
177 | fi | |
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* |