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