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