]> git.pld-linux.org Git - packages/lighttpd.git/blob - lighttpd.spec
- readpost timeout patch, fcgi fdevent err patch (wow. works for me now)
[packages/lighttpd.git] / lighttpd.spec
1 #
2 # TODO
3 # - fix modules:
4 #  mod_localizer   : disabled (liblocalizer missing)
5 #  mod_maps        : disabled (liblocalizer missing)
6 #  mod_chat        : disabled, buy your license :)
7 #  mod_cache       : disabled, buy your license :)
8 # - test ldap and mysql (failed at this time)
9 # - documentroot specified in config doesn't exist
10 #
11 # Conditional build for lighttpd:
12 %bcond_without  xattr   # without support of extended attributes
13 %bcond_with     mysql   # with mysql
14 %bcond_with     ldap    # with ldap
15 %bcond_with     valgrind        # enable valgrind fixes in code.
16 %bcond_without  largefile       # without largefile support,
17 # use it if you have 2.4 kernel to get sendfile() support,
18 # and don't need > 2GB file requests,
19 # see http://article.gmane.org/gmane.comp.web.lighttpd:722
20 #
21 Summary:        Fast and light HTTP server
22 Summary(pl):    Szybki i lekki serwer HTTP
23 Name:           lighttpd
24 Version:        1.3.7
25 Release:        0.14
26 Group:          Networking/Daemons
27 License:        BSD
28 ## do not remove next two lines because atomic revisions are common in lighttpd
29 #%define                _rel    20050106-1954
30 #Source0:       http://www.lighttpd.net/download/%{name}-%{version}-%{_rel}.tar.gz
31 Source0:        http://www.lighttpd.net/download/%{name}-%{version}.tar.gz
32 # Source0-md5:  40ac1d07d9efb0366720d081c3e02224
33 Source1:        %{name}.init
34 Source2:        %{name}.conf
35 Source3:        %{name}.user
36 Source4:        %{name}.logrotate
37 Source5:        %{name}.sysconfig
38 Patch0:         %{name}-mod_status.patch
39 Patch1:         %{name}-doublefree.patch
40 Patch2:         %{name}-avg-req.patch
41 Patch3:         %{name}-readpost-timeout.patch
42 Patch4:         %{name}-fcgi-fdevent.patch
43 URL:            http://www.lighttpd.net/
44 BuildRequires:  autoconf
45 BuildRequires:  automake
46 BuildRequires:  bzip2-devel
47 BuildRequires:  libtool
48 BuildRequires:  openssl-devel
49 BuildRequires:  pcre-devel
50 BuildRequires:  rpmbuild(macros) >= 1.159
51 BuildRequires:  zlib-devel
52 %if %{with xattr}
53 BuildRequires:  attr-devel
54 %endif
55 %{?with_ldap:BuildRequires:     openldap-devel}
56 %{?with_mysql:BuildRequires:    mysql-devel}
57 %{?with_valgrind:BuildRequires: valgrind}
58 %{!?with_valgrind:BuildConflicts:       valgrind}
59 PreReq:         rc-scripts
60 Requires(pre):  sh-utils
61 Requires(pre):  /bin/id
62 Requires(pre):  /usr/bin/getgid
63 Requires(pre):  /usr/sbin/groupadd
64 Requires(pre):  /usr/sbin/useradd
65 Requires(post,preun):   /sbin/chkconfig
66 Requires(postun):       /usr/sbin/groupdel
67 Requires(postun):       /usr/sbin/userdel
68 Provides:       group(lighttpd)
69 Provides:       httpd
70 Provides:       user(lighttpd)
71 Provides:       webserver
72 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
73
74 %define         _libdir         %{_prefix}/%{_lib}/%{name}
75 %define         _lighttpddir    /home/services/%{name}
76 %define         _sysconfdir     /etc/%{name}
77
78 %description
79 lighttpd is a secure, fast, compliant and very flexible web-server
80 which has been optimized for high-performance environments. It has
81 a very low memory footprint compared to other webservers and takes
82 care of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth,
83 Output-Compression, URL-Rewriting and many more) make lighttpd the
84 perfect webserver-software for every server that is suffering load
85 problems.
86
87 %description -l pl
88 lighttpd jest bezpiecznym, szybkim, przyjaznym i bardzo elastycznym
89 serwerem WWW, który zosta³ zoptymalizowany pod k±tem
90 wysokowydajno¶ciowych ¶rodowisk. Zajmuje bardzo ma³± ilo¶æ pamiêci
91 w porównaniu do innych serwerów WWW oraz dba o zajêto¶æ procesora.
92 Szeroki zestaw opcji (FastCGI, CGI, uwierzytelnianie, kompresja
93 wyj¶cia, przepisywanie URL-i i wiele innych) czyni± z lighttpd
94 doskona³e oprogramowanie web-serwerowe na ka¿dy serwer cierpi±cy
95 z powodu problemów z obci±¿eniem.
96
97 %package -n spawn-fcgi
98 Summary:        Spawn fcgi-process directly
99 Summary(pl):    Bezpo¶rednie uruchamianie procesów fcgi
100 Group:          Applications
101
102 %description -n spawn-fcgi
103 spawn-fcgi is used to spawn fcgi-process directly without the help of
104 a webserver or the programm itself.
105
106 %description -n spawn-fcgi -l pl
107 spawn-fcgi s³u¿y do uruchamiania procesów fcgi bezpo¶rednio, bez
108 pomocy serwera WWW ani samego programu.
109
110 %prep
111 %setup -q
112 %patch0 -p1
113 %patch1 -p1
114 %patch2 -p1
115 %patch3 -p1
116 %patch4 -p1
117
118 %build
119 %{__libtoolize}
120 %{__aclocal}
121 %{__autoconf}
122 %configure \
123         --enable-mod-chat \
124         --enable-mod-cache \
125         --enable-mod-localizer \
126         %{?with_xattr:--with-attr} \
127         %{?with_mysql:--with-mysql} \
128         %{?with_ldap:--with-ldap} \
129         %{!?with_largefile:--disable-lfs} \
130         --with-openssl
131         
132 %{__make}
133
134 %install
135 rm -rf $RPM_BUILD_ROOT
136 install -d $RPM_BUILD_ROOT{%{_lighttpddir}/cgi-bin,/etc/{logrotate.d,rc.d/init.d,sysconfig},%{_sysconfdir}} \
137         $RPM_BUILD_ROOT/var/log/{%{name},archiv/%{name}}
138
139 %{__make} install \
140         DESTDIR=$RPM_BUILD_ROOT
141
142 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
143 install %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
144 install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
145 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
146
147 # could use automake patch, but automake generation fails...
148 mv $RPM_BUILD_ROOT%{_bindir}/spawn-fcgi $RPM_BUILD_ROOT%{_sbindir}/spawn-fcgi
149
150 %clean
151 rm -rf $RPM_BUILD_ROOT
152
153 %pre
154 if [ -n "`/usr/bin/getgid lighttpd`" ]; then
155         if [ "`/usr/bin/getgid lighttpd`" != 109 ]; then
156                 echo "Error: group lighttpd doesn't have gid=109. Correct this before installing %{name}." 1>&2
157                 exit 1
158         fi
159 else
160         /usr/sbin/groupadd -g 109 lighttpd
161 fi
162 if [ -n "`/bin/id -u lighttpd 2>/dev/null`" ]; then
163         if [ "`/bin/id -u lighttpd`" != 116 ]; then
164                 echo "Error: user lighttpd doesn't have uid=116. Correct this before installing %{name}." 1>&2
165                 exit 1
166         fi
167 else
168         /usr/sbin/useradd -u 116 -d %{_lighttpddir} -s /bin/false \
169                 -c "HTTP User" -g lighttpd lighttpd 1>&2
170 fi
171
172 %post
173 /sbin/chkconfig --add %{name}
174 if [ -f /var/lock/subsys/%{name} ]; then
175         /etc/rc.d/init.d/%{name} restart 1>&2
176 else
177         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
178 fi
179
180 %preun
181 if [ "$1" = "0" ]; then
182         if [ -f /var/lock/subsys/%{name} ]; then
183                 /etc/rc.d/init.d/%{name} stop 1>&2
184         fi
185         /sbin/chkconfig --del %{name}
186 fi
187
188 %postun
189 if [ "$1" = "0" ]; then
190         %userremove lighttpd
191         %groupremove lighttpd
192 fi
193
194 %triggerpostun -- %{name} <= 1.3.6-2
195 # upgraded
196 if [ "$1" = "2" ]; then
197 %banner %{name} -e <<EOF
198 spawn-fcgi program is now available separately from spawn-fcgi package.
199
200 EOF
201 fi
202
203
204 %files
205 %defattr(644,root,root,755)
206 %doc NEWS README ChangeLog doc/lighttpd.conf doc/*.txt doc/rrdtool-graph.sh
207 %attr(755,root,root) %{_sbindir}/*
208 %dir %{_libdir}
209 %attr(755,root,root) %{_libdir}/*.so
210 %attr(750,root,root) %dir /var/log/archiv/%{name}
211 %dir %attr(750,lighttpd,root) /var/log/%{name}
212 %attr(755,lighttpd,lighttpd) %{_lighttpddir}
213 %attr(754,root,root) /etc/rc.d/init.d/%{name}
214 %config(noreplace) %verify(not size mtime md5) /etc/sysconfig/*
215 %dir %attr(750,root,lighttpd) %{_sysconfdir}
216 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/%{name}.conf
217 %attr(640,root,lighttpd) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.user
218 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/%{name}
219 %{_mandir}/man?/*
220
221 %files -n spawn-fcgi
222 %defattr(644,root,root,755)
223 %attr(755,root,root) %{_sbindir}/spawn-fcgi
This page took 0.071058 seconds and 4 git commands to generate.