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