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