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