]>
Commit | Line | Data |
---|---|---|
abf5f06b | 1 | # TODO: |
2 | # - does it requires spawn-fcgi? | |
3 | # - warning: Installed (but unpackaged) file(s) found: | |
4 | # /usr/share/locale/de/LC_MESSAGES/cherokee.mo | |
5 | # /usr/share/locale/en/LC_MESSAGES/cherokee.mo | |
6 | # /usr/share/locale/es/LC_MESSAGES/cherokee.mo | |
7 | # /usr/share/locale/nl/LC_MESSAGES/cherokee.mo | |
8 | # /usr/share/locale/sv_SE/LC_MESSAGES/cherokee.mo | |
9 | # /usr/share/locale/zh_CN/LC_MESSAGES/cherokee.mo | |
01abcdff JB |
10 | # |
11 | # Conditional build: | |
3319fba3 | 12 | %bcond_without geoip # without GeoIP support |
01d41beb | 13 | # |
01d41beb | 14 | Summary: Fast, Flexible and Lightweight Web server |
56ec7482 | 15 | Summary(pl.UTF-8): Cherokee - serwer WWW |
0e85b34f | 16 | Name: cherokee |
d8832580 | 17 | Version: 0.99.29 |
18 | Release: 0.1 | |
01d41beb | 19 | License: GPL v2 |
8c503f01 | 20 | Group: Networking/Daemons |
d8832580 | 21 | Source0: http://www.cherokee-project.com/download/0.99/%{version}/%{name}-%{version}.tar.gz |
22 | # Source0-md5: 236f17981c0c8908f6911fda239fc3a4 | |
01d41beb ER |
23 | Source1: %{name}.init |
24 | Source2: %{name}.sysconfig | |
1bdedc57 ER |
25 | Patch0: %{name}-config.patch |
26 | Patch1: %{name}-php-path.patch | |
3b5f252d | 27 | Patch2: %{name}-panic_path.patch |
72ce7982 | 28 | URL: http://www.cherokee-project.com/ |
90a7df58 | 29 | %{?with_geoip:BuildRequires: GeoIP-devel} |
1bdedc57 ER |
30 | BuildRequires: autoconf |
31 | BuildRequires: automake | |
abf5f06b | 32 | BuildRequires: ffmpeg-devel |
3319fba3 | 33 | BuildRequires: libtool |
8c2165c6 PZ |
34 | BuildRequires: mysql-devel |
35 | BuildRequires: openldap-devel | |
abf5f06b | 36 | BuildRequires: openssl-devel |
cfbc51f9 | 37 | BuildRequires: pam-devel |
01d41beb | 38 | BuildRequires: pcre-devel |
abf5f06b | 39 | BuildRequires: php-fcgi |
cfbc51f9 | 40 | BuildRequires: pkgconfig |
8c2165c6 | 41 | BuildRequires: python-docutils |
3319fba3 | 42 | BuildRequires: rpm-pythonprov |
1bdedc57 | 43 | BuildRequires: rpmbuild(macros) >= 1.268 |
cfbc51f9 | 44 | BuildRequires: zlib-devel |
1bdedc57 ER |
45 | Requires(post,preun): rc-scripts |
46 | Requires(postun): /usr/sbin/groupdel | |
47 | Requires(postun): /usr/sbin/userdel | |
48 | Requires(pre): /bin/id | |
49 | Requires(pre): /usr/bin/getgid | |
50 | Requires(pre): /usr/sbin/groupadd | |
51 | Requires(pre): /usr/sbin/useradd | |
d8be9859 | 52 | Requires: %{name}-libs = %{version}-%{release} |
3319fba3 | 53 | Suggests: php-fcgi |
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 | |
d8be9859 JB |
81 | %package libs |
82 | Summary: Cherokee web server libraries | |
83 | Summary(pl.UTF-8): Biblioteki serwera WWW Cherokee | |
84 | Group: Libraries | |
85 | ||
86 | %description libs | |
87 | Cherokee web server libraries. | |
88 | ||
89 | %description libs -l pl.UTF-8 | |
90 | Biblioteki serwera WWW Cherokee. | |
91 | ||
0e85b34f | 92 | %package devel |
8c503f01 | 93 | Summary: Header files for Cherokee web server |
56ec7482 | 94 | Summary(pl.UTF-8): Pliki nagłówkowe dla serwera WWW Cherokee |
8c503f01 | 95 | Group: Development/Libraries |
d8be9859 | 96 | Requires: %{name}-libs = %{version}-%{release} |
0e85b34f | 97 | |
98 | %description devel | |
8c503f01 JB |
99 | Header files for Cherokee web server. |
100 | ||
fd499fdf JR |
101 | %description devel -l pl.UTF-8 |
102 | Pliki nagłówkowe dla serwera WWW Cherokee. | |
0e85b34f | 103 | |
104 | %prep | |
105 | %setup -q | |
1bdedc57 ER |
106 | %patch0 -p1 |
107 | %patch1 -p1 | |
3b5f252d | 108 | %patch2 -p1 |
0e85b34f | 109 | |
110 | %build | |
3319fba3 | 111 | %{__libtoolize} |
1bdedc57 ER |
112 | %{__aclocal} -I m4 |
113 | %{__autoconf} | |
114 | %{__autoheader} | |
115 | %{__automake} | |
abf5f06b | 116 | export PHPCGI=%{_bindir}/php.fcgi |
0e85b34f | 117 | %configure \ |
cfbc51f9 | 118 | --disable-static \ |
3319fba3 | 119 | --enable-os-string="PLD Linux" \ |
3319fba3 KK |
120 | --sysconfdir=/etc \ |
121 | --with-wwwroot=%{_wwwroot} \ | |
abf5f06b | 122 | --with-wwwuser=cherokee \ |
123 | --with-wwwgroup=http \ | |
124 | %{!?with_geoip:--without-geoip} | |
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 | ||
8c503f01 JB |
147 | %clean |
148 | rm -rf $RPM_BUILD_ROOT | |
0e85b34f | 149 | |
1bdedc57 ER |
150 | %pre |
151 | %groupadd -g 161 cherokee | |
152 | %groupadd -g 51 http | |
153 | %useradd -u 161 -d %{_wwwhome} -c "Cherokee User" -g cherokee cherokee | |
154 | %addusertogroup cherokee http | |
155 | ||
01d41beb | 156 | %post |
01d41beb | 157 | /sbin/chkconfig --add %{name} |
c61a601c ER |
158 | %service %{name} restart "Cherokee webserver" |
159 | exit 0 | |
01d41beb ER |
160 | |
161 | %preun | |
162 | if [ "$1" = "0" ]; then | |
163 | %service %{name} stop | |
164 | /sbin/chkconfig --del %{name} | |
165 | fi | |
166 | ||
1bdedc57 | 167 | %postun |
1bdedc57 | 168 | if [ "$1" = "0" ]; then |
c61a601c ER |
169 | %userremove cherokee |
170 | %groupremove cherokee | |
1bdedc57 ER |
171 | %groupremove http |
172 | fi | |
cfbc51f9 | 173 | |
d8be9859 JB |
174 | %post libs -p /sbin/ldconfig |
175 | %postun libs -p /sbin/ldconfig | |
176 | ||
0e85b34f | 177 | %files |
178 | %defattr(644,root,root,755) | |
abf5f06b | 179 | %doc AUTHORS ChangeLog html contrib/*to*.py |
0adbe1dc ER |
180 | %dir %attr(750,root,root) %{_sysconfdir} |
181 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cherokee.conf | |
01d41beb | 182 | |
2911a3cb | 183 | %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/cherokee |
01d41beb ER |
184 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cherokee |
185 | %attr(754,root,root) /etc/rc.d/init.d/cherokee | |
186 | ||
187 | %attr(755,root,root) %{_bindir}/cget | |
72ce7982 | 188 | %attr(755,root,root) %{_bindir}/cherokee-tweak |
01d41beb | 189 | %attr(755,root,root) %{_sbindir}/cherokee |
8c2165c6 | 190 | %attr(755,root,root) %{_sbindir}/cherokee-admin |
3319fba3 KK |
191 | %attr(755,root,root) %{_sbindir}/cherokee-panic |
192 | %attr(755,root,root) %{_sbindir}/cherokee-worker | |
01d41beb | 193 | |
0e85b34f | 194 | %dir %{_libdir}/cherokee |
1bdedc57 | 195 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_admin.so |
72ce7982 | 196 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_and.so |
abf5f06b | 197 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_authlist.so |
198 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_bind.so | |
01d41beb ER |
199 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_cgi.so |
200 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_combined.so | |
201 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_common.so | |
3319fba3 | 202 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_custom_error.so |
abf5f06b | 203 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_custom.so |
3319fba3 KK |
204 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_dbslayer.so |
205 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_deflate.so | |
72ce7982 | 206 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_directory.so |
01d41beb | 207 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_dirlist.so |
abf5f06b | 208 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_empty_gif.so |
3319fba3 | 209 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_error_nn.so |
01d41beb | 210 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_error_redir.so |
abf5f06b | 211 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_evhost.so |
212 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_exists.so | |
72ce7982 | 213 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_extensions.so |
01d41beb | 214 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_fastcgi.so |
8c2165c6 | 215 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_fcgi.so |
01d41beb | 216 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_file.so |
abf5f06b | 217 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_from.so |
218 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_fullpath.so | |
0a169935 | 219 | %{?with_geoip:%attr(755,root,root) %{_libdir}/cherokee/libplugin_geoip.so} |
01d41beb | 220 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_gzip.so |
72ce7982 | 221 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_header.so |
01d41beb ER |
222 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_htdigest.so |
223 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_htpasswd.so | |
abf5f06b | 224 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_ip_hash.so |
8c2165c6 | 225 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_ldap.so |
abf5f06b | 226 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_libssl.so |
227 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_method.so | |
8c2165c6 | 228 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_mysql.so |
01d41beb | 229 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_ncsa.so |
72ce7982 PZ |
230 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_not.so |
231 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_or.so | |
01d41beb | 232 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_pam.so |
01d41beb | 233 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_plain.so |
3319fba3 | 234 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_proxy.so |
01d41beb | 235 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_redir.so |
abf5f06b | 236 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_rehost.so |
237 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_render_rrd.so | |
72ce7982 | 238 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_request.so |
8c2165c6 | 239 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_round_robin.so |
abf5f06b | 240 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_rrd.so |
8c2165c6 | 241 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_scgi.so |
abf5f06b | 242 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_secdownload.so |
01d41beb | 243 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_server_info.so |
abf5f06b | 244 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_ssi.so |
245 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_streaming.so | |
246 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_target_ip.so | |
247 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_uwsgi.so | |
248 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_wildcard.so | |
01d41beb | 249 | |
01d41beb | 250 | %{_mandir}/man1/cget.1* |
72ce7982 PZ |
251 | %{_mandir}/man1/cherokee.1* |
252 | %{_mandir}/man1/cherokee-admin.1* | |
3319fba3 KK |
253 | %{_mandir}/man1/cherokee-tweak.1* |
254 | %{_mandir}/man1/cherokee-worker.1* | |
01d41beb | 255 | |
72ce7982 PZ |
256 | %dir %{_datadir}/cherokee |
257 | %dir %{_datadir}/cherokee/admin | |
258 | %{_datadir}/cherokee/admin/cherokee.conf.sample | |
abf5f06b | 259 | %{_datadir}/cherokee/admin/performance.conf.sample |
72ce7982 PZ |
260 | %{_datadir}/cherokee/admin/*.html |
261 | %attr(755,root,root) %{_datadir}/cherokee/admin/*.py | |
262 | %{_datadir}/cherokee/admin/static | |
263 | %{_datadir}/cherokee/deps | |
264 | %{_datadir}/cherokee/icons | |
72ce7982 | 265 | %{_datadir}/cherokee/themes |
01d41beb ER |
266 | |
267 | %dir %{_wwwhome} | |
0adbe1dc ER |
268 | %dir %{_wwwroot} |
269 | %config(missingok) %{_wwwroot}/* | |
270 | ||
3319fba3 | 271 | %dir %attr(750,cherokee,logs) /var/log/%{name} |
0e85b34f | 272 | |
d8be9859 JB |
273 | %files libs |
274 | %defattr(644,root,root,755) | |
275 | %attr(755,root,root) %{_libdir}/libcherokee-base.so.*.*.* | |
276 | %attr(755,root,root) %ghost %{_libdir}/libcherokee-base.so.0 | |
277 | %attr(755,root,root) %{_libdir}/libcherokee-client.so.*.*.* | |
278 | %attr(755,root,root) %ghost %{_libdir}/libcherokee-client.so.0 | |
279 | %attr(755,root,root) %{_libdir}/libcherokee-config.so.*.*.* | |
280 | %attr(755,root,root) %ghost %{_libdir}/libcherokee-config.so.0 | |
281 | %attr(755,root,root) %{_libdir}/libcherokee-server.so.*.*.* | |
282 | %attr(755,root,root) %ghost %{_libdir}/libcherokee-server.so.0 | |
283 | ||
0e85b34f | 284 | %files devel |
8c503f01 | 285 | %defattr(644,root,root,755) |
0e85b34f | 286 | %attr(755,root,root) %{_bindir}/cherokee-config |
72ce7982 | 287 | %attr(755,root,root) %{_libdir}/libcherokee-base.so |
72ce7982 | 288 | %attr(755,root,root) %{_libdir}/libcherokee-client.so |
72ce7982 | 289 | %attr(755,root,root) %{_libdir}/libcherokee-config.so |
72ce7982 | 290 | %attr(755,root,root) %{_libdir}/libcherokee-server.so |
d8be9859 JB |
291 | %{_libdir}/libcherokee-base.la |
292 | %{_libdir}/libcherokee-client.la | |
293 | %{_libdir}/libcherokee-config.la | |
294 | %{_libdir}/libcherokee-server.la | |
8c503f01 JB |
295 | %{_includedir}/cherokee |
296 | %{_pkgconfigdir}/cherokee.pc | |
297 | %{_aclocaldir}/cherokee.m4 | |
298 | %{_mandir}/man1/cherokee-config.1* |