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