3 Summary: Fast as light http server
4 Summary(pl): Szybki i lekki serwer http
8 Group: Networking/Daemons
10 Source0: http://jan.kneschke.de/projects/lighttpd/download/%{name}-%{version}.tar.gz
11 # Source0-md5: 2b5d247d2f62ac5255fa711a0c85bf06
13 URL: http://jan.kneschke.de/projects/lighttpd/
17 Requires(pre): sh-utils
18 Requires(pre): /bin/id
19 Requires(pre): /usr/bin/getgid
20 Requires(pre): /usr/sbin/groupadd
21 Requires(pre): /usr/sbin/useradd
22 Requires(post,preun): /sbin/chkconfig
23 Requires(postun): /usr/sbin/userdel
24 Requires(postun): /usr/sbin/groupdel
25 BuildRequires: mysql-devel
26 BuildRequires: zlib-devel
27 BuildRequires: bzip2-devel
28 BuildRequires: openssl-devel
29 BuildRequires: pcre-devel
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 %define _libdir %{_prefix}/%{_lib}/%{name}
33 %define _sysconfdir /etc/%{name}
36 ighttpd a secure, fast, compliant and very flexible web-server which
37 has been optimized for high-performance environments. It has a very
38 low memory footprint compared to other webservers and takes care of
39 cpu-load. Its advanced feature-set (FastCGI, CGI, Auth,
40 Output-Compression, URL-Rewriting and many more) make lighttpd the
41 perfect webserver-software for every server that is suffering load
51 --enable-mod-localizer \
58 rm -rf $RPM_BUILD_ROOT
59 install -d $RPM_BUILD_ROOT{/home/httpd/cgi-bin,/etc/{rc.d/init.d,%{name}}}
62 DESTDIR=$RPM_BUILD_ROOT
64 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
65 install doc/lighttpd.{conf,user} $RPM_BUILD_ROOT%{_sysconfdir}
68 rm -rf $RPM_BUILD_ROOT
71 if [ -n "`getgid http`" ]; then
72 if [ "`getgid http`" != "51" ]; then
73 echo "Error: group http doesn't have gid=51. Correct this before installing %{name}." 1>&2
77 /usr/sbin/groupadd -g 51 -r -f http
79 if [ -n "`id -u http 2>/dev/null`" ]; then
80 if [ "`id -u http`" != "51" ]; then
81 echo "Error: user http doesn't have uid=51. Correct this before installing %{name}." 1>&2
85 /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
89 /sbin/chkconfig --add %{name}
90 if [ -f /var/lock/subsys/%{name} ]; then
91 /etc/rc.d/init.d/%{name} restart 1>&2
93 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
97 if [ "$1" = "0" ]; then
98 if [ -f /var/lock/subsys/%{name} ]; then
99 /etc/rc.d/init.d/%{name} stop 1>&2
101 /sbin/chkconfig --del %{name}
105 if [ "$1" = "0" ]; then
106 /usr/sbin/userdel http
107 /usr/sbin/groupdel http
111 %defattr(644,root,root,755)
112 %doc NEWS README doc/*.txt
113 %attr(755,root,root) %{_sbindir}/*
115 %attr(644,root,root) %{_libdir}/*.a
116 %attr(-, http, http) /home/httpd
117 %attr(754,root,root) /etc/rc.d/init.d/lighttpd
118 %dir %attr(754,root,root) /etc/%{name}
119 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.*