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