]> git.pld-linux.org Git - packages/cherokee.git/blob - cherokee.spec
- 0.6.1
[packages/cherokee.git] / cherokee.spec
1 #
2 # Conditional build:
3 %bcond_without  php             # adds PHP support
4 %bcond_with     mono            # adds ASPX support
5 %bcond_without  gnutls          # build with tls=gnutls
6 %bcond_with     openssl         # build with tls=openssl
7 #
8 %if %{with gnutls} || %{with openssl}
9 %define with_tls 1
10 %endif
11 Summary:        Fast, Flexible and Lightweight Web server
12 Summary(pl.UTF-8):      Cherokee - serwer WWW
13 Name:           cherokee
14 Version:        0.6.1
15 Release:        0.1
16 License:        GPL v2
17 Group:          Networking/Daemons
18 Source0:        http://www.cherokee-project.com/download/0.6/0.6.1/%{name}-%{version}.tar.gz
19 # Source0-md5:  49044d6c9c50a6726a4e6c3c7f8ea544
20 Source1:        %{name}.init
21 Source2:        %{name}.sysconfig
22 Patch0:         %{name}-config.patch
23 Patch1:         %{name}-php-path.patch
24 URL:            http://www.0x50.org/
25 BuildRequires:  autoconf
26 BuildRequires:  automake
27 BuildRequires:  fcgi-devel
28 %{?with_gnutls:BuildRequires:   gnutls-devel >= 0.9.99}
29 BuildRequires:  mysql-devel
30 BuildRequires:  openldap-devel
31 %{?with_openssl:BuildRequires:  openssl-devel}
32 BuildRequires:  pam-devel
33 BuildRequires:  pcre-devel
34 BuildRequires:  pkgconfig
35 BuildRequires:  python-docutils
36 BuildRequires:  rpmbuild(macros) >= 1.268
37 BuildRequires:  zlib-devel
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)
49 Provides:       webserver
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %define         _sysconfdir     /etc/cherokee
53 %define         _wwwhome        /home/services/%{name}
54 %define         _wwwroot        %{_wwwhome}/html
55
56 %description
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
59 library. It is embeddable and extensible with plug-ins. It supports
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.
63
64 %description -l pl.UTF-8
65 Cherokee to elastyczny, bardzo szybki i lekki serwer WWW. Jest
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.
72
73 %package devel
74 Summary:        Header files for Cherokee web server
75 Summary(pl.UTF-8):      Pliki nagłówkowe dla serwera WWW Cherokee
76 Group:          Development/Libraries
77 Requires:       %{name} = %{version}-%{release}
78
79 %description devel
80 Header files for Cherokee web server.
81
82 %description devel -l pl.UTF-8
83 Pliki nagłówkowe dla serwera WWW Cherokee.
84
85 %prep
86 %setup -q
87 %patch0 -p1
88 %patch1 -p1
89
90 %build
91 %{__aclocal} -I m4
92 %{__autoconf}
93 %{__autoheader}
94 %{__automake}
95 %configure \
96         --sysconfdir=/etc \
97         --enable-os-string="PLD Linux" \
98         --with-wwwroot=%{_wwwroot} \
99         --disable-static \
100         %{?with_tls:--enable-tls=%{?with_gnutls:gnutls}%{?with_openssl:openssl}} \
101         --enable-pthreads \
102         %{?with_php:--with-php=%{_prefix}} \
103         %{?with_mono:--with-mono=DIR}
104
105 %{__make}
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109 install -d $RPM_BUILD_ROOT{/etc/{pam.d,sysconfig,rc.d/init.d},/var/log/%{name}}
110
111 %{__make} install \
112         DESTDIR=$RPM_BUILD_ROOT
113
114 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
115 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
116
117 # users don't need this
118 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/cherokee-panic
119 #mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/cherokee_logrotate
120
121 # modules dlopened by *.so
122 rm -f $RPM_BUILD_ROOT%{_libdir}/cherokee/lib*.la
123
124 # unify manual dir
125 rm -rf html
126 mv $RPM_BUILD_ROOT%{_docdir}/%{name} html
127
128 %clean
129 rm -rf $RPM_BUILD_ROOT
130
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
137 %post
138 /sbin/ldconfig
139 /sbin/chkconfig --add %{name}
140 %service %{name} restart "Cherokee webserver"
141 exit 0
142
143 %preun
144 if [ "$1" = "0" ]; then
145         %service %{name} stop
146         /sbin/chkconfig --del %{name}
147 fi
148
149 %postun
150 /sbin/ldconfig
151 if [ "$1" = "0" ]; then
152         %userremove cherokee
153         %groupremove cherokee
154         %groupremove http
155 fi
156
157 %files
158 %defattr(644,root,root,755)
159 %doc AUTHORS ChangeLog TODO html
160 %dir %attr(750,root,root) %{_sysconfdir}
161 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cherokee.conf
162 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.compression.types
163 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.types
164 %dir %attr(750,root,root) %{_sysconfdir}/mods-available
165 %dir %attr(750,root,root) %{_sysconfdir}/mods-enabled
166 %dir %attr(750,root,root) %{_sysconfdir}/sites-available
167 %dir %attr(750,root,root) %{_sysconfdir}/sites-enabled
168 %dir %attr(750,root,root) %{_sysconfdir}/ssl
169
170 %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/cherokee
171 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cherokee
172 %attr(754,root,root) /etc/rc.d/init.d/cherokee
173
174 %attr(755,root,root) %{_bindir}/cget
175 %attr(755,root,root) %{_bindir}/cherokee_tweak
176 %attr(755,root,root) %{_bindir}/spawn-fcgi
177 %attr(755,root,root) %{_sbindir}/cherokee
178 %attr(755,root,root) %{_sbindir}/cherokee-guardian
179 %attr(755,root,root) %{_sbindir}/cherokee-panic
180 %attr(755,root,root) %{_sbindir}/cherokee-admin
181
182 %dir %{_libdir}/cherokee
183 %attr(755,root,root) %{_libdir}/cherokee/libplugin_admin.so
184 %attr(755,root,root) %{_libdir}/cherokee/libplugin_cgi.so
185 %attr(755,root,root) %{_libdir}/cherokee/libplugin_combined.so
186 %attr(755,root,root) %{_libdir}/cherokee/libplugin_common.so
187 %attr(755,root,root) %{_libdir}/cherokee/libplugin_dirlist.so
188 %attr(755,root,root) %{_libdir}/cherokee/libplugin_error_redir.so
189 %attr(755,root,root) %{_libdir}/cherokee/libplugin_fastcgi.so
190 %attr(755,root,root) %{_libdir}/cherokee/libplugin_fcgi.so
191 %attr(755,root,root) %{_libdir}/cherokee/libplugin_file.so
192 %attr(755,root,root) %{_libdir}/cherokee/libplugin_gzip.so
193 %attr(755,root,root) %{_libdir}/cherokee/libplugin_htdigest.so
194 %attr(755,root,root) %{_libdir}/cherokee/libplugin_htpasswd.so
195 %attr(755,root,root) %{_libdir}/cherokee/libplugin_ldap.so
196 %attr(755,root,root) %{_libdir}/cherokee/libplugin_mirror.so
197 %attr(755,root,root) %{_libdir}/cherokee/libplugin_mysql.so
198 %attr(755,root,root) %{_libdir}/cherokee/libplugin_ncsa.so
199 %attr(755,root,root) %{_libdir}/cherokee/libplugin_nn.so
200 %attr(755,root,root) %{_libdir}/cherokee/libplugin_pam.so
201 %attr(755,root,root) %{_libdir}/cherokee/libplugin_phpcgi.so
202 %attr(755,root,root) %{_libdir}/cherokee/libplugin_plain.so
203 %attr(755,root,root) %{_libdir}/cherokee/libplugin_redir.so
204 %attr(755,root,root) %{_libdir}/cherokee/libplugin_round_robin.so
205 %attr(755,root,root) %{_libdir}/cherokee/libplugin_scgi.so
206 %attr(755,root,root) %{_libdir}/cherokee/libplugin_server_info.so
207 %attr(755,root,root) %{_libdir}/cherokee/libplugin_w3c.so
208 %attr(755,root,root) %{_libdir}/libcherokee-base.so.*.*.*
209 %attr(755,root,root) %{_libdir}/libcherokee-client.so.*.*.*
210 %attr(755,root,root) %{_libdir}/libcherokee-config.so.*.*.*
211 %attr(755,root,root) %{_libdir}/libcherokee-server.so.*.*.*
212
213 %{_mandir}/man1/cherokee.1*
214 %{_mandir}/man1/cget.1*
215 %{_mandir}/man1/cherokee_logrotate.1*
216
217 %{_datadir}/cherokee
218
219 %dir %{_wwwhome}
220 %dir %{_wwwroot}
221 %config(missingok) %{_wwwroot}/*
222
223 %dir %attr(750,root,logs) /var/log/%{name}
224
225 %files devel
226 %defattr(644,root,root,755)
227 %attr(755,root,root) %{_bindir}/cherokee-config
228
229 %{_libdir}/libcherokee-base.la
230 %{_libdir}/libcherokee-client.la
231 %{_libdir}/libcherokee-config.la
232 %{_libdir}/libcherokee-server.la
233
234 %{_includedir}/cherokee
235 %{_pkgconfigdir}/cherokee.pc
236 %{_aclocaldir}/cherokee.m4
237 %{_mandir}/man1/cherokee-config.1*
This page took 0.084899 seconds and 3 git commands to generate.