]> git.pld-linux.org Git - packages/lighttpd.git/blob - lighttpd.spec
- rel. 1.1: djurban, fix last change or revert it
[packages/lighttpd.git] / lighttpd.spec
1 # TODO:
2 # - test ldap and mysql (failed at this time)
3 # - mysql issue: http://www.freebsd.org/cgi/query-pr.cgi?pr=76866
4 # - fam over gamin is possible, just configure doesn't check other than gamin
5 # - feature stat-cache-fam (doesn't work)
6 #
7 # NOTES:
8 # - fcgi-devel is only used for the test-scripts
9 # - disable largefile, if you have 2.4 kernel to get sendfile() support, and don't need > 2GB file requests,
10 #   see http://article.gmane.org/gmane.comp.web.lighttpd:722
11 # - please make subpackages of modules that depend other modules than:
12 #  - pcre (core binary needs it too)
13 #  - openssl (core binary needs it too)
14 #
15 # Conditional build for lighttpd:
16 %bcond_without  xattr           # support of extended attributes
17 %bcond_without  ipv6            # IPv4-only version (doesn't require IPv6 in kernel)
18 %bcond_without  largefile       # largefile support (see notes above)
19 %bcond_without  ssl             # ssl support
20 %bcond_with     mysql           # mysql support in mod_mysql_vhost
21 %bcond_with     ldap            # ldap support in mod_auth
22 %bcond_with     lua             # LUA support in mod_cml
23 %bcond_with     memcache        # memcached support in mod_cml / mod_trigger_b4_dl
24 %bcond_with     gamin           # gamin for reducing number of stat() calls. 
25                                 # NOTE: must be enabled in config: server.stat-cache-engine = "fam"
26 %bcond_with     gdbm            # gdbm in mod_trigger_b4_dl
27 %bcond_with     webdav_props    # properties in mod_webdav (includes extra sqlite3/libxml deps)
28 %bcond_with     valgrind        # compile code with valgrind support.
29
30 # Prerelease snapshot: DATE-TIME
31 #define _snap 20050116-1743
32
33 %if 0%{?_snap}
34 %define _source http://www.lighttpd.net/download/%{name}-%{version}-%{_snap}.tar.gz
35 %else
36 %define _source http://www.lighttpd.net/download/%{name}-%{version}.tar.gz
37 %endif
38
39 %define         _rel 1.1
40
41 Summary:        Fast and light HTTP server
42 Summary(pl):    Szybki i lekki serwer HTTP
43 Name:           lighttpd
44 Version:        1.4.8
45 Release:        %{_rel}%{?_snap:.%(echo %{_snap}|tr - _)}
46 Group:          Networking/Daemons
47 License:        BSD
48 Source0:        %{_source}
49 # Source0-md5:  7d7790ef95ff5755f73bfcda4f13696d
50 Source1:        %{name}.init
51 Source2:        %{name}.conf
52 Source3:        %{name}.user
53 Source4:        %{name}.logrotate
54 Source5:        %{name}.sysconfig
55 Source6:        %{name}-mime.types.sh
56 Source7:        http://www.lighttpd.net/favicon.ico
57 # Source7-md5:  a358994becabd4060393a5454bde505d
58 Source8:        http://www.lighttpd.net/light_button.png
59 # Source8-md5:  02330e2313fadc29144edfd6000879f8
60 Source9:        http://www.lighttpd.net/light_logo.png
61 # Source9-md5:  ac20784510e420d5cbe5fc1cdb53d7a7
62 Source10:       http://gdl.hopto.org/~spider/pldstats/gfx/pld1.png
63 # Source10-md5: 486ecec3f6f4fe7f9bf7cee757b864f4
64 Source11:       lighttpd-pld.html
65 URL:            http://www.lighttpd.net/
66 %{?with_xattr:BuildRequires:    attr-devel}
67 BuildRequires:  autoconf
68 BuildRequires:  automake
69 BuildRequires:  bzip2-devel
70 %{?with_gamin:BuildRequires:    gamin-devel}
71 %{?with_gdbm:BuildRequires:     gdbm-devel}
72 %{?with_memcache:BuildRequires: libmemcache-devel}
73 BuildRequires:  libtool
74 %{?with_webdav_props:BuildRequires:     libxml2-devel}
75 %{?with_webdav_props:BuildRequires:     sqlite3-devel}
76 %{?with_lua:BuildRequires:      lua50-devel >= 5.0.2-5.1}
77 BuildRequires:  mailcap >= 2.1.14-4.4
78 %{?with_mysql:BuildRequires:    mysql-devel}
79 %{?with_ldap:BuildRequires:     openldap-devel}
80 %{?with_ssl:BuildRequires:      openssl-devel}
81 BuildRequires:  pcre-devel
82 BuildRequires:  pkgconfig
83 BuildRequires:  rpmbuild(macros) >= 1.202
84 %{?with_valgrind:BuildRequires: valgrind}
85 BuildRequires:  zlib-devel
86 PreReq:         rc-scripts
87 Requires(pre):  sh-utils
88 Requires(pre):  /bin/id
89 Requires(pre):  /usr/bin/getgid
90 Requires(pre):  /usr/sbin/groupadd
91 Requires(pre):  /usr/sbin/useradd
92 Requires(post,preun):   /sbin/chkconfig
93 Requires(postun):       /usr/sbin/groupdel
94 Requires(postun):       /usr/sbin/userdel
95 Provides:       group(lighttpd)
96 Provides:       httpd
97 Provides:       user(lighttpd)
98 Provides:       webserver
99 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
100
101 %define         _libdir         %{_prefix}/%{_lib}/%{name}
102 %define         _lighttpddir    /home/services/%{name}
103 %define         _sysconfdir     /etc/%{name}
104
105 %description
106 lighttpd is a secure, fast, compliant and very flexible web-server
107 which has been optimized for high-performance environments. It has a
108 very low memory footprint compared to other webservers and takes care
109 of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth,
110 Output-Compression, URL-Rewriting and many more) make lighttpd the
111 perfect webserver-software for every server that is suffering load
112 problems.
113
114 %description -l pl
115 lighttpd jest bezpiecznym, szybkim, przyjaznym i bardzo elastycznym
116 serwerem WWW, który zosta³ zoptymalizowany pod k±tem
117 wysokowydajno¶ciowych ¶rodowisk. Zajmuje bardzo ma³± ilo¶æ pamiêci w
118 porównaniu do innych serwerów WWW oraz dba o zajêto¶æ procesora.
119 Szeroki zestaw opcji (FastCGI, CGI, uwierzytelnianie, kompresja
120 wyj¶cia, przepisywanie URL-i i wiele innych) czyni± z lighttpd
121 doskona³e oprogramowanie web-serwerowe na ka¿dy serwer cierpi±cy z
122 powodu problemów z obci±¿eniem.
123
124 %package mod_compress
125 Summary:        Output Compression
126 Summary(pl):    Kompresja wyj¶cia
127 Group:          Networking/Daemons
128 URL:            http://www.lighttpd.net/documentation/compress.html
129 Requires:       %{name} = %{version}-%{release}
130
131 %description mod_compress
132 Output compression reduces the network load and can improve the
133 overall throughput of the webserver.
134
135 Only static content is supported up to now.
136
137 The server negotiates automatically which compression method is used.
138 Supported are gzip, deflate, bzip.
139
140 %description mod_compress -l pl
141 Kompresja wyj¶cia zmniejsza obci±¿enie sieci i mo¿e poprawiæ ca³kowit±
142 przepustowo¶æ serwera WWW.
143
144 Jak na razie obs³ugiwana jest tylko statyczna tre¶æ.
145
146 Serwer automatycznie negocjuje, która metoda kompresji jest u¿ywana.
147 Obs³ugiwane s± gzip, deflate i bzip.
148
149 %package mod_cml
150 Summary:        Cache Meta Language module
151 Summary(pl):    Modu³ Cache Meta Language
152 Group:          Networking/Daemons
153 URL:            http://www.lighttpd.net/documentation/cml.html
154 Requires:       %{name} = %{version}-%{release}
155
156 %description mod_cml
157 CML is a Meta language to describe the dependencies of a page at one
158 side and building a page from its fragments on the other side using
159 LUA.
160
161 %description mod_cml -l pl
162 CML to metajêzyk s³u¿±cy z jednej strony do opisu zale¿no¶ci strony i
163 z drugiej strony do budowania strony z fragmentów przy u¿yciu LUA.
164
165 %package mod_mysql_vhost
166 Summary:        MySQL based vhosting
167 Summary(pl):    vhosty oparte na MySQL-u
168 Group:          Networking/Daemons
169 URL:            http://www.lighttpd.net/documentation/mysqlvhost.html
170 Requires:       %{name} = %{version}-%{release}
171
172 %description mod_mysql_vhost
173 This module provides virtual hosts (vhosts) based on a MySQL table.
174
175 %description mod_mysql_vhost -l pl
176 Ten modu³ udostêpnia wirtualne hosty (vhosty) oparte na tabeli MySQL.
177
178 %package mod_trigger_b4_dl
179 Summary:        Trigger before Download
180 Summary(pl):    Wyzwalacz przed ¶ci±ganiem
181 Group:          Networking/Daemons
182 URL:            http://www.lighttpd.net/documentation/trigger_b4_dl.html
183 Requires:       %{name} = %{version}-%{release}
184
185 %description mod_trigger_b4_dl
186 Another anti hot-linking module.
187
188 %description mod_trigger_b4_dl -l pl
189 Jeszcze jeden modu³ blokuj±cy bezpo¶rednie linkowanie.
190
191 %package mod_webdav
192 Summary:        WebDAV module for lighttpd
193 Summary(pl):    Modu³ WebDAV dla libghttpd
194 Group:          Networking/Daemons
195 URL:            http://www.lighttpd.net/documentation/webdav.html
196 Requires:       %{name} = %{version}-%{release}
197
198 %description mod_webdav
199 The WebDAV module is a very minimalistic implementation of RFC 2518.
200 Minimalistic means that not all operations are implementated yet.
201
202 So far we have
203 - PROPFIND
204 - OPTIONS
205 - MKCOL
206 - DELETE
207 - PUT
208
209 and the usual GET, POST, HEAD from HTTP/1.1.
210
211 So far mounting a webdav resource into Windows XP works and the basic
212 litmus tests are passed.
213
214 %description mod_webdav -l pl
215 Modu³ WebDAV to bardzo minimalistyczna implementacja RFC 2518.
216 Minimalistyczna oznacza, ¿e jeszcze nie wszystkie operacje s±
217 zaimplementowane. Jak na razie s±:
218 - PROPFIND
219 - OPTIONS
220 - MKCOL
221 - DELETE
222 - PUT
223 oraz zwyk³e GET, POST, HEAD z HTTP/1.1.
224
225 Jak na razie montowanie zasobu webdav pod Windows XP dzia³a i
226 podstawowe testy lakmusowe przechodz±.
227
228 %package -n spawn-fcgi
229 Summary:        Spawn fcgi-process directly
230 Summary(pl):    Bezpo¶rednie uruchamianie procesów fcgi
231 Group:          Applications
232
233 %description -n spawn-fcgi
234 spawn-fcgi is used to spawn fcgi-process directly without the help of
235 a webserver or the programm itself.
236
237 %description -n spawn-fcgi -l pl
238 spawn-fcgi s³u¿y do uruchamiania procesów fcgi bezpo¶rednio, bez
239 pomocy serwera WWW ani samego programu.
240
241 %prep
242 %setup -q
243 install %{SOURCE6} mime.types.sh
244
245 # build mime.types.conf
246 ./mime.types.sh /etc/mime.types
247
248 %build
249 %{__libtoolize}
250 %{__aclocal}
251 %{__autoconf}
252 %{__automake}
253
254 %configure \
255         %{!?with_ipv6:--disable-ipv6} \
256         %{!?with_largefile:--disable-lfs} \
257         %{?with_valgrind:--with-valgrind} \
258         %{?with_xattr:--with-attr} \
259         %{?with_mysql:--with-mysql} \
260         %{?with_ldap:--with-ldap} \
261         %{?with_ssl:--with-openssl} \
262         %{?with_lua:--with-lua} \
263         %{?with_memcache:--with-memcache} \
264         %{?with_webdav_props:--with-webdav-props} \
265         %{?with_gamin:--with-gamin} \
266         %{?with_gdbm:--with-gdbm}
267
268 %{__make}
269
270 %install
271 rm -rf $RPM_BUILD_ROOT
272 install -d $RPM_BUILD_ROOT{%{_lighttpddir}/{cgi-bin,html},/etc/{logrotate.d,rc.d/init.d,sysconfig}} \
273         $RPM_BUILD_ROOT%{_sysconfdir}/webapps.d \
274         $RPM_BUILD_ROOT/var/log/{%{name},archiv/%{name}}
275
276 %{__make} install \
277         DESTDIR=$RPM_BUILD_ROOT
278
279 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
280 install %{SOURCE2} %{SOURCE3} mime.types.conf $RPM_BUILD_ROOT%{_sysconfdir}
281 install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
282 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
283
284 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
285
286 # could use automake patch, but automake generation fails...
287 mv $RPM_BUILD_ROOT%{_bindir}/spawn-fcgi $RPM_BUILD_ROOT%{_sbindir}/spawn-fcgi
288
289 %if %{without mysql}
290 rm -f $RPM_BUILD_ROOT%{_libdir}/mod_mysql_vhost.so
291 %endif
292
293 # Install lighttpd images
294 install %{SOURCE7} %{SOURCE8} %{SOURCE9} $RPM_BUILD_ROOT%{_lighttpddir}/html
295 install %{SOURCE10} $RPM_BUILD_ROOT%{_lighttpddir}/html/pld_button.png
296 install %{SOURCE11} $RPM_BUILD_ROOT%{_lighttpddir}/html/index.html
297
298 %clean
299 rm -rf $RPM_BUILD_ROOT
300
301 %pre
302 %groupadd -g 109 lighttpd
303 %groupadd -g 51 http
304 %addusertogroup lighttpd http
305 %useradd -u 116 -d %{_lighttpddir} -c "HTTP User" -g lighttpd lighttpd,httpd
306
307 %post
308 /sbin/chkconfig --add %{name}
309 if [ -f /var/lock/subsys/%{name} ]; then
310         /etc/rc.d/init.d/%{name} restart 1>&2
311 else
312         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
313 fi
314
315 %preun
316 if [ "$1" = "0" ]; then
317         if [ -f /var/lock/subsys/%{name} ]; then
318                 /etc/rc.d/init.d/%{name} stop 1>&2
319         fi
320         /sbin/chkconfig --del %{name}
321 fi
322
323 %postun
324 if [ "$1" = "0" ]; then
325         %userremove lighttpd
326         %groupremove lighttpd
327         %groupremove http
328 fi
329
330 %triggerpostun -- %{name} <= 1.3.6-2
331 # upgraded
332 if [ "$1" = "2" ]; then
333 %banner %{name} -e <<EOF
334 spawn-fcgi program is now available separately from spawn-fcgi package.
335
336 EOF
337 fi
338
339 %files
340 %defattr(644,root,root,755)
341 %doc NEWS README ChangeLog doc/lighttpd.conf doc/*.txt doc/rrdtool-graph.sh
342 %dir %attr(750,root,lighttpd) %{_sysconfdir}
343 # FIXME: accessible by webapps?
344 %dir %attr(750,root,lighttpd) %{_sysconfdir}/webapps.d
345 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
346 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.types.conf
347 %attr(640,root,lighttpd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.user
348
349 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
350 %attr(750,root,root) %dir /var/log/archiv/%{name}
351 %dir %attr(750,lighttpd,root) /var/log/%{name}
352 %attr(754,root,root) /etc/rc.d/init.d/%{name}
353 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
354 %attr(755,root,root) %{_sbindir}/*
355 %dir %{_libdir}
356 %attr(755,root,root) %{_libdir}/mod_access.so
357 %attr(755,root,root) %{_libdir}/mod_accesslog.so
358 %attr(755,root,root) %{_libdir}/mod_alias.so
359 %attr(755,root,root) %{_libdir}/mod_auth.so
360 %attr(755,root,root) %{_libdir}/mod_cgi.so
361 %attr(755,root,root) %{_libdir}/mod_dirlisting.so
362 %attr(755,root,root) %{_libdir}/mod_evhost.so
363 %attr(755,root,root) %{_libdir}/mod_expire.so
364 %attr(755,root,root) %{_libdir}/mod_fastcgi.so
365 %attr(755,root,root) %{_libdir}/mod_indexfile.so
366 %attr(755,root,root) %{_libdir}/mod_proxy.so
367 %attr(755,root,root) %{_libdir}/mod_redirect.so
368 %attr(755,root,root) %{_libdir}/mod_rewrite.so
369 %attr(755,root,root) %{_libdir}/mod_rrdtool.so
370 %attr(755,root,root) %{_libdir}/mod_scgi.so
371 %attr(755,root,root) %{_libdir}/mod_secdownload.so
372 %attr(755,root,root) %{_libdir}/mod_setenv.so
373 %attr(755,root,root) %{_libdir}/mod_simple_vhost.so
374 %attr(755,root,root) %{_libdir}/mod_ssi.so
375 %attr(755,root,root) %{_libdir}/mod_staticfile.so
376 %attr(755,root,root) %{_libdir}/mod_status.so
377 %attr(755,root,root) %{_libdir}/mod_userdir.so
378 %attr(755,root,root) %{_libdir}/mod_usertrack.so
379 %{_mandir}/man?/*
380
381 %dir %{_lighttpddir}
382 %dir %{_lighttpddir}/cgi-bin
383 %dir %{_lighttpddir}/html
384 %{_lighttpddir}/html/*
385
386 %files mod_compress
387 %defattr(644,root,root,755)
388 %attr(755,root,root) %{_libdir}/mod_compress.so
389
390 %files mod_cml
391 %defattr(644,root,root,755)
392 %attr(755,root,root) %{_libdir}/mod_cml.so
393
394 %if %{with mysql}
395 %files mod_mysql_vhost
396 %defattr(644,root,root,755)
397 %attr(755,root,root) %{_libdir}/mod_mysql_vhost.so
398 %endif
399
400 %files mod_trigger_b4_dl
401 %defattr(644,root,root,755)
402 %attr(755,root,root) %{_libdir}/mod_trigger_b4_dl.so
403
404 %files mod_webdav
405 %defattr(644,root,root,755)
406 %attr(755,root,root) %{_libdir}/mod_webdav.so
407
408 %files -n spawn-fcgi
409 %defattr(644,root,root,755)
410 %doc doc/spawn-php.sh
411 %attr(755,root,root) %{_sbindir}/spawn-fcgi
This page took 0.053244 seconds and 4 git commands to generate.