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