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