]> git.pld-linux.org Git - packages/cherokee.git/blob - cherokee.spec
- log output and workaround for broken -b
[packages/cherokee.git] / cherokee.spec
1 %bcond_without  php             # adds PHP support
2 %bcond_with     mono    # adds ASPX support
3 %bcond_with     gnomevfs        # compile the gnomevfs handler (broken)
4 %bcond_without  gnutls  # build with tls=gnutls
5 %bcond_with     openssl # build with tls=openssl
6 #
7 %if %{with gnutls} || %{with openssl}
8 %define with_tls 1
9 %endif
10 Summary:        Fast, Flexible and Lightweight Web server
11 Summary(pl):    Cherokee - serwer WWW
12 Name:           cherokee
13 Version:        0.4.29
14 Release:        0.7
15 License:        GPL v2
16 Group:          Networking/Daemons
17 Source0:        http://www.0x50.org/download/0.4/0.4.29/%{name}-%{version}.tar.gz
18 # Source0-md5:  854e6e61a69781746496012658d8ef98
19 Source1:        %{name}.init
20 Source2:        %{name}.sysconfig
21 Patch0:         %{name}-config.patch
22 Patch1:         %{name}-php-path.patch
23 URL:            http://www.0x50.org/
24 BuildRequires:  autoconf
25 BuildRequires:  automake
26 BuildRequires:  fcgi-devel
27 %{?with_gnomevfs:BuildRequires: gnome-vfs2-devel >= 2.0}
28 %{?with_gnutls:BuildRequires:   gnutls-devel >= 0.9.99}
29 %{?with_openssl:BuildRequires:  openssl-devel}
30 BuildRequires:  pam-devel
31 BuildRequires:  pcre-devel
32 BuildRequires:  pkgconfig
33 BuildRequires:  rpmbuild(macros) >= 1.268
34 BuildRequires:  zlib-devel
35 Requires(post,postun):  /sbin/ldconfig
36 Requires(post,preun):   rc-scripts
37 Requires(postun):       /usr/sbin/groupdel
38 Requires(postun):       /usr/sbin/userdel
39 Requires(pre):  /bin/id
40 Requires(pre):  /usr/bin/getgid
41 Requires(pre):  /usr/sbin/groupadd
42 Requires(pre):  /usr/sbin/useradd
43 Provides:       group(cherokee)
44 Provides:       group(http)
45 Provides:       user(cherokee)
46 Provides:       webserver
47 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
48
49 %define         _sysconfdir     /etc/cherokee
50 %define         _wwwhome        /home/services/%{name}
51 %define         _wwwroot        %{_wwwhome}/html
52
53 %description
54 Cherokee is a flexible, very fast, lightweight Web server. It is
55 implemented entirely in C, and has no dependencies beyond a standard C
56 library. It is embeddable and extensible wi th plug-ins. It supports
57 on-the-fly configuration by reading files or strings, TLS/SSL (via
58 GNUTLS or OpenSSL), virtual hosts, authentication, cache friendly
59 features, PHP, custom error management, and much more.
60
61 %description -l pl
62 Cherokee to serwer WWW:
63 - SZYBKI i ma³y
64 - mo¿liwy do wbudowania
65 - rozszerzalny przy pomocy wtyczek
66 - z mo¿liwo¶ci± przypisania sposobu obs³ugi do ¶cie¿ek
67 - z obs³ug± serwerów wirtualnych
68 - z obs³ug± FastCGI
69 - z obs³ug± kodowania, w tym GZipa
70 - z obs³ug± loggerów, w tym NCSA
71 - z dynamiczn± lub statyczn± kompilacj± wtyczek
72 - z obs³ug± strumieni
73 - wykonuj±cy popularne zadania: praca jako demon, obs³uga typów MIME,
74   logowanie poprzez sysloga, po³±czenia keep-alive, dzia³anie w
75   ¶rodowisku chrootowanym
76 - o przejrzystym kodzie ;-)
77 - bêd±cy oprogramowaniem wolnodostêpnym.
78
79 %package devel
80 Summary:        Header files for Cherokee web server
81 Summary(pl):    Pliki nag³ówkowe dla serwera WWW Cherokee
82 Group:          Development/Libraries
83 Requires:       %{name} = %{version}
84
85 %description devel
86 Header files for Cherokee web server.
87
88 %description devel -l pl
89 Pliki nag³ówkowe dla serwera WWW Cherokee.
90
91 %prep
92 %setup -q
93 %patch0 -p1
94 %patch1 -p1
95
96 %build
97 %{__aclocal} -I m4
98 %{__autoconf}
99 %{__autoheader}
100 %{__automake}
101 %configure \
102         --sysconfdir=/etc \
103         --enable-os-string="PLD Linux" \
104         --with-wwwroot=%{_wwwroot} \
105         --disable-static \
106         %{?with_gnomevfs:--enable-gnomevfs} \
107         %{?with_tls:--enable-tls=%{?with_gnutls:gnutls}%{?with_openssl:openssl}} \
108         --enable-pthreads \
109         %{?with_php:--with-php=%{_prefix}} \
110         %{?with_mono:--with-mono=DIR}
111
112 %{__make}
113
114 %install
115 rm -rf $RPM_BUILD_ROOT
116 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
117
118 %{__make} install \
119         DESTDIR=$RPM_BUILD_ROOT
120
121 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
122 install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
123
124 # users don't need this
125 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/cherokee-panic
126 mv $RPM_BUILD_ROOT{%{_bindir},%{_sbindir}}/cherokee_logrotate
127
128 # modules dlopened by *.so
129 rm -f $RPM_BUILD_ROOT%{_libdir}/cherokee/lib*.la
130
131 # unify manual dir
132 rm -rf html
133 mv $RPM_BUILD_ROOT%{_docdir}/%{name} html
134
135 %clean
136 rm -rf $RPM_BUILD_ROOT
137
138 %pre
139 %groupadd -g 161 cherokee
140 %groupadd -g 51 http
141 %useradd -u 161 -d %{_wwwhome} -c "Cherokee User" -g cherokee cherokee
142 %addusertogroup cherokee http
143
144 %post
145 /sbin/ldconfig
146 /sbin/chkconfig --add %{name}
147 %service %{name} restart "Cherokee webserver"
148
149 %preun
150 if [ "$1" = "0" ]; then
151         %service %{name} stop
152         /sbin/chkconfig --del %{name}
153 fi
154
155 %postun
156 /sbin/ldconfig
157 if [ "$1" = "0" ]; then
158         %userremove lighttpd
159         %groupremove lighttpd
160         %groupremove http
161 fi
162
163 %files
164 %defattr(644,root,root,755)
165 %doc AUTHORS ChangeLog TODO html
166 %dir %{_sysconfdir}
167 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/cherokee.conf
168 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/icons.conf
169 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/advanced.conf
170 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.conf
171 %dir %{_sysconfdir}/mods-available
172 %dir %{_sysconfdir}/mods-enabled
173 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mods-available/admin
174 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mods-available/ssl
175 %dir %{_sysconfdir}/sites-available
176 %dir %{_sysconfdir}/sites-enabled
177 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites-available/default
178 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/sites-available/example.com
179 %config(missingok) %{_sysconfdir}/sites-enabled/default
180 %attr(750,root,root) %dir %{_sysconfdir}/ssl
181
182 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cherokee
183 %attr(754,root,root) /etc/rc.d/init.d/cherokee
184
185 %attr(755,root,root) %{_bindir}/cget
186 %attr(755,root,root) %{_sbindir}/cherokee
187 %attr(755,root,root) %{_sbindir}/cherokee-panic
188 %attr(755,root,root) %{_sbindir}/cherokee_logrotate
189
190 %dir %{_libdir}/cherokee
191 %attr(755,root,root) %{_libdir}/cherokee/libplugin_admin.so
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
195 %attr(755,root,root) %{_libdir}/cherokee/libplugin_dirlist.so
196 %attr(755,root,root) %{_libdir}/cherokee/libplugin_error_redir.so
197 %attr(755,root,root) %{_libdir}/cherokee/libplugin_fastcgi.so
198 %attr(755,root,root) %{_libdir}/cherokee/libplugin_file.so
199 %attr(755,root,root) %{_libdir}/cherokee/libplugin_gzip.so
200 %attr(755,root,root) %{_libdir}/cherokee/libplugin_htdigest.so
201 %attr(755,root,root) %{_libdir}/cherokee/libplugin_htpasswd.so
202 %attr(755,root,root) %{_libdir}/cherokee/libplugin_ncsa.so
203 %attr(755,root,root) %{_libdir}/cherokee/libplugin_nn.so
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
207 %attr(755,root,root) %{_libdir}/cherokee/libplugin_read_config.so
208 %attr(755,root,root) %{_libdir}/cherokee/libplugin_redir.so
209 %attr(755,root,root) %{_libdir}/cherokee/libplugin_server_info.so
210 %attr(755,root,root) %{_libdir}/cherokee/libplugin_w3c.so
211 %attr(755,root,root) %{_libdir}/libcherokee-base.so.*.*.*
212 %attr(755,root,root) %{_libdir}/libcherokee-client.so.*.*.*
213 %attr(755,root,root) %{_libdir}/libcherokee-config.so.*.*.*
214 %attr(755,root,root) %{_libdir}/libcherokee-server.so.*.*.*
215
216 %{_mandir}/man1/cherokee.1*
217 %{_mandir}/man1/cget.1*
218 %{_mandir}/man1/cherokee_logrotate.1*
219
220 %{_datadir}/cherokee
221
222 %dir %{_wwwhome}
223 %{_wwwroot}
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.134125 seconds and 3 git commands to generate.