2 # - test ldap and mysql (failed at this time)
3 # - mysql issue: http://www.freebsd.org/cgi/query-pr.cgi?pr=76866
4 # - gdbm for mod_trigger_b4_dl http://www.lighttpd.net/documentation/trigger_b4_dl.html
7 # - fcgi-devel is only used for the test-scripts
8 # - disable largefile, if you have 2.4 kernel to get sendfile() support, and don't need > 2GB file requests,
9 # see http://article.gmane.org/gmane.comp.web.lighttpd:722
11 # Conditional build for lighttpd:
12 %bcond_without xattr # without support of extended attributes
13 %bcond_without ipv6 # IPv4-only version (doesn't require IPv6 in kernel)
14 %bcond_without largefile # without largefile support (see notes above)
15 %bcond_without ssl # disable ssl support
16 %bcond_without mysql # without mysql
17 %bcond_with ldap # with ldap
18 %bcond_with lua # enable LUA support in mod_cml
19 %bcond_with memcache # enable memcached support in mod_cml / mod_trigger_b4_dl
20 %bcond_with valgrind # compile code with valgrind support.
21 %bcond_with dirhide # with 'hide from dirlisting' hack
23 # Prerelease snapshot: DATE-TIME
24 #define _snap 20050116-1743
27 %define _source http://www.lighttpd.net/download/%{name}-%{version}-%{_snap}.tar.gz
29 %define _source http://www.lighttpd.net/download/%{name}-%{version}.tar.gz
34 Summary: Fast and light HTTP server
35 Summary(pl): Szybki i lekki serwer HTTP
38 Release: %{_rel}%{?_snap:.%(echo %{_snap}|tr - _)}
39 Group: Networking/Daemons
42 # Source0-md5: 926a3603615c9edf5859977f1b8b6033
46 Source4: %{name}.logrotate
47 Source5: %{name}.sysconfig
48 Patch0: http://minghetti.ch/blob/dirlist-hide.patch
49 Patch1: %{name}-fcgi-verbose.patch
50 Patch2: %{name}-ssl-redirect-fix.patch
51 URL: http://www.lighttpd.net/
52 %{?with_xattr:BuildRequires: attr-devel}
53 BuildRequires: autoconf
54 BuildRequires: automake
55 BuildRequires: bzip2-devel
56 BuildRequires: libtool
57 %{?with_mysql:BuildRequires: mysql-devel}
58 %{?with_ldap:BuildRequires: openldap-devel}
59 %{?with_ssl:BuildRequires: openssl-devel}
60 %{?with_lua:BuildRequires: lua50-devel}
61 %{?with_memcache:BuildRequires: libmemcache-devel}
62 BuildRequires: pcre-devel
63 BuildRequires: rpmbuild(macros) >= 1.202
64 %{?debug:BuildRequires: valgrind}
65 BuildRequires: zlib-devel
67 Requires(pre): sh-utils
68 Requires(pre): /bin/id
69 Requires(pre): /usr/bin/getgid
70 Requires(pre): /usr/sbin/groupadd
71 Requires(pre): /usr/sbin/useradd
72 Requires(post,preun): /sbin/chkconfig
73 Requires(postun): /usr/sbin/groupdel
74 Requires(postun): /usr/sbin/userdel
75 Provides: group(lighttpd)
77 Provides: user(lighttpd)
79 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
81 %define _libdir %{_prefix}/%{_lib}/%{name}
82 %define _lighttpddir /home/services/%{name}
83 %define _sysconfdir /etc/%{name}
86 lighttpd is a secure, fast, compliant and very flexible web-server
87 which has been optimized for high-performance environments. It has a
88 very low memory footprint compared to other webservers and takes care
89 of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth,
90 Output-Compression, URL-Rewriting and many more) make lighttpd the
91 perfect webserver-software for every server that is suffering load
95 lighttpd jest bezpiecznym, szybkim, przyjaznym i bardzo elastycznym
96 serwerem WWW, który zosta³ zoptymalizowany pod k±tem
97 wysokowydajno¶ciowych ¶rodowisk. Zajmuje bardzo ma³± ilo¶æ pamiêci w
98 porównaniu do innych serwerów WWW oraz dba o zajêto¶æ procesora.
99 Szeroki zestaw opcji (FastCGI, CGI, uwierzytelnianie, kompresja
100 wyj¶cia, przepisywanie URL-i i wiele innych) czyni± z lighttpd
101 doskona³e oprogramowanie web-serwerowe na ka¿dy serwer cierpi±cy z
102 powodu problemów z obci±¿eniem.
104 %package mod_compress
105 Summary: Output Compression
106 Group: Networking/Daemons
107 URL: http://www.lighttpd.net/documentation/compress.html
108 Requires: %{name} = %{version}-%{release}
110 %description mod_compress
111 Output compression reduces the network load and can improve the
112 overall throughput of the webserver.
114 Only static content is supported up to now.
116 The server negotiates automaticly which compression method is used.
117 Supported are gzip, deflate, bzip.
120 Summary: Cache Meta Language module
121 Group: Networking/Daemons
122 URL: http://www.lighttpd.net/documentation/cml.html
123 Requires: %{name} = %{version}-%{release}
126 CML is a Meta language to describe the dependencies of a page at one
127 side and building a page from its fragments on the other side using
130 %package mod_mysql_vhost
131 Summary: MySQL based vhosting
132 Group: Networking/Daemons
133 URL: http://www.lighttpd.net/documentation/mysqlvhost.html
134 Requires: %{name} = %{version}-%{release}
136 %description mod_mysql_vhost
137 This module provides virtual hosts (vhosts) based on a MySQL table.
139 %package mod_trigger_b4_dl
140 Summary: Trigger before Download
141 Group: Networking/Daemons
142 URL: http://www.lighttpd.net/documentation/trigger_b4_dl.html
143 Requires: %{name} = %{version}-%{release}
145 %description mod_trigger_b4_dl
146 Another anti hot-linking module.
148 %package -n spawn-fcgi
149 Summary: Spawn fcgi-process directly
150 Summary(pl): Bezpo¶rednie uruchamianie procesów fcgi
153 %description -n spawn-fcgi
154 spawn-fcgi is used to spawn fcgi-process directly without the help of
155 a webserver or the programm itself.
157 %description -n spawn-fcgi -l pl
158 spawn-fcgi s³u¿y do uruchamiania procesów fcgi bezpo¶rednio, bez
159 pomocy serwera WWW ani samego programu.
163 %{?with_dirhide:%patch0 -p0}
173 %{?with_valgrind:--with-valgrind} \
174 %{?with_xattr:--with-attr} \
175 %{?with_mysql:--with-mysql} \
176 %{?with_ldap:--with-ldap} \
177 %{!?with_ipv6:--disable-ipv6} \
178 %{!?with_largefile:--disable-lfs} \
179 %{?with_ssl:--with-openssl} \
180 %{?with_lua:--with-lua} \
181 %{?with_memcache:--with-memcache}
186 rm -rf $RPM_BUILD_ROOT
187 install -d $RPM_BUILD_ROOT{%{_lighttpddir}/{cgi-bin,html},/etc/{logrotate.d,rc.d/init.d,sysconfig},%{_sysconfdir}} \
188 $RPM_BUILD_ROOT/var/log/{%{name},archiv/%{name}}
191 DESTDIR=$RPM_BUILD_ROOT
193 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
194 install %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
195 install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
196 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
198 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
200 # could use automake patch, but automake generation fails...
201 mv $RPM_BUILD_ROOT%{_bindir}/spawn-fcgi $RPM_BUILD_ROOT%{_sbindir}/spawn-fcgi
204 rm -rf $RPM_BUILD_ROOT
207 %groupadd -g 109 lighttpd
208 %useradd -u 116 -d %{_lighttpddir} -c "HTTP User" -g lighttpd lighttpd
211 /sbin/chkconfig --add %{name}
212 if [ -f /var/lock/subsys/%{name} ]; then
213 /etc/rc.d/init.d/%{name} restart 1>&2
215 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
219 if [ "$1" = "0" ]; then
220 if [ -f /var/lock/subsys/%{name} ]; then
221 /etc/rc.d/init.d/%{name} stop 1>&2
223 /sbin/chkconfig --del %{name}
227 if [ "$1" = "0" ]; then
229 %groupremove lighttpd
232 %triggerpostun -- %{name} <= 1.3.6-2
234 if [ "$1" = "2" ]; then
235 %banner %{name} -e <<EOF
236 spawn-fcgi program is now available separately from spawn-fcgi package.
242 %defattr(644,root,root,755)
243 %doc NEWS README ChangeLog doc/lighttpd.conf doc/*.txt doc/rrdtool-graph.sh
244 %attr(755,root,root) %{_sbindir}/*
246 %attr(755,root,root) %{_libdir}/mod_access.so
247 %attr(755,root,root) %{_libdir}/mod_accesslog.so
248 %attr(755,root,root) %{_libdir}/mod_alias.so
249 %attr(755,root,root) %{_libdir}/mod_auth.so
250 %attr(755,root,root) %{_libdir}/mod_cgi.so
251 %attr(755,root,root) %{_libdir}/mod_dirlisting.so
252 %attr(755,root,root) %{_libdir}/mod_evhost.so
253 %attr(755,root,root) %{_libdir}/mod_expire.so
254 %attr(755,root,root) %{_libdir}/mod_fastcgi.so
255 %attr(755,root,root) %{_libdir}/mod_indexfile.so
256 %attr(755,root,root) %{_libdir}/mod_proxy.so
257 %attr(755,root,root) %{_libdir}/mod_redirect.so
258 %attr(755,root,root) %{_libdir}/mod_rewrite.so
259 %attr(755,root,root) %{_libdir}/mod_rrdtool.so
260 %attr(755,root,root) %{_libdir}/mod_scgi.so
261 %attr(755,root,root) %{_libdir}/mod_secdownload.so
262 %attr(755,root,root) %{_libdir}/mod_setenv.so
263 %attr(755,root,root) %{_libdir}/mod_simple_vhost.so
264 %attr(755,root,root) %{_libdir}/mod_ssi.so
265 %attr(755,root,root) %{_libdir}/mod_staticfile.so
266 %attr(755,root,root) %{_libdir}/mod_status.so
267 %attr(755,root,root) %{_libdir}/mod_userdir.so
268 %attr(755,root,root) %{_libdir}/mod_usertrack.so
269 %attr(755,root,root) %{_libdir}/mod_webdav.so
270 %attr(750,root,root) %dir /var/log/archiv/%{name}
271 %dir %attr(750,lighttpd,root) /var/log/%{name}
272 %attr(755,lighttpd,lighttpd) %{_lighttpddir}
273 %attr(754,root,root) /etc/rc.d/init.d/%{name}
274 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
275 %dir %attr(750,root,lighttpd) %{_sysconfdir}
276 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
277 %attr(640,root,lighttpd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.user
278 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
282 %defattr(644,root,root,755)
283 %attr(755,root,root) %{_libdir}/mod_compress.so
286 %defattr(644,root,root,755)
287 %attr(755,root,root) %{_libdir}/mod_cml.so
289 %files mod_mysql_vhost
290 %defattr(644,root,root,755)
291 %attr(755,root,root) %{_libdir}/mod_mysql_vhost.so
293 %files mod_trigger_b4_dl
294 %defattr(644,root,root,755)
295 %attr(755,root,root) %{_libdir}/mod_trigger_b4_dl.so
298 %defattr(644,root,root,755)
299 %doc doc/spawn-php.sh
300 %attr(755,root,root) %{_sbindir}/spawn-fcgi