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 # - lua50 isn't properly detected
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)
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. NOTE: must be enabled in config: server.stat-cache-engine = "fam"
25 %bcond_with gdbm # gdbm in mod_trigger_b4_dl
26 %bcond_with webdav_props # properties in mod_webdav (includes extra sqlite3/libxml deps)
27 %bcond_with valgrind # compile code with valgrind support.
28 %bcond_with dirhide # with 'hide from dirlisting' hack
30 # Prerelease snapshot: DATE-TIME
31 #define _snap 20050116-1743
34 %define _source http://www.lighttpd.net/download/%{name}-%{version}-%{_snap}.tar.gz
36 %define _source http://www.lighttpd.net/download/%{name}-%{version}.tar.gz
41 Summary: Fast and light HTTP server
42 Summary(pl): Szybki i lekki serwer HTTP
45 Release: %{_rel}%{?_snap:.%(echo %{_snap}|tr - _)}
46 Group: Networking/Daemons
49 # Source0-md5: c26eea734490129a45e465ac0f327e4a
53 Source4: %{name}.logrotate
54 Source5: %{name}.sysconfig
55 Patch0: http://minghetti.ch/blob/dirlist-hide.patch
56 Patch1: %{name}-fcgi-verbose.patch
57 Patch2: %{name}-ssl-redirect-fix.patch
58 Patch3: %{name}-lua-pkgconfig.patch
59 URL: http://www.lighttpd.net/
60 %{?with_xattr:BuildRequires: attr-devel}
61 BuildRequires: autoconf
62 BuildRequires: automake
63 BuildRequires: bzip2-devel
64 %{?with_gamin:BuildRequires: gamin-devel}
65 %{?with_webdav_props:BuildRequires: sqlite3-devel}
66 %{?with_webdav_props:BuildRequires: libxml2-devel}
67 BuildRequires: libtool
68 %{?with_mysql:BuildRequires: mysql-devel}
69 %{?with_ldap:BuildRequires: openldap-devel}
70 %{?with_ssl:BuildRequires: openssl-devel}
71 %{?with_lua:BuildRequires: lua50-devel >= 5.0.2-4.1}
72 %{?with_memcache:BuildRequires: libmemcache-devel}
73 %{?with_gdbm:BuildRequires: gdbm-devel}
74 BuildRequires: pcre-devel
75 BuildRequires: rpmbuild(macros) >= 1.202
76 %{?debug:BuildRequires: valgrind}
77 BuildRequires: zlib-devel
79 Requires(pre): sh-utils
80 Requires(pre): /bin/id
81 Requires(pre): /usr/bin/getgid
82 Requires(pre): /usr/sbin/groupadd
83 Requires(pre): /usr/sbin/useradd
84 Requires(post,preun): /sbin/chkconfig
85 Requires(postun): /usr/sbin/groupdel
86 Requires(postun): /usr/sbin/userdel
87 Provides: group(lighttpd)
89 Provides: user(lighttpd)
91 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
93 %define _libdir %{_prefix}/%{_lib}/%{name}
94 %define _lighttpddir /home/services/%{name}
95 %define _sysconfdir /etc/%{name}
98 lighttpd is a secure, fast, compliant and very flexible web-server
99 which has been optimized for high-performance environments. It has a
100 very low memory footprint compared to other webservers and takes care
101 of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth,
102 Output-Compression, URL-Rewriting and many more) make lighttpd the
103 perfect webserver-software for every server that is suffering load
107 lighttpd jest bezpiecznym, szybkim, przyjaznym i bardzo elastycznym
108 serwerem WWW, który zosta³ zoptymalizowany pod k±tem
109 wysokowydajno¶ciowych ¶rodowisk. Zajmuje bardzo ma³± ilo¶æ pamiêci w
110 porównaniu do innych serwerów WWW oraz dba o zajêto¶æ procesora.
111 Szeroki zestaw opcji (FastCGI, CGI, uwierzytelnianie, kompresja
112 wyj¶cia, przepisywanie URL-i i wiele innych) czyni± z lighttpd
113 doskona³e oprogramowanie web-serwerowe na ka¿dy serwer cierpi±cy z
114 powodu problemów z obci±¿eniem.
116 %package mod_compress
117 Summary: Output Compression
118 Summary(pl): Kompresja wyj¶cia
119 Group: Networking/Daemons
120 URL: http://www.lighttpd.net/documentation/compress.html
121 Requires: %{name} = %{version}-%{release}
123 %description mod_compress
124 Output compression reduces the network load and can improve the
125 overall throughput of the webserver.
127 Only static content is supported up to now.
129 The server negotiates automatically which compression method is used.
130 Supported are gzip, deflate, bzip.
132 %description mod_compress -l pl
133 Kompresja wyj¶cia zmniejsza obci±¿enie sieci i mo¿e poprawiæ ca³kowit±
134 przepustowo¶æ serwera WWW.
136 Jak na razie obs³ugiwana jest tylko statyczna tre¶æ.
138 Serwer automatycznie negocjuje, która metoda kompresji jest u¿ywana.
139 Obs³ugiwane s± gzip, deflate i bzip.
142 Summary: Cache Meta Language module
143 Summary(pl): Modu³ Cache Meta Language
144 Group: Networking/Daemons
145 URL: http://www.lighttpd.net/documentation/cml.html
146 Requires: %{name} = %{version}-%{release}
149 CML is a Meta language to describe the dependencies of a page at one
150 side and building a page from its fragments on the other side using
153 %description mod_cml -l pl
154 CML to metajêzyk s³u¿±cy z jednej strony do opisu zale¿no¶ci strony i
155 z drugiej strony do budowania strony z fragmentów przy u¿yciu LUA.
157 %package mod_mysql_vhost
158 Summary: MySQL based vhosting
159 Summary(pl): vhosty oparte na MySQL-u
160 Group: Networking/Daemons
161 URL: http://www.lighttpd.net/documentation/mysqlvhost.html
162 Requires: %{name} = %{version}-%{release}
164 %description mod_mysql_vhost
165 This module provides virtual hosts (vhosts) based on a MySQL table.
167 %description mod_mysql_vhost -l pl
168 Ten modu³ udostêpnia wirtualne hosty (vhosty) oparte na tabeli MySQL.
170 %package mod_trigger_b4_dl
171 Summary: Trigger before Download
172 Summary(pl): Wyzwalacz przed ¶ci±ganiem
173 Group: Networking/Daemons
174 URL: http://www.lighttpd.net/documentation/trigger_b4_dl.html
175 Requires: %{name} = %{version}-%{release}
177 %description mod_trigger_b4_dl
178 Another anti hot-linking module.
180 %description mod_trigger_b4_dl -l pl
181 Jeszcze jeden modu³ blokuj±cy bezpo¶rednie linkowanie.
184 Summary: WebDAV module for lighttpd
185 Summary(pl): Modu³ WebDAV dla libghttpd
186 Group: Networking/Daemons
187 URL: http://www.lighttpd.net/documentation/webdav.html
188 Requires: %{name} = %{version}-%{release}
190 %description mod_webdav
191 The WebDAV module is a very minimalistic implementation of RFC 2518.
192 Minimalistic means that not all operations are implementated yet.
201 and the usual GET, POST, HEAD from HTTP/1.1.
203 So far mounting a webdav resource into Windows XP works and the basic
204 litmus tests are passed.
206 %description mod_webdav -l pl
207 Modu³ WebDAV to bardzo minimalistyczna implementacja RFC 2518.
208 Minimalistyczna oznacza, ¿e jeszcze nie wszystkie operacje s±
209 zaimplementowane. Jak na razie s±:
215 oraz zwyk³e GET, POST, HEAD z HTTP/1.1.
217 Jak na razie montowanie zasobu webdav pod Windows XP dzia³a i
218 podstawowe testy lakmusowe przechodz±.
220 %package -n spawn-fcgi
221 Summary: Spawn fcgi-process directly
222 Summary(pl): Bezpo¶rednie uruchamianie procesów fcgi
225 %description -n spawn-fcgi
226 spawn-fcgi is used to spawn fcgi-process directly without the help of
227 a webserver or the programm itself.
229 %description -n spawn-fcgi -l pl
230 spawn-fcgi s³u¿y do uruchamiania procesów fcgi bezpo¶rednio, bez
231 pomocy serwera WWW ani samego programu.
235 %{?with_dirhide:%patch0 -p0}
247 %{!?with_ipv6:--disable-ipv6} \
248 %{!?with_largefile:--disable-lfs} \
249 %{?with_valgrind:--with-valgrind} \
250 %{?with_xattr:--with-attr} \
251 %{?with_mysql:--with-mysql} \
252 %{?with_ldap:--with-ldap} \
253 %{?with_ssl:--with-openssl} \
254 %{?with_lua:--with-lua} \
255 %{?with_memcache:--with-memcache} \
256 %{?with_webdav_props:--with-webdav-props} \
257 %{?with_gamin:--with-gamin} \
258 %{?with_gdbm:--with-gdbm}
263 rm -rf $RPM_BUILD_ROOT
264 install -d $RPM_BUILD_ROOT{%{_lighttpddir}/{cgi-bin,html},/etc/{logrotate.d,rc.d/init.d,sysconfig},%{_sysconfdir}} \
265 $RPM_BUILD_ROOT/var/log/{%{name},archiv/%{name}}
268 DESTDIR=$RPM_BUILD_ROOT
270 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
271 install %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
272 install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
273 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
275 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
277 # could use automake patch, but automake generation fails...
278 mv $RPM_BUILD_ROOT%{_bindir}/spawn-fcgi $RPM_BUILD_ROOT%{_sbindir}/spawn-fcgi
281 rm -rf $RPM_BUILD_ROOT
284 %groupadd -g 109 lighttpd
285 %useradd -u 116 -d %{_lighttpddir} -c "HTTP User" -g lighttpd lighttpd
288 /sbin/chkconfig --add %{name}
289 if [ -f /var/lock/subsys/%{name} ]; then
290 /etc/rc.d/init.d/%{name} restart 1>&2
292 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
296 if [ "$1" = "0" ]; then
297 if [ -f /var/lock/subsys/%{name} ]; then
298 /etc/rc.d/init.d/%{name} stop 1>&2
300 /sbin/chkconfig --del %{name}
304 if [ "$1" = "0" ]; then
306 %groupremove lighttpd
309 %triggerpostun -- %{name} <= 1.3.6-2
311 if [ "$1" = "2" ]; then
312 %banner %{name} -e <<EOF
313 spawn-fcgi program is now available separately from spawn-fcgi package.
319 %defattr(644,root,root,755)
320 %doc NEWS README ChangeLog doc/lighttpd.conf doc/*.txt doc/rrdtool-graph.sh
321 %attr(755,root,root) %{_sbindir}/*
323 %attr(755,root,root) %{_libdir}/mod_access.so
324 %attr(755,root,root) %{_libdir}/mod_accesslog.so
325 %attr(755,root,root) %{_libdir}/mod_alias.so
326 %attr(755,root,root) %{_libdir}/mod_auth.so
327 %attr(755,root,root) %{_libdir}/mod_cgi.so
328 %attr(755,root,root) %{_libdir}/mod_dirlisting.so
329 %attr(755,root,root) %{_libdir}/mod_evhost.so
330 %attr(755,root,root) %{_libdir}/mod_expire.so
331 %attr(755,root,root) %{_libdir}/mod_fastcgi.so
332 %attr(755,root,root) %{_libdir}/mod_indexfile.so
333 %attr(755,root,root) %{_libdir}/mod_proxy.so
334 %attr(755,root,root) %{_libdir}/mod_redirect.so
335 %attr(755,root,root) %{_libdir}/mod_rewrite.so
336 %attr(755,root,root) %{_libdir}/mod_rrdtool.so
337 %attr(755,root,root) %{_libdir}/mod_scgi.so
338 %attr(755,root,root) %{_libdir}/mod_secdownload.so
339 %attr(755,root,root) %{_libdir}/mod_setenv.so
340 %attr(755,root,root) %{_libdir}/mod_simple_vhost.so
341 %attr(755,root,root) %{_libdir}/mod_ssi.so
342 %attr(755,root,root) %{_libdir}/mod_staticfile.so
343 %attr(755,root,root) %{_libdir}/mod_status.so
344 %attr(755,root,root) %{_libdir}/mod_userdir.so
345 %attr(755,root,root) %{_libdir}/mod_usertrack.so
346 %attr(750,root,root) %dir /var/log/archiv/%{name}
347 %dir %attr(750,lighttpd,root) /var/log/%{name}
348 %attr(755,lighttpd,lighttpd) %{_lighttpddir}
349 %attr(754,root,root) /etc/rc.d/init.d/%{name}
350 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
351 %dir %attr(750,root,lighttpd) %{_sysconfdir}
352 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
353 %attr(640,root,lighttpd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.user
354 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
358 %defattr(644,root,root,755)
359 %attr(755,root,root) %{_libdir}/mod_compress.so
362 %defattr(644,root,root,755)
363 %attr(755,root,root) %{_libdir}/mod_cml.so
366 %files mod_mysql_vhost
367 %defattr(644,root,root,755)
368 %attr(755,root,root) %{_libdir}/mod_mysql_vhost.so
371 %files mod_trigger_b4_dl
372 %defattr(644,root,root,755)
373 %attr(755,root,root) %{_libdir}/mod_trigger_b4_dl.so
376 %defattr(644,root,root,755)
377 %attr(755,root,root) %{_libdir}/mod_webdav.so
380 %defattr(644,root,root,755)
381 %doc doc/spawn-php.sh
382 %attr(755,root,root) %{_sbindir}/spawn-fcgi