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