]> git.pld-linux.org Git - packages/lighttpd.git/blob - lighttpd.spec
- 1.4.1
[packages/lighttpd.git] / lighttpd.spec
1 # TODO:
2 # - test ldap and mysql (failed at this time)
3 # - mysql issue: http://www.freebsd.org/cgi/query-pr.cgi?pr=76866
4 # - fam over gamin is possible, just configure doesn't check other than gamin
5 # - lua50 isn't properly detected
6 #
7 # NOTES:
8 # - fcgi-devel is only used for the test-scripts
9 # - disable largefile, if you have 2.4 kernel to get sendfile() support, and don't need > 2GB file requests,
10 #   see http://article.gmane.org/gmane.comp.web.lighttpd:722
11 #
12 # Conditional build for lighttpd:
13 %bcond_without  xattr                   # support of extended attributes
14 %bcond_without  ipv6                    # IPv4-only version (doesn't require IPv6 in kernel)
15 %bcond_without  largefile               # largefile support (see notes above)
16 %bcond_without  ssl                             # ssl support
17 %bcond_with             mysql                   # mysql support in mod_mysql_vhost
18 %bcond_with             ldap                    # ldap support in mod_auth
19 %bcond_with             lua                             # LUA support in mod_cml
20 %bcond_with             memcache                # memcached support in mod_cml / mod_trigger_b4_dl
21 %bcond_without  gamin                   # gamin for reducing number of stat() calls. NOTE: must be enabled in config: server.stat-cache-engine = "fam"
22 %bcond_with             gdbm                    # gdbm in mod_trigger_b4_dl
23 %bcond_with             webdav_props    # properties in mod_webdav (includes extra sqlite3/libxml deps)
24 %bcond_with             valgrind                # compile code with valgrind support.
25 %bcond_with             dirhide                 # with 'hide from dirlisting' hack
26
27 # Prerelease snapshot: DATE-TIME
28 #define _snap 20050116-1743
29
30 %if 0%{?_snap}
31 %define _source http://www.lighttpd.net/download/%{name}-%{version}-%{_snap}.tar.gz
32 %else
33 %define _source http://www.lighttpd.net/download/%{name}-%{version}.tar.gz
34 %endif
35
36 %define         _rel 0.1
37
38 Summary:        Fast and light HTTP server
39 Summary(pl):    Szybki i lekki serwer HTTP
40 Name:           lighttpd
41 Version:        1.4.1
42 Release:        %{_rel}%{?_snap:.%(echo %{_snap}|tr - _)}
43 Group:          Networking/Daemons
44 License:        BSD
45 Source0:        %{_source}
46 # Source0-md5:  3abffbe574fd835721760a37c00d3714
47 Source1:        %{name}.init
48 Source2:        %{name}.conf
49 Source3:        %{name}.user
50 Source4:        %{name}.logrotate
51 Source5:        %{name}.sysconfig
52 Patch0:         http://minghetti.ch/blob/dirlist-hide.patch
53 Patch1:         %{name}-fcgi-verbose.patch
54 Patch2:         %{name}-ssl-redirect-fix.patch
55 URL:            http://www.lighttpd.net/
56 %{?with_xattr:BuildRequires:    attr-devel}
57 BuildRequires:  autoconf
58 BuildRequires:  automake
59 BuildRequires:  bzip2-devel
60 %{?with_gamin:BuildRequires:    gamin-devel}
61 %{?with_webdav_props:BuildRequires:     sqlite3-devel}
62 %{?with_webdav_props:BuildRequires:     libxml2-devel}
63 BuildRequires:  libtool
64 %{?with_mysql:BuildRequires:    mysql-devel}
65 %{?with_ldap:BuildRequires:             openldap-devel}
66 %{?with_ssl:BuildRequires:      openssl-devel}
67 %{?with_lua:BuildRequires:      lua50-devel}
68 %{?with_memcache:BuildRequires: libmemcache-devel}
69 %{?with_gdbm:BuildRequires:     gdbm-devel}
70 BuildRequires:  pcre-devel
71 BuildRequires:  rpmbuild(macros) >= 1.202
72 %{?debug:BuildRequires: valgrind}
73 BuildRequires:  zlib-devel
74 PreReq:         rc-scripts
75 Requires(pre):  sh-utils
76 Requires(pre):  /bin/id
77 Requires(pre):  /usr/bin/getgid
78 Requires(pre):  /usr/sbin/groupadd
79 Requires(pre):  /usr/sbin/useradd
80 Requires(post,preun):   /sbin/chkconfig
81 Requires(postun):       /usr/sbin/groupdel
82 Requires(postun):       /usr/sbin/userdel
83 Provides:       group(lighttpd)
84 Provides:       httpd
85 Provides:       user(lighttpd)
86 Provides:       webserver
87 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
88
89 %define         _libdir         %{_prefix}/%{_lib}/%{name}
90 %define         _lighttpddir    /home/services/%{name}
91 %define         _sysconfdir     /etc/%{name}
92
93 %description
94 lighttpd is a secure, fast, compliant and very flexible web-server
95 which has been optimized for high-performance environments. It has a
96 very low memory footprint compared to other webservers and takes care
97 of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth,
98 Output-Compression, URL-Rewriting and many more) make lighttpd the
99 perfect webserver-software for every server that is suffering load
100 problems.
101
102 %description -l pl
103 lighttpd jest bezpiecznym, szybkim, przyjaznym i bardzo elastycznym
104 serwerem WWW, który zosta³ zoptymalizowany pod k±tem
105 wysokowydajno¶ciowych ¶rodowisk. Zajmuje bardzo ma³± ilo¶æ pamiêci w
106 porównaniu do innych serwerów WWW oraz dba o zajêto¶æ procesora.
107 Szeroki zestaw opcji (FastCGI, CGI, uwierzytelnianie, kompresja
108 wyj¶cia, przepisywanie URL-i i wiele innych) czyni± z lighttpd
109 doskona³e oprogramowanie web-serwerowe na ka¿dy serwer cierpi±cy z
110 powodu problemów z obci±¿eniem.
111
112 %package mod_compress
113 Summary:        Output Compression
114 Group:          Networking/Daemons
115 URL:            http://www.lighttpd.net/documentation/compress.html
116 Requires:       %{name} = %{version}-%{release}
117
118 %description mod_compress
119 Output compression reduces the network load and can improve the
120 overall throughput of the webserver.
121
122 Only static content is supported up to now.
123
124 The server negotiates automaticly which compression method is used.
125 Supported are gzip, deflate, bzip.
126
127 %package mod_cml
128 Summary:        Cache Meta Language module
129 Group:          Networking/Daemons
130 URL:            http://www.lighttpd.net/documentation/cml.html
131 Requires:       %{name} = %{version}-%{release}
132
133 %description mod_cml
134 CML is a Meta language to describe the dependencies of a page at one
135 side and building a page from its fragments on the other side using
136 LUA.
137
138 %package mod_mysql_vhost
139 Summary:        MySQL based vhosting
140 Group:          Networking/Daemons
141 URL:            http://www.lighttpd.net/documentation/mysqlvhost.html
142 Requires:       %{name} = %{version}-%{release}
143
144 %description mod_mysql_vhost
145 This module provides virtual hosts (vhosts) based on a MySQL table.
146
147 %package mod_trigger_b4_dl
148 Summary:        Trigger before Download
149 Group:          Networking/Daemons
150 URL:            http://www.lighttpd.net/documentation/trigger_b4_dl.html
151 Requires:       %{name} = %{version}-%{release}
152
153 %description mod_trigger_b4_dl
154 Another anti hot-linking module.
155
156 %package mod_webdav
157 Summary:        WebDAV module for lighttpd
158 Group:          Networking/Daemons
159 URL:            http://www.lighttpd.net/documentation/webdav.html
160 Requires:       %{name} = %{version}-%{release}
161
162 %description mod_webdav
163 The WebDAV module is a very minimalistic implementation of RFC 2518.
164 Minimalistic means that not all operations are implementated yet.
165
166 So far we have
167 - PROPFIND
168 - OPTIONS
169 - MKCOL
170 - DELETE
171 - PUT
172
173 and the usual GET, POST, HEAD from HTTP/1.1.
174
175 So far mounting a webdav resource into Windows XP works and the basic
176 litmus tests are passed.
177
178 %package -n spawn-fcgi
179 Summary:        Spawn fcgi-process directly
180 Summary(pl):    Bezpo¶rednie uruchamianie procesów fcgi
181 Group:          Applications
182
183 %description -n spawn-fcgi
184 spawn-fcgi is used to spawn fcgi-process directly without the help of
185 a webserver or the programm itself.
186
187 %description -n spawn-fcgi -l pl
188 spawn-fcgi s³u¿y do uruchamiania procesów fcgi bezpo¶rednio, bez
189 pomocy serwera WWW ani samego programu.
190
191 %prep
192 %setup -q
193 %{?with_dirhide:%patch0 -p0}
194 %patch1 -p1
195 %patch2 -p1
196
197 %build
198 %{__libtoolize}
199 %{__aclocal}
200 %{__autoconf}
201
202 %configure \
203         %{!?with_ipv6:--disable-ipv6} \
204         %{!?with_largefile:--disable-lfs} \
205         %{?with_valgrind:--with-valgrind} \
206         %{?with_xattr:--with-attr} \
207         %{?with_mysql:--with-mysql} \
208         %{?with_ldap:--with-ldap} \
209         %{?with_ssl:--with-openssl} \
210         %{?with_lua:--with-lua} \
211         %{?with_memcache:--with-memcache} \
212         %{?with_webdav_props:--with-webdav-props} \
213         %{?with_gamin:--with-gamin} \
214         %{?with_gdbm:--with-gdbm}
215
216 %{__make}
217
218 %install
219 rm -rf $RPM_BUILD_ROOT
220 install -d $RPM_BUILD_ROOT{%{_lighttpddir}/{cgi-bin,html},/etc/{logrotate.d,rc.d/init.d,sysconfig},%{_sysconfdir}} \
221         $RPM_BUILD_ROOT/var/log/{%{name},archiv/%{name}}
222
223 %{__make} install \
224         DESTDIR=$RPM_BUILD_ROOT
225
226 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
227 install %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
228 install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
229 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
230
231 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
232
233 # could use automake patch, but automake generation fails...
234 mv $RPM_BUILD_ROOT%{_bindir}/spawn-fcgi $RPM_BUILD_ROOT%{_sbindir}/spawn-fcgi
235
236 %clean
237 rm -rf $RPM_BUILD_ROOT
238
239 %pre
240 %groupadd -g 109 lighttpd
241 %useradd -u 116 -d %{_lighttpddir} -c "HTTP User" -g lighttpd lighttpd
242
243 %post
244 /sbin/chkconfig --add %{name}
245 if [ -f /var/lock/subsys/%{name} ]; then
246         /etc/rc.d/init.d/%{name} restart 1>&2
247 else
248         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
249 fi
250
251 %preun
252 if [ "$1" = "0" ]; then
253         if [ -f /var/lock/subsys/%{name} ]; then
254                 /etc/rc.d/init.d/%{name} stop 1>&2
255         fi
256         /sbin/chkconfig --del %{name}
257 fi
258
259 %postun
260 if [ "$1" = "0" ]; then
261         %userremove lighttpd
262         %groupremove lighttpd
263 fi
264
265 %triggerpostun -- %{name} <= 1.3.6-2
266 # upgraded
267 if [ "$1" = "2" ]; then
268 %banner %{name} -e <<EOF
269 spawn-fcgi program is now available separately from spawn-fcgi package.
270
271 EOF
272 fi
273
274 %files
275 %defattr(644,root,root,755)
276 %doc NEWS README ChangeLog doc/lighttpd.conf doc/*.txt doc/rrdtool-graph.sh
277 %attr(755,root,root) %{_sbindir}/*
278 %dir %{_libdir}
279 %attr(755,root,root) %{_libdir}/mod_access.so
280 %attr(755,root,root) %{_libdir}/mod_accesslog.so
281 %attr(755,root,root) %{_libdir}/mod_alias.so
282 %attr(755,root,root) %{_libdir}/mod_auth.so
283 %attr(755,root,root) %{_libdir}/mod_cgi.so
284 %attr(755,root,root) %{_libdir}/mod_dirlisting.so
285 %attr(755,root,root) %{_libdir}/mod_evhost.so
286 %attr(755,root,root) %{_libdir}/mod_expire.so
287 %attr(755,root,root) %{_libdir}/mod_fastcgi.so
288 %attr(755,root,root) %{_libdir}/mod_indexfile.so
289 %attr(755,root,root) %{_libdir}/mod_proxy.so
290 %attr(755,root,root) %{_libdir}/mod_redirect.so
291 %attr(755,root,root) %{_libdir}/mod_rewrite.so
292 %attr(755,root,root) %{_libdir}/mod_rrdtool.so
293 %attr(755,root,root) %{_libdir}/mod_scgi.so
294 %attr(755,root,root) %{_libdir}/mod_secdownload.so
295 %attr(755,root,root) %{_libdir}/mod_setenv.so
296 %attr(755,root,root) %{_libdir}/mod_simple_vhost.so
297 %attr(755,root,root) %{_libdir}/mod_ssi.so
298 %attr(755,root,root) %{_libdir}/mod_staticfile.so
299 %attr(755,root,root) %{_libdir}/mod_status.so
300 %attr(755,root,root) %{_libdir}/mod_userdir.so
301 %attr(755,root,root) %{_libdir}/mod_usertrack.so
302 %attr(750,root,root) %dir /var/log/archiv/%{name}
303 %dir %attr(750,lighttpd,root) /var/log/%{name}
304 %attr(755,lighttpd,lighttpd) %{_lighttpddir}
305 %attr(754,root,root) /etc/rc.d/init.d/%{name}
306 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
307 %dir %attr(750,root,lighttpd) %{_sysconfdir}
308 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
309 %attr(640,root,lighttpd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.user
310 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
311 %{_mandir}/man?/*
312
313 %files mod_compress
314 %defattr(644,root,root,755)
315 %attr(755,root,root) %{_libdir}/mod_compress.so
316
317 %files mod_cml
318 %defattr(644,root,root,755)
319 %attr(755,root,root) %{_libdir}/mod_cml.so
320
321 %if %{with mysql}
322 %files mod_mysql_vhost
323 %defattr(644,root,root,755)
324 %attr(755,root,root) %{_libdir}/mod_mysql_vhost.so
325 %endif
326
327 %files mod_trigger_b4_dl
328 %defattr(644,root,root,755)
329 %attr(755,root,root) %{_libdir}/mod_trigger_b4_dl.so
330
331 %files mod_webdav
332 %defattr(644,root,root,755)
333 %attr(755,root,root) %{_libdir}/mod_webdav.so
334
335 %files -n spawn-fcgi
336 %defattr(644,root,root,755)
337 %doc doc/spawn-php.sh
338 %attr(755,root,root) %{_sbindir}/spawn-fcgi
This page took 0.062191 seconds and 4 git commands to generate.