3 # - test ldap and mysql (failed at this time)
4 # - documentroot specified in config doesn't exist
5 # - mysql issue: http://www.freebsd.org/cgi/query-pr.cgi?pr=76866
7 # Conditional build for lighttpd:
8 %bcond_without xattr # without support of extended attributes
9 %bcond_without ipv6 # IPv4-only version (doesn't require IPv6 in kernel)
10 # use it if you have 2.4 kernel to get sendfile() support,
11 # and don't need > 2GB file requests,
12 # see http://article.gmane.org/gmane.comp.web.lighttpd:722
13 %bcond_without largefile # without largefile support
14 %bcond_without ssl # disable ssl support
15 %bcond_with mysql # with mysql
16 %bcond_with ldap # with ldap
17 %bcond_with valgrind # compile code with valgrind support.
18 %bcond_with dirhide # with 'hide from dirlisting' hack
20 # Prerelease snapshot: DATE-TIME
21 ##define _snap 20050116-1743
24 %define _source http://www.lighttpd.net/download/%{name}-%{version}-%{_snap}.tar.gz
26 %define _source http://www.lighttpd.net/download/%{name}-%{version}.tar.gz
31 Summary: Fast and light HTTP server
32 Summary(pl): Szybki i lekki serwer HTTP
35 Release: %{_rel}%{?_snap:.%(echo %{_snap}|tr - _)}
36 Group: Networking/Daemons
39 # Source0-md5: 2f017b936be376ad6f6c2ee26db93467
43 Source4: %{name}.logrotate
44 Source5: %{name}.sysconfig
45 Patch0: http://minghetti.ch/blob/dirlist-hide.patch
46 Patch1: %{name}-fcgi-verbose.patch
47 Patch2: %{name}-proxy-error-handler.patch
48 Patch3: %{name}-fcgi-retry-timeout.patch
49 Patch4: http://glen.alkohol.ee/pld/lighttpd-request_header-print.patch
50 URL: http://www.lighttpd.net/
51 BuildRequires: autoconf
52 BuildRequires: automake
53 BuildRequires: bzip2-devel
54 BuildRequires: libtool
55 %{?with_ssl:BuildRequires: openssl-devel}
56 BuildRequires: pcre-devel
57 BuildRequires: rpmbuild(macros) >= 1.159
58 BuildRequires: zlib-devel
60 BuildRequires: attr-devel
62 %{?with_ldap:BuildRequires: openldap-devel}
63 %{?with_mysql:BuildRequires: mysql-devel}
64 %{?debug:BuildRequires: valgrind}
65 BuildRequires: rpmbuild(macros) >= 1.202
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 -n spawn-fcgi
105 Summary: Spawn fcgi-process directly
106 Summary(pl): Bezpo¶rednie uruchamianie procesów fcgi
109 %description -n spawn-fcgi
110 spawn-fcgi is used to spawn fcgi-process directly without the help of
111 a webserver or the programm itself.
113 %description -n spawn-fcgi -l pl
114 spawn-fcgi s³u¿y do uruchamiania procesów fcgi bezpo¶rednio, bez
115 pomocy serwera WWW ani samego programu.
119 %{?with_dirhide:%patch0 -p0}
130 CFLAGS="%{rpmcflags} -DFCGI_RETRY_TIMEOUT=20" \
131 %{?with_valgrind:--with-valgrind} \
132 %{?with_xattr:--with-attr} \
133 %{?with_mysql:--with-mysql} \
134 %{?with_ldap:--with-ldap} \
135 %{!?with_ipv6:--disable-ipv6} \
136 %{!?with_largefile:--disable-lfs} \
137 %{?with_ssl:--with-openssl}
142 rm -rf $RPM_BUILD_ROOT
143 install -d $RPM_BUILD_ROOT{%{_lighttpddir}/{cgi-bin,html},/etc/{logrotate.d,rc.d/init.d,sysconfig},%{_sysconfdir}} \
144 $RPM_BUILD_ROOT/var/log/{%{name},archiv/%{name}}
147 DESTDIR=$RPM_BUILD_ROOT
149 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
150 install %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
151 install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
152 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
154 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
156 # could use automake patch, but automake generation fails...
157 mv $RPM_BUILD_ROOT%{_bindir}/spawn-fcgi $RPM_BUILD_ROOT%{_sbindir}/spawn-fcgi
160 rm -rf $RPM_BUILD_ROOT
163 %groupadd -g 109 lighttpd
164 %useradd -u 116 -d %{_lighttpddir} -c "HTTP User" -g lighttpd lighttpd
167 /sbin/chkconfig --add %{name}
168 if [ -f /var/lock/subsys/%{name} ]; then
169 /etc/rc.d/init.d/%{name} restart 1>&2
171 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
175 if [ "$1" = "0" ]; then
176 if [ -f /var/lock/subsys/%{name} ]; then
177 /etc/rc.d/init.d/%{name} stop 1>&2
179 /sbin/chkconfig --del %{name}
183 if [ "$1" = "0" ]; then
185 %groupremove lighttpd
188 %triggerpostun -- %{name} <= 1.3.6-2
190 if [ "$1" = "2" ]; then
191 %banner %{name} -e <<EOF
192 spawn-fcgi program is now available separately from spawn-fcgi package.
198 %defattr(644,root,root,755)
199 %doc NEWS README ChangeLog doc/lighttpd.conf doc/*.txt doc/rrdtool-graph.sh
200 %attr(755,root,root) %{_sbindir}/*
202 %attr(755,root,root) %{_libdir}/*.so
203 %attr(750,root,root) %dir /var/log/archiv/%{name}
204 %dir %attr(750,lighttpd,root) /var/log/%{name}
205 %attr(755,lighttpd,lighttpd) %{_lighttpddir}
206 %attr(754,root,root) /etc/rc.d/init.d/%{name}
207 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
208 %dir %attr(750,root,lighttpd) %{_sysconfdir}
209 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
210 %attr(640,root,lighttpd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.user
211 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
215 %defattr(644,root,root,755)
216 %doc doc/spawn-php.sh
217 %attr(755,root,root) %{_sbindir}/spawn-fcgi