]>
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,postun): /sbin/ldconfig |
40 | Requires(post,preun): rc-scripts | |
41 | Requires(postun): /usr/sbin/groupdel | |
42 | Requires(postun): /usr/sbin/userdel | |
43 | Requires(pre): /bin/id | |
44 | Requires(pre): /usr/bin/getgid | |
45 | Requires(pre): /usr/sbin/groupadd | |
46 | Requires(pre): /usr/sbin/useradd | |
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 | |
0e85b34f | 75 | %package devel |
8c503f01 | 76 | Summary: Header files for Cherokee web server |
56ec7482 | 77 | Summary(pl.UTF-8): Pliki nagłówkowe dla serwera WWW Cherokee |
8c503f01 | 78 | Group: Development/Libraries |
01abcdff | 79 | Requires: %{name} = %{version}-%{release} |
0e85b34f | 80 | |
81 | %description devel | |
8c503f01 JB |
82 | Header files for Cherokee web server. |
83 | ||
fd499fdf JR |
84 | %description devel -l pl.UTF-8 |
85 | Pliki nagłówkowe dla serwera WWW Cherokee. | |
0e85b34f | 86 | |
87 | %prep | |
88 | %setup -q | |
1bdedc57 ER |
89 | %patch0 -p1 |
90 | %patch1 -p1 | |
0e85b34f | 91 | |
92 | %build | |
3319fba3 | 93 | %{__libtoolize} |
1bdedc57 ER |
94 | %{__aclocal} -I m4 |
95 | %{__autoconf} | |
96 | %{__autoheader} | |
97 | %{__automake} | |
0e85b34f | 98 | %configure \ |
cfbc51f9 | 99 | --disable-static \ |
3319fba3 | 100 | --enable-os-string="PLD Linux" \ |
01d41beb | 101 | %{?with_tls:--enable-tls=%{?with_gnutls:gnutls}%{?with_openssl:openssl}} \ |
3319fba3 KK |
102 | --sysconfdir=/etc \ |
103 | --with-wwwroot=%{_wwwroot} \ | |
0a169935 | 104 | %{!?with_geoip:--without-geoip} \ |
3319fba3 | 105 | PHPCGI=%{_bindir}/php.fcgi |
01d41beb | 106 | |
0e85b34f | 107 | %{__make} |
108 | ||
109 | %install | |
110 | rm -rf $RPM_BUILD_ROOT | |
2911a3cb | 111 | install -d $RPM_BUILD_ROOT{/etc/{pam.d,sysconfig,rc.d/init.d},/var/log/%{name}} |
8c503f01 JB |
112 | |
113 | %{__make} install \ | |
114 | DESTDIR=$RPM_BUILD_ROOT | |
115 | ||
01d41beb ER |
116 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
117 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name} | |
118 | ||
1bdedc57 ER |
119 | # users don't need this |
120 | mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/cherokee-panic | |
1bdedc57 | 121 | |
cfbc51f9 JB |
122 | # modules dlopened by *.so |
123 | rm -f $RPM_BUILD_ROOT%{_libdir}/cherokee/lib*.la | |
124 | ||
01d41beb ER |
125 | # unify manual dir |
126 | rm -rf html | |
127 | mv $RPM_BUILD_ROOT%{_docdir}/%{name} html | |
128 | ||
8c503f01 JB |
129 | %clean |
130 | rm -rf $RPM_BUILD_ROOT | |
0e85b34f | 131 | |
1bdedc57 ER |
132 | %pre |
133 | %groupadd -g 161 cherokee | |
134 | %groupadd -g 51 http | |
135 | %useradd -u 161 -d %{_wwwhome} -c "Cherokee User" -g cherokee cherokee | |
136 | %addusertogroup cherokee http | |
137 | ||
01d41beb ER |
138 | %post |
139 | /sbin/ldconfig | |
140 | /sbin/chkconfig --add %{name} | |
c61a601c ER |
141 | %service %{name} restart "Cherokee webserver" |
142 | exit 0 | |
01d41beb ER |
143 | |
144 | %preun | |
145 | if [ "$1" = "0" ]; then | |
146 | %service %{name} stop | |
147 | /sbin/chkconfig --del %{name} | |
148 | fi | |
149 | ||
1bdedc57 ER |
150 | %postun |
151 | /sbin/ldconfig | |
152 | if [ "$1" = "0" ]; then | |
c61a601c ER |
153 | %userremove cherokee |
154 | %groupremove cherokee | |
1bdedc57 ER |
155 | %groupremove http |
156 | fi | |
cfbc51f9 | 157 | |
0e85b34f | 158 | %files |
159 | %defattr(644,root,root,755) | |
3319fba3 | 160 | %doc AUTHORS ChangeLog TODO html contrib/*to*.py |
0adbe1dc ER |
161 | %dir %attr(750,root,root) %{_sysconfdir} |
162 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cherokee.conf | |
0adbe1dc | 163 | %dir %attr(750,root,root) %{_sysconfdir}/ssl |
01d41beb | 164 | |
2911a3cb | 165 | %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/cherokee |
01d41beb ER |
166 | %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cherokee |
167 | %attr(754,root,root) /etc/rc.d/init.d/cherokee | |
168 | ||
169 | %attr(755,root,root) %{_bindir}/cget | |
72ce7982 | 170 | %attr(755,root,root) %{_bindir}/cherokee-tweak |
8c2165c6 | 171 | %attr(755,root,root) %{_bindir}/spawn-fcgi |
01d41beb | 172 | %attr(755,root,root) %{_sbindir}/cherokee |
8c2165c6 | 173 | %attr(755,root,root) %{_sbindir}/cherokee-admin |
3319fba3 KK |
174 | %attr(755,root,root) %{_sbindir}/cherokee-panic |
175 | %attr(755,root,root) %{_sbindir}/cherokee-worker | |
01d41beb | 176 | |
0e85b34f | 177 | %dir %{_libdir}/cherokee |
1bdedc57 | 178 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_admin.so |
72ce7982 | 179 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_and.so |
01d41beb ER |
180 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_cgi.so |
181 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_combined.so | |
182 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_common.so | |
3319fba3 KK |
183 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_custom_error.so |
184 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_dbslayer.so | |
185 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_deflate.so | |
72ce7982 | 186 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_directory.so |
01d41beb | 187 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_dirlist.so |
3319fba3 | 188 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_error_nn.so |
01d41beb | 189 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_error_redir.so |
72ce7982 | 190 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_extensions.so |
01d41beb | 191 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_fastcgi.so |
8c2165c6 | 192 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_fcgi.so |
01d41beb | 193 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_file.so |
0a169935 | 194 | %{?with_geoip:%attr(755,root,root) %{_libdir}/cherokee/libplugin_geoip.so} |
01d41beb | 195 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_gzip.so |
72ce7982 | 196 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_header.so |
01d41beb ER |
197 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_htdigest.so |
198 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_htpasswd.so | |
8c2165c6 PZ |
199 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_ldap.so |
200 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_mirror.so | |
201 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_mysql.so | |
01d41beb | 202 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_ncsa.so |
72ce7982 PZ |
203 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_not.so |
204 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_or.so | |
01d41beb ER |
205 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_pam.so |
206 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_phpcgi.so | |
207 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_plain.so | |
3319fba3 | 208 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_proxy.so |
01d41beb | 209 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_redir.so |
72ce7982 | 210 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_request.so |
8c2165c6 PZ |
211 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_round_robin.so |
212 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_scgi.so | |
01d41beb ER |
213 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_server_info.so |
214 | %attr(755,root,root) %{_libdir}/cherokee/libplugin_w3c.so | |
215 | %attr(755,root,root) %{_libdir}/libcherokee-base.so.*.*.* | |
72ce7982 | 216 | %attr(755,root,root) %ghost %{_libdir}/libcherokee-base.so.0 |
01d41beb | 217 | %attr(755,root,root) %{_libdir}/libcherokee-client.so.*.*.* |
72ce7982 | 218 | %attr(755,root,root) %ghost %{_libdir}/libcherokee-client.so.0 |
01d41beb | 219 | %attr(755,root,root) %{_libdir}/libcherokee-config.so.*.*.* |
72ce7982 | 220 | %attr(755,root,root) %ghost %{_libdir}/libcherokee-config.so.0 |
01d41beb | 221 | %attr(755,root,root) %{_libdir}/libcherokee-server.so.*.*.* |
72ce7982 | 222 | %attr(755,root,root) %ghost %{_libdir}/libcherokee-server.so.0 |
01d41beb | 223 | |
01d41beb | 224 | %{_mandir}/man1/cget.1* |
72ce7982 PZ |
225 | %{_mandir}/man1/cherokee.1* |
226 | %{_mandir}/man1/cherokee-admin.1* | |
3319fba3 KK |
227 | %{_mandir}/man1/cherokee-tweak.1* |
228 | %{_mandir}/man1/cherokee-worker.1* | |
229 | # Conflicts: lighttpd | |
230 | #%%{_mandir}/man1/spawn-fcgi.1* | |
01d41beb | 231 | |
72ce7982 PZ |
232 | %dir %{_datadir}/cherokee |
233 | %dir %{_datadir}/cherokee/admin | |
234 | %{_datadir}/cherokee/admin/cherokee.conf.sample | |
235 | %{_datadir}/cherokee/admin/*.html | |
236 | %attr(755,root,root) %{_datadir}/cherokee/admin/*.py | |
237 | %{_datadir}/cherokee/admin/static | |
238 | %{_datadir}/cherokee/deps | |
239 | %{_datadir}/cherokee/icons | |
240 | %{_datadir}/cherokee/mime_types.txt | |
241 | %{_datadir}/cherokee/themes | |
01d41beb ER |
242 | |
243 | %dir %{_wwwhome} | |
0adbe1dc ER |
244 | %dir %{_wwwroot} |
245 | %config(missingok) %{_wwwroot}/* | |
246 | ||
3319fba3 | 247 | %dir %attr(750,cherokee,logs) /var/log/%{name} |
0e85b34f | 248 | |
249 | %files devel | |
8c503f01 | 250 | %defattr(644,root,root,755) |
0e85b34f | 251 | %attr(755,root,root) %{_bindir}/cherokee-config |
01d41beb ER |
252 | |
253 | %{_libdir}/libcherokee-base.la | |
72ce7982 | 254 | %attr(755,root,root) %{_libdir}/libcherokee-base.so |
01d41beb | 255 | %{_libdir}/libcherokee-client.la |
72ce7982 | 256 | %attr(755,root,root) %{_libdir}/libcherokee-client.so |
01d41beb | 257 | %{_libdir}/libcherokee-config.la |
72ce7982 | 258 | %attr(755,root,root) %{_libdir}/libcherokee-config.so |
01d41beb | 259 | %{_libdir}/libcherokee-server.la |
72ce7982 | 260 | %attr(755,root,root) %{_libdir}/libcherokee-server.so |
01d41beb | 261 | |
8c503f01 JB |
262 | %{_includedir}/cherokee |
263 | %{_pkgconfigdir}/cherokee.pc | |
264 | %{_aclocaldir}/cherokee.m4 | |
265 | %{_mandir}/man1/cherokee-config.1* |