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: 3abffbe574fd835721760a37c00d3714
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 Patch4: %{name}-openssl.patch
60 URL: http://www.lighttpd.net/
61 %{?with_xattr:BuildRequires: attr-devel}
62 BuildRequires: autoconf
63 BuildRequires: automake
64 BuildRequires: bzip2-devel
65 %{?with_gamin:BuildRequires: gamin-devel}
66 %{?with_webdav_props:BuildRequires: sqlite3-devel}
67 %{?with_webdav_props:BuildRequires: libxml2-devel}
68 BuildRequires: libtool
69 %{?with_mysql:BuildRequires: mysql-devel}
70 %{?with_ldap:BuildRequires: openldap-devel}
71 %{?with_ssl:BuildRequires: openssl-devel}
72 %{?with_lua:BuildRequires: lua50-devel >= 5.0.2-4.1}
73 %{?with_memcache:BuildRequires: libmemcache-devel}
74 %{?with_gdbm:BuildRequires: gdbm-devel}
75 BuildRequires: pcre-devel
76 BuildRequires: rpmbuild(macros) >= 1.202
77 %{?debug:BuildRequires: valgrind}
78 BuildRequires: zlib-devel
80 Requires(pre): sh-utils
81 Requires(pre): /bin/id
82 Requires(pre): /usr/bin/getgid
83 Requires(pre): /usr/sbin/groupadd
84 Requires(pre): /usr/sbin/useradd
85 Requires(post,preun): /sbin/chkconfig
86 Requires(postun): /usr/sbin/groupdel
87 Requires(postun): /usr/sbin/userdel
88 Provides: group(lighttpd)
90 Provides: user(lighttpd)
92 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
94 %define _libdir %{_prefix}/%{_lib}/%{name}
95 %define _lighttpddir /home/services/%{name}
96 %define _sysconfdir /etc/%{name}
99 lighttpd is a secure, fast, compliant and very flexible web-server
100 which has been optimized for high-performance environments. It has a
101 very low memory footprint compared to other webservers and takes care
102 of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth,
103 Output-Compression, URL-Rewriting and many more) make lighttpd the
104 perfect webserver-software for every server that is suffering load
108 lighttpd jest bezpiecznym, szybkim, przyjaznym i bardzo elastycznym
109 serwerem WWW, który zosta³ zoptymalizowany pod k±tem
110 wysokowydajno¶ciowych ¶rodowisk. Zajmuje bardzo ma³± ilo¶æ pamiêci w
111 porównaniu do innych serwerów WWW oraz dba o zajêto¶æ procesora.
112 Szeroki zestaw opcji (FastCGI, CGI, uwierzytelnianie, kompresja
113 wyj¶cia, przepisywanie URL-i i wiele innych) czyni± z lighttpd
114 doskona³e oprogramowanie web-serwerowe na ka¿dy serwer cierpi±cy z
115 powodu problemów z obci±¿eniem.
117 %package mod_compress
118 Summary: Output Compression
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 automaticly which compression method is used.
130 Supported are gzip, deflate, bzip.
133 Summary: Cache Meta Language module
134 Group: Networking/Daemons
135 URL: http://www.lighttpd.net/documentation/cml.html
136 Requires: %{name} = %{version}-%{release}
139 CML is a Meta language to describe the dependencies of a page at one
140 side and building a page from its fragments on the other side using
143 %package mod_mysql_vhost
144 Summary: MySQL based vhosting
145 Group: Networking/Daemons
146 URL: http://www.lighttpd.net/documentation/mysqlvhost.html
147 Requires: %{name} = %{version}-%{release}
149 %description mod_mysql_vhost
150 This module provides virtual hosts (vhosts) based on a MySQL table.
152 %package mod_trigger_b4_dl
153 Summary: Trigger before Download
154 Group: Networking/Daemons
155 URL: http://www.lighttpd.net/documentation/trigger_b4_dl.html
156 Requires: %{name} = %{version}-%{release}
158 %description mod_trigger_b4_dl
159 Another anti hot-linking module.
162 Summary: WebDAV module for lighttpd
163 Group: Networking/Daemons
164 URL: http://www.lighttpd.net/documentation/webdav.html
165 Requires: %{name} = %{version}-%{release}
167 %description mod_webdav
168 The WebDAV module is a very minimalistic implementation of RFC 2518.
169 Minimalistic means that not all operations are implementated yet.
178 and the usual GET, POST, HEAD from HTTP/1.1.
180 So far mounting a webdav resource into Windows XP works and the basic
181 litmus tests are passed.
183 %package -n spawn-fcgi
184 Summary: Spawn fcgi-process directly
185 Summary(pl): Bezpo¶rednie uruchamianie procesów fcgi
188 %description -n spawn-fcgi
189 spawn-fcgi is used to spawn fcgi-process directly without the help of
190 a webserver or the programm itself.
192 %description -n spawn-fcgi -l pl
193 spawn-fcgi s³u¿y do uruchamiania procesów fcgi bezpo¶rednio, bez
194 pomocy serwera WWW ani samego programu.
198 %{?with_dirhide:%patch0 -p0}
211 %{!?with_ipv6:--disable-ipv6} \
212 %{!?with_largefile:--disable-lfs} \
213 %{?with_valgrind:--with-valgrind} \
214 %{?with_xattr:--with-attr} \
215 %{?with_mysql:--with-mysql} \
216 %{?with_ldap:--with-ldap} \
217 %{?with_ssl:--with-openssl} \
218 %{?with_lua:--with-lua} \
219 %{?with_memcache:--with-memcache} \
220 %{?with_webdav_props:--with-webdav-props} \
221 %{?with_gamin:--with-gamin} \
222 %{?with_gdbm:--with-gdbm}
227 rm -rf $RPM_BUILD_ROOT
228 install -d $RPM_BUILD_ROOT{%{_lighttpddir}/{cgi-bin,html},/etc/{logrotate.d,rc.d/init.d,sysconfig},%{_sysconfdir}} \
229 $RPM_BUILD_ROOT/var/log/{%{name},archiv/%{name}}
232 DESTDIR=$RPM_BUILD_ROOT
234 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
235 install %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
236 install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
237 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
239 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
241 # could use automake patch, but automake generation fails...
242 mv $RPM_BUILD_ROOT%{_bindir}/spawn-fcgi $RPM_BUILD_ROOT%{_sbindir}/spawn-fcgi
245 rm -rf $RPM_BUILD_ROOT
248 %groupadd -g 109 lighttpd
249 %useradd -u 116 -d %{_lighttpddir} -c "HTTP User" -g lighttpd lighttpd
252 /sbin/chkconfig --add %{name}
253 if [ -f /var/lock/subsys/%{name} ]; then
254 /etc/rc.d/init.d/%{name} restart 1>&2
256 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
260 if [ "$1" = "0" ]; then
261 if [ -f /var/lock/subsys/%{name} ]; then
262 /etc/rc.d/init.d/%{name} stop 1>&2
264 /sbin/chkconfig --del %{name}
268 if [ "$1" = "0" ]; then
270 %groupremove lighttpd
273 %triggerpostun -- %{name} <= 1.3.6-2
275 if [ "$1" = "2" ]; then
276 %banner %{name} -e <<EOF
277 spawn-fcgi program is now available separately from spawn-fcgi package.
283 %defattr(644,root,root,755)
284 %doc NEWS README ChangeLog doc/lighttpd.conf doc/*.txt doc/rrdtool-graph.sh
285 %attr(755,root,root) %{_sbindir}/*
287 %attr(755,root,root) %{_libdir}/mod_access.so
288 %attr(755,root,root) %{_libdir}/mod_accesslog.so
289 %attr(755,root,root) %{_libdir}/mod_alias.so
290 %attr(755,root,root) %{_libdir}/mod_auth.so
291 %attr(755,root,root) %{_libdir}/mod_cgi.so
292 %attr(755,root,root) %{_libdir}/mod_dirlisting.so
293 %attr(755,root,root) %{_libdir}/mod_evhost.so
294 %attr(755,root,root) %{_libdir}/mod_expire.so
295 %attr(755,root,root) %{_libdir}/mod_fastcgi.so
296 %attr(755,root,root) %{_libdir}/mod_indexfile.so
297 %attr(755,root,root) %{_libdir}/mod_proxy.so
298 %attr(755,root,root) %{_libdir}/mod_redirect.so
299 %attr(755,root,root) %{_libdir}/mod_rewrite.so
300 %attr(755,root,root) %{_libdir}/mod_rrdtool.so
301 %attr(755,root,root) %{_libdir}/mod_scgi.so
302 %attr(755,root,root) %{_libdir}/mod_secdownload.so
303 %attr(755,root,root) %{_libdir}/mod_setenv.so
304 %attr(755,root,root) %{_libdir}/mod_simple_vhost.so
305 %attr(755,root,root) %{_libdir}/mod_ssi.so
306 %attr(755,root,root) %{_libdir}/mod_staticfile.so
307 %attr(755,root,root) %{_libdir}/mod_status.so
308 %attr(755,root,root) %{_libdir}/mod_userdir.so
309 %attr(755,root,root) %{_libdir}/mod_usertrack.so
310 %attr(750,root,root) %dir /var/log/archiv/%{name}
311 %dir %attr(750,lighttpd,root) /var/log/%{name}
312 %attr(755,lighttpd,lighttpd) %{_lighttpddir}
313 %attr(754,root,root) /etc/rc.d/init.d/%{name}
314 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
315 %dir %attr(750,root,lighttpd) %{_sysconfdir}
316 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
317 %attr(640,root,lighttpd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.user
318 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
322 %defattr(644,root,root,755)
323 %attr(755,root,root) %{_libdir}/mod_compress.so
326 %defattr(644,root,root,755)
327 %attr(755,root,root) %{_libdir}/mod_cml.so
330 %files mod_mysql_vhost
331 %defattr(644,root,root,755)
332 %attr(755,root,root) %{_libdir}/mod_mysql_vhost.so
335 %files mod_trigger_b4_dl
336 %defattr(644,root,root,755)
337 %attr(755,root,root) %{_libdir}/mod_trigger_b4_dl.so
340 %defattr(644,root,root,755)
341 %attr(755,root,root) %{_libdir}/mod_webdav.so
344 %defattr(644,root,root,755)
345 %doc doc/spawn-php.sh
346 %attr(755,root,root) %{_sbindir}/spawn-fcgi