]> TLD Linux GIT Repositories - packages/lighttpd.git/blob - lighttpd.spec
- ehh, drop upstart leftovers again
[packages/lighttpd.git] / lighttpd.spec
1 # TODO:
2 # - provide or autogenerate self signed cert in post, so after installing
3 #   lighttpd-ssl server will still work
4 # - patch with mod_websocket: https://github.com/Juniper/lighttpd-for-juise
5 #
6 # Conditional build:
7 %bcond_with             tests           # build with tests
8 %bcond_without  xattr           # support of extended attributes
9 %bcond_without  ipv6            # IPv4-only version (doesn't require IPv6 in kernel)
10 %bcond_without  largefile       # largefile support (see notes above)
11 %bcond_without  ssl             # ssl support
12 %bcond_without  mysql           # mysql support in mod_mysql_vhost
13 %bcond_without  ldap            # ldap support in mod_auth
14 %bcond_without  lua             # LUA support in mod_cml (needs LUA >= 5.1)
15 %bcond_with     memcache        # memcached support in mod_cml / mod_trigger_b4_dl
16 %bcond_with     gamin           # gamin for reducing number of stat() calls.
17                                 # NOTE: must be enabled in config: server.stat-cache-engine = "fam"
18 %bcond_with     gdbm            # gdbm in mod_trigger_b4_dl
19 %bcond_with     webdav_props    # properties in mod_webdav (includes extra sqlite3/libxml deps)
20 %bcond_with     webdav_locks    # webdav locks with extra efsprogs deps
21 %bcond_with     valgrind        # compile code with valgrind support.
22 %bcond_with     deflate         # build deflate module (needs patch update with current svn)
23 %bcond_with     h264_streaming          # build h264_streaming module
24
25 %if %{with webdav_locks}
26 %define         webdav_progs    1
27 %endif
28
29 Summary:        Fast and light HTTP server
30 Summary(pl.UTF-8):      Szybki i lekki serwer HTTP
31 Name:           lighttpd
32 Version:        1.4.39
33 Release:        2
34 License:        BSD
35 Group:          Networking/Daemons/HTTP
36 Source0:        http://download.lighttpd.net/lighttpd/releases-1.4.x/%{name}-%{version}.tar.xz
37 # Source0-md5:  63c7563be1c7a7a9819a51f07f1af8b2
38 Source1:        %{name}.init
39 Source2:        %{name}.conf
40 Source3:        %{name}.user
41 Source4:        %{name}.logrotate
42 Source5:        %{name}.sysconfig
43 Source6:        %{name}-mime.types.sh
44 Source7:        http://glen.alkohol.ee/pld/lighty/favicon.ico
45 # Source7-md5:  00fcac5b861a54f5eb147a589504d480
46 Source8:        light_button.png
47 # Source8-md5:  3e1008ee1d3d6d390cf81fe3072b4f50
48 Source9:        light_logo.png
49 # Source9-md5:  cbb7f0676e51ee2e26cf004df293fc62
50 Source11:       %{name}.html
51 Source12:       %{name}.monitrc
52 Source13:       branch.sh
53 Source14:       TODO
54 Source100:      %{name}-mod_access.conf
55 Source101:      %{name}-mod_accesslog.conf
56 Source102:      %{name}-mod_alias.conf
57 Source103:      %{name}-mod_auth.conf
58 Source104:      %{name}-mod_cgi.conf
59 Source105:      %{name}-mod_cml.conf
60 Source106:      %{name}-mod_compress.conf
61 Source107:      %{name}-mod_deflate.conf
62 Source108:      %{name}-mod_dirlisting.conf
63 Source109:      %{name}-mod_evasive.conf
64 Source110:      %{name}-mod_evhost.conf
65 Source111:      %{name}-mod_expire.conf
66 Source112:      %{name}-mod_fastcgi.conf
67 Source113:      %{name}-mod_flv_streaming.conf
68 Source114:      %{name}-mod_indexfile.conf
69 Source115:      %{name}-mod_proxy.conf
70 Source116:      %{name}-mod_redirect.conf
71 Source117:      %{name}-mod_rewrite.conf
72 Source118:      %{name}-mod_rrdtool.conf
73 Source119:      %{name}-mod_scgi.conf
74 Source120:      %{name}-mod_secdownload.conf
75 Source121:      %{name}-mod_setenv.conf
76 Source122:      %{name}-mod_simple_vhost.conf
77 Source123:      %{name}-mod_ssi.conf
78 Source124:      %{name}-mod_staticfile.conf
79 Source125:      %{name}-mod_status.conf
80 Source126:      %{name}-mod_trigger_b4_dl.conf
81 Source127:      %{name}-mod_userdir.conf
82 Source128:      %{name}-mod_usertrack.conf
83 Source129:      %{name}-mod_webdav.conf
84 Source130:      %{name}-php-spawned.conf
85 Source131:      %{name}-php-external.conf
86 Source132:      %{name}-ssl.conf
87 Source133:      %{name}-mod_mysql_vhost.conf
88 Source134:      %{name}-mod_magnet.conf
89 Source135:      %{name}-mod_extforward.conf
90 Source136:      %{name}-mod_h264_streaming.conf
91 Source137:      %{name}-mod_cgi_php.conf
92 Source138:      %{name}-mod_compress.tmpwatch
93 # use branch.sh script to create branch.diff
94 #Patch100:      %{name}-branch.diff
95 ## Patch100-md5:        cdcde8cb4632a42c5ae21d73aae9d34b
96 Patch0:         %{name}-use_bin_sh.patch
97 Patch1:         %{name}-mod_evasive-status_code.patch
98 Patch2:         %{name}-mod_h264_streaming.patch
99 Patch3:         %{name}-branding.patch
100 Patch5:         %{name}-mod_deflate.patch
101 Patch6:         test-port-setup.patch
102 Patch7:         env-documentroot.patch
103 #Patch:         %{name}-modinit-before-fork.patch
104 #Patch:         %{name}-errorlog-before-fork.patch
105 URL:            http://www.lighttpd.net/
106 %{?with_xattr:BuildRequires:    attr-devel}
107 BuildRequires:  autoconf >= 2.57
108 %if "%{pld_release}" != "ac"
109 BuildRequires:  automake >= 1:1.11.2
110 %else
111 BuildRequires:  automake
112 %endif
113 BuildRequires:  bzip2-devel
114 BuildRequires:  fcgi-devel
115 %{?with_gamin:BuildRequires:    gamin-devel}
116 %{?with_gdbm:BuildRequires:     gdbm-devel}
117 %{?with_memcache:BuildRequires: libmemcache-devel}
118 BuildRequires:  libtool
119 BuildRequires:  libuuid-devel
120 %{?with_webdav_props:BuildRequires:     libxml2-devel}
121 %{?with_lua:BuildRequires:      lua51-devel}
122 BuildRequires:  mailcap >= 2.1.14-4.4
123 %{?with_mysql:BuildRequires:    mysql-devel}
124 %{?with_ldap:BuildRequires:     openldap-devel}
125 %{?with_ssl:BuildRequires:      openssl-devel}
126 BuildRequires:  pcre-devel
127 BuildRequires:  pkgconfig
128 BuildRequires:  rpm >= 4.4.9-56
129 BuildRequires:  rpmbuild(macros) >= 1.647
130 %{?with_webdav_props:BuildRequires:     sqlite3-devel}
131 BuildRequires:  tar >= 1:1.22
132 %{?with_valgrind:BuildRequires: valgrind}
133 BuildRequires:  which
134 BuildRequires:  xz
135 BuildRequires:  zlib-devel
136 Requires(post,preun):   /sbin/chkconfig
137 Requires(postun):       /usr/sbin/groupdel
138 Requires(postun):       /usr/sbin/userdel
139 Requires(pre):  /bin/id
140 Requires(pre):  /usr/bin/getgid
141 Requires(pre):  /usr/lib/rpm/user_group.sh
142 Requires(pre):  /usr/sbin/groupadd
143 Requires(pre):  /usr/sbin/useradd
144 Requires(pre):  /usr/sbin/usermod
145 Requires:       %{name}-mod_dirlisting = %{version}-%{release}
146 Requires:       %{name}-mod_indexfile = %{version}-%{release}
147 Requires:       %{name}-mod_staticfile = %{version}-%{release}
148 Requires:       rc-scripts >= 0.4.3.0
149 Requires:       rpm-whiteout >= 1.5
150 Suggests:       %{name}-mod_accesslog
151 Provides:       group(http)
152 Provides:       group(lighttpd)
153 Provides:       user(lighttpd)
154 Provides:       webserver
155 Provides:       webserver(headers)
156 Provides:       webserver(mime)
157 Conflicts:      logrotate < 3.7-4
158 # for the posttrans scriptlet, conflicts because in vserver environment rpm package is not installed.
159 Conflicts:      rpm < 4.4.2-0.2
160 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
161
162 %define         _libdir         %{_prefix}/%{_lib}/%{name}
163 %define         _lighttpddir    /home/services/%{name}
164 %define         _sysconfdir     /etc/%{name}
165
166 %description
167 lighttpd is a secure, fast, compliant and very flexible web-server
168 which has been optimized for high-performance environments. It has a
169 very low memory footprint compared to other webservers and takes care
170 of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth,
171 Output-Compression, URL-Rewriting and many more) make lighttpd the
172 perfect webserver-software for every server that is suffering load
173 problems.
174
175 %description -l pl.UTF-8
176 lighttpd jest bezpiecznym, szybkim, przyjaznym i bardzo elastycznym
177 serwerem WWW, który został zoptymalizowany pod kątem
178 wysokowydajnościowych środowisk. Zajmuje bardzo małą ilość pamięci w
179 porównaniu do innych serwerów WWW oraz dba o zajętość procesora.
180 Szeroki zestaw opcji (FastCGI, CGI, uwierzytelnianie, kompresja
181 wyjścia, przepisywanie URL-i i wiele innych) czynią z lighttpd
182 doskonałe oprogramowanie web-serwerowe na każdy serwer cierpiący z
183 powodu problemów z obciążeniem.
184
185 %package mod_access
186 Summary:        lighttpd module for making access restrictions
187 Summary(pl.UTF-8):      Moduł lighttpd ograniczający dostęp
188 Group:          Networking/Daemons/HTTP
189 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModAccess
190 Requires:       %{name} = %{version}-%{release}
191 Provides:       webserver(access)
192
193 %description mod_access
194 The access module is used to deny access to files with given trailing
195 path names.
196
197 %description mod_access -l pl.UTF-8
198 Moduł access służy do ograniczania dostępu do plików o podanych
199 ścieżkach.
200
201 %package mod_accesslog
202 Summary:        lighttpd module to record access logs
203 Summary(pl.UTF-8):      Moduł lighttpd do zapisu logów dostępu
204 Group:          Networking/Daemons/HTTP
205 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModAccessLog
206 Requires:       %{name} = %{version}-%{release}
207
208 %description mod_accesslog
209 CLF like by default, flexible like Apache.
210
211 %description mod_accesslog -l pl.UTF-8
212 Domyślnie podobny do CLF, elastyczny jak Apache.
213
214 %package mod_alias
215 Summary:        lighttpd module for making URL aliasing
216 Summary(pl.UTF-8):      Moduł lighttpd odpowiadający za aliasy URL-i
217 Group:          Networking/Daemons/HTTP
218 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModAlias
219 Requires:       %{name} = %{version}-%{release}
220 Provides:       webserver(alias)
221
222 %description mod_alias
223 The alias module is used to specify a special document-root for a
224 given URL-subset.
225
226 %description mod_alias -l pl.UTF-8
227 Modul alias służy do określania specjalnego drzewa (document-roota)
228 dla podanego podzbioru URL-i.
229
230 %package mod_auth
231 Summary:        lighttpd module for authentication support
232 Summary(pl.UTF-8):      Moduł lighttpd do obsługi uwierzytelniania
233 Group:          Networking/Daemons/HTTP
234 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModAuth
235 Requires:       %{name} = %{version}-%{release}
236 Provides:       webserver(auth)
237
238 %description mod_auth
239 lighttpd supportes both authentication method described by RFC 2617:
240 basic and digest.
241
242 %description mod_auth -l pl.UTF-8
243 lighttpd obsługuje obie metody uwierzytelniania opisane w RFC 2617:
244 basic i digest.
245
246 %package mod_cgi
247 Summary:        lighttpd module for CGI handling
248 Summary(pl.UTF-8):      Moduł lighttpd do obsługi CGI
249 Group:          Networking/Daemons/HTTP
250 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModCGI
251 Requires:       %{name} = %{version}-%{release}
252 Requires:       %{name}-mod_alias = %{version}-%{release}
253 Provides:       webserver(cgi)
254
255 %description mod_cgi
256 The cgi module provides a CGI-conforming interface.
257
258 CGI programs allow you to enhance the functionality of the server in a
259 very straight and simple way.
260
261 %description mod_cgi -l pl.UTF-8
262 Moduł cgi udostępnia interfejs zgodny z CGI.
263
264 Programy CGI pozwalają rozszerzać funkcjonalność serwera w bardzo
265 prosty i naturalny sposób.
266
267 %package mod_cgi_php
268 Summary:        lighttpd module for CGI handling PHP scripts
269 Summary(pl.UTF-8):      Moduł lighttpd do obsługi skryptów PHP przez CGI
270 Group:          Networking/Daemons/HTTP
271 Requires:       %{name}-mod_cgi = %{version}-%{release}
272 Requires:       php(cgi)
273 Provides:       webserver(php)
274
275 %description mod_cgi_php
276 The cgi module provides a CGI-conforming interface for PHP scripts.
277
278 CGI programs allow you to enhance the functionality of the server in a
279 very straight and simple way.
280
281 %description mod_cgi_php -l pl.UTF-8
282 Moduł cgi udostępnia interfejs zgodny z CGI do wywoływania skryptów
283 PHP.
284
285 Programy CGI pozwalają rozszerzać funkcjonalność serwera w bardzo
286 prosty i naturalny sposób.
287
288 %package mod_cml
289 Summary:        lighttpd module for Cache Meta Language
290 Summary(pl.UTF-8):      Moduł Cache Meta Language
291 Group:          Networking/Daemons/HTTP
292 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModCML
293 Requires:       %{name} = %{version}-%{release}
294
295 %description mod_cml
296 CML is a Meta language to describe the dependencies of a page at one
297 side and building a page from its fragments on the other side using
298 LUA.
299
300 %description mod_cml -l pl.UTF-8
301 CML to metajęzyk służący z jednej strony do opisu zależności strony i
302 z drugiej strony do budowania strony z fragmentów przy użyciu LUA.
303
304 %package mod_compress
305 Summary:        lighttpd module for output compression
306 Summary(pl.UTF-8):      Moduł lighttpd do kompresji wyjścia
307 Group:          Networking/Daemons/HTTP
308 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModCompress
309 Requires:       %{name} = %{version}-%{release}
310
311 %description mod_compress
312 Output compression reduces the network load and can improve the
313 overall throughput of the webserver.
314
315 Only static content is supported up to now.
316
317 The server negotiates automatically which compression method is used.
318 Supported are gzip, deflate, bzip.
319
320 %description mod_compress -l pl.UTF-8
321 Kompresja wyjścia zmniejsza obciążenie sieci i może poprawić całkowitą
322 przepustowość serwera WWW.
323
324 Jak na razie obsługiwana jest tylko statyczna treść.
325
326 Serwer automatycznie negocjuje, która metoda kompresji jest używana.
327 Obsługiwane są gzip, deflate i bzip.
328
329 %package mod_deflate
330 Summary:        lighttpd module for output compression using deflate method
331 Summary(pl.UTF-8):      Moduł lighttpd do kompresji wyjścia metodą deflate
332 Group:          Networking/Daemons/HTTP
333 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Mod_Deflate
334 Requires:       %{name} = %{version}-%{release}
335
336 %description mod_deflate
337 mod_deflate can compress any output from lighttpd static or dynamic.
338 It doesn't support caching compressed output like mod_compress.
339
340 %description mod_deflate -l pl.UTF-8
341 mod_deflate potrafi kompresować statyczne i dynamiczne wyjście z
342 lighttpd. Nie obsługuje cache'owania wyniku kompresji, jak robi to
343 mod_compress.
344
345 %package mod_dirlisting
346 Summary:        lighttpd module for directory listings
347 Summary(pl.UTF-8):      Moduł lighttpd do tworzenia listingów katalogów
348 Group:          Networking/Daemons/HTTP
349 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModDirlisting
350 Requires:       %{name} = %{version}-%{release}
351
352 %description mod_dirlisting
353 mod_dirlisting generates HTML based directory listings with full CSS
354 control.
355
356 %description mod_dirlisting -l pl.UTF-8
357 mod_dirlisting tworzy listingi katalogów w formacie HTML z pełną
358 kontrolą CSS.
359
360 %package mod_evasive
361 Summary:        lighttpd evasive module
362 Summary(pl.UTF-8):      Moduł evasive dla lighttpd
363 Group:          Networking/Daemons/HTTP
364 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModEvasive
365 Requires:       %{name} = %{version}-%{release}
366
367 %description mod_evasive
368 lighttpd evasive module.
369
370 %description mod_evasive -l pl.UTF-8
371 Moduł evasive dla lighttpd.
372
373 %package mod_evhost
374 Summary:        lighttpd module for enhanced virtual-hosting
375 Summary(pl.UTF-8):      Moduł lighttpd rozszerzający obsługę hostów wirtualnych
376 Group:          Networking/Daemons/HTTP
377 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModEVhost
378 Requires:       %{name} = %{version}-%{release}
379
380 %description mod_evhost
381 mod_evhost builds the document-root based on a pattern which contains
382 wildcards. Those wildcards can represent parts of the submitted
383 hostname.
384
385 %description mod_evhost -l pl.UTF-8
386 mod_evhost tworzy document-root w oparciu o wzorzec zawierający znaki
387 wieloznaczne (wildcards). Znaki te reprezentują części przekazanej
388 nazwy hosta.
389
390 %package mod_expire
391 Summary:        lighttpd module for controlling the expiration of content in caches
392 Summary(pl.UTF-8):      Moduł lighttpd sterujący wygasaniem treści w cache'ach
393 Group:          Networking/Daemons/HTTP
394 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModExpire
395 Requires:       %{name} = %{version}-%{release}
396 Provides:       webserver(expires)
397
398 %description mod_expire
399 mod_expire controls the setting of the the Expire response header.
400
401 %description mod_expire -l pl.UTF-8
402 mod_expire steruje ustawianiem nagłówka odpowiedzi Expire.
403
404 %package mod_extforward
405 Summary:        lighttpd module to extract the client's "real" IP from X-Forwarded-For header
406 Summary(pl.UTF-8):      Moduł lighttpd wyciągający "prawdziwy" IP klienta z nagłówka X-Forwarded-For
407 Group:          Networking/Daemons/HTTP
408 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/DocsModExtForward
409 Requires:       %{name} = %{version}-%{release}
410
411 %description mod_extforward
412 This module will extract the client's "real" IP from X-Forwarded-For
413 header which is added by Squid or other proxies. It might be useful
414 for servers behind reverse proxy servers.
415
416 %description mod_extforward -l pl.UTF-8
417 Ten moduł wyciąga "prawdziwy" IP klienta z nagłówka X-Forwarded-For
418 dodawanego przez Squida czy inne proxy. Może być przydatny dla
419 serwerów stojących za odwrotnymi serwerami proxy.
420
421 %package mod_fastcgi
422 Summary:        lighttpd module for FastCGI interface
423 Summary(pl.UTF-8):      Moduł lighttpd do interfejsu FastCGI
424 Group:          Networking/Daemons/HTTP
425 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModFastCGI
426 Requires:       %{name} = %{version}-%{release}
427
428 %description mod_fastcgi
429 The FastCGI interface is the fastest and most secure way to interface
430 external process-handlers like Perl, PHP and your self-written
431 applications.
432
433 %description mod_fastcgi -l pl.UTF-8
434 Interfejs FastCGI to najszybszy i najbezpieczniejszy sposób
435 komunikacji z zewnętrznymi programami obsługującymi procesy, takimi
436 jak Perl, PHP czy własne aplikacje.
437
438 %package mod_flv_streaming
439 Summary:        lighttpd module for flv streaming
440 Summary(pl.UTF-8):      Moduł lighttpd do streamingu flv
441 Group:          Networking/Daemons/HTTP
442 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModFLVStreaming
443 Requires:       %{name} = %{version}-%{release}
444
445 %description mod_flv_streaming
446 lighttpd module for flv streaming.
447
448 %description mod_flv_streaming -l pl.UTF-8
449 Moduł lighttpd do streamingu flv.
450
451 %package mod_h264_streaming
452 Summary:        lighttpd module for h264 streaming
453 Summary(pl.UTF-8):      Moduł lighttpd do emisji strumieni h264
454 License:        CC 3.0 BY-NC-SA
455 Group:          Networking/Daemons/HTTP
456 URL:            http://h264.code-shop.com/trac/wiki/Mod-H264-Streaming-Lighttpd-Version2
457 Requires:       %{name} = %{version}-%{release}
458
459 %description mod_h264_streaming
460 A lighttpd plugin for pseudo-streaming QuickTime/MPEG-4 files.
461
462 %description mod_h264_streaming -l pl.UTF-8
463 Moduł lighttpd do pseudostreamingu plików QuickTime/MPEG-4.
464
465 %package mod_indexfile
466 Summary:        lighttpd indexfile module
467 Summary(pl.UTF-8):      Moduł indexfile dla lighttpd
468 Group:          Networking/Daemons/HTTP
469 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Index-file-names.Details
470 Requires:       %{name} = %{version}-%{release}
471 Provides:       webserver(indexfile)
472
473 %description mod_indexfile
474 indexfile module.
475
476 %description mod_indexfile -l pl.UTF-8
477 Moduł indexfile.
478
479 %package mod_magnet
480 Summary:        lighttpd powermagnet module
481 Summary(pl.UTF-8):      Moduł powermagnet dla lighttpd
482 Group:          Networking/Daemons/HTTP
483 URL:            http://redmine.lighttpd.net/wiki/lighttpd/Docs:ModMagnet
484 Requires:       %{name} = %{version}-%{release}
485
486 %description mod_magnet
487 mod_magnet is a module to control the request handling in lighty.
488
489 %description mod_magnet -l pl.UTF-8
490 mod_magnet to moduł sterujący obsługą żądań w lighty.
491
492 %package mod_mysql_vhost
493 Summary:        lighttpd module for MySQL based vhosting
494 Summary(pl.UTF-8):      Moduł lighttpd obsługujący vhosty oparte na MySQL-u
495 Group:          Networking/Daemons/HTTP
496 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModMySQLVhost
497 Requires:       %{name} = %{version}-%{release}
498 Conflicts:      %{name}-mod_simple_vhost
499
500 %description mod_mysql_vhost
501 This module provides virtual hosts (vhosts) based on a MySQL table.
502
503 %description mod_mysql_vhost -l pl.UTF-8
504 Ten moduł udostępnia wirtualne hosty (vhosty) oparte na tabeli MySQL.
505
506 %package mod_proxy
507 Summary:        lighttpd module for proxying requests
508 Summary(pl.UTF-8):      Moduł lighttpd do przekazywania żądań
509 Group:          Networking/Daemons/HTTP
510 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModProxy
511 Requires:       %{name} = %{version}-%{release}
512
513 %description mod_proxy
514 The proxy module a simplest way to connect lighttpd to Java servers
515 which have a HTTP-interface.
516
517 %description mod_proxy -l pl.UTF-8
518 Moduł proxy to najprostszy sposób łączenia lighttpd z serwerami Javy
519 mającymi interfejs HTTP.
520
521 %package mod_proxy_core
522 Summary:        lighttpd module for proxying requests
523 Summary(pl.UTF-8):      Moduł lighttpd do przekazywania żądań
524 Group:          Networking/Daemons/HTTP
525 URL:            http://blog.lighttpd.net/articles/2006/07/18/mod_proxy_core-commited-to-svn
526 Requires:       %{name} = %{version}-%{release}
527
528 %description mod_proxy_core
529 The proxy module a simplest way to connect lighttpd to java servers
530 which have a HTTP-interface.
531
532 This is the new proxy code.
533
534 %description mod_proxy_core -l pl.UTF-8
535 Moduł proxy to najprostszy sposób łączenia lighttpd z serwerami Javy
536 mającymi interfejs HTTP.
537
538 Ten pakiet zawiera nowy moduł proxy.
539
540 %package mod_redirect
541 Summary:        lighttpd module for URL redirects
542 Summary(pl.UTF-8):      Moduł lighttpd do przekierowań URL-i
543 Group:          Networking/Daemons/HTTP
544 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModRedirect
545 Requires:       %{name} = %{version}-%{release}
546
547 %description mod_redirect
548 With mod_redirect module you can redirect a set of URLs externally.
549
550 %description mod_redirect -l pl.UTF-8
551 Przy użyciu modułu mod_redirect można przekierować zbiór URL-i na
552 zewnątrz.
553
554 %package mod_rewrite
555 Summary:        lighttpd module for internal redirects, URL rewrite
556 Summary(pl.UTF-8):      Moduł lighttpd do wewnętrznych przekierowań i przepisywania URL-i
557 Group:          Networking/Daemons/HTTP
558 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModRewrite
559 Requires:       %{name} = %{version}-%{release}
560 Provides:       webserver(rewrite)
561
562 %description mod_rewrite
563 This module allows you rewrite a set of URLs interally in the
564 webserver BEFORE they are handled.
565
566 %description mod_rewrite -l pl.UTF-8
567 Ten moduł pozwala na przepisywanie zbioru URL-i wewnętrznie w serwerze
568 WWW _przed_ ich obsługą.
569
570 %package mod_rrdtool
571 Summary:        lighttpd module for monitoring traffic and server load
572 Summary(pl.UTF-8):      Moduł lighttpd do monitorowania ruchu i obciążenia serwera
573 Group:          Networking/Daemons/HTTP
574 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModRRDTool
575 Requires:       %{name} = %{version}-%{release}
576 Requires:       rrdtool
577
578 %description mod_rrdtool
579 RRD is a system to store and display time-series data (i.e. network
580 bandwidth, machine-room temperature, server load average).
581
582 With this module you can monitor the traffic and load on the
583 webserver.
584
585 %description mod_rrdtool -l pl.UTF-8
586 RRD to system przechowywania i wyświetlania danych zależnych od czasu
587 (np. obciążenia sieci, temperatury w serwerowni, średniego obciążenia
588 serwera).
589
590 Przy użyciu tego modułu można monitorować ruch i obciążenie serwera
591 WWW.
592
593 %package mod_scgi
594 Summary:        lighttpd module for SCGI interface
595 Summary(pl.UTF-8):      Moduł lighttpd do interfejsu SCGI
596 Group:          Networking/Daemons/HTTP
597 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModSCGI
598 Requires:       %{name} = %{version}-%{release}
599
600 %description mod_scgi
601 SCGI is a fast and simplified CGI interface. It is mostly used by
602 Python + WSGI.
603
604 %description mod_scgi -l pl.UTF-8
605 SCGI to szybki i uproszczony interfejs CGI. Jest używany głównie przez
606 Pythona z WSGI.
607
608 %package mod_secdownload
609 Summary:        lighttpd module for secure and fast downloading
610 Summary(pl.UTF-8):      Moduł lighttpd do bezpiecznego i szybkiego ściągania danych
611 Group:          Networking/Daemons/HTTP
612 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModSecDownload
613 Requires:       %{name} = %{version}-%{release}
614
615 %description mod_secdownload
616 With this module you can easily achieve authenticated file requests
617 and a countermeasure against deep-linking.
618
619 %description mod_secdownload -l pl.UTF-8
620 Przy użyciu tego modułu można łatwo umożliwić ściąganie plików z
621 uwierzytelnieniem i zapobiec używaniu bezpośrednich odnośników.
622
623 %package mod_setenv
624 Summary:        lighttpd module for setting conditional request headers
625 Summary(pl.UTF-8):      Moduł lighttpd do ustawiania warunkowych nagłówków żądań
626 Group:          Networking/Daemons/HTTP
627 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModSetEnv
628 Requires:       %{name} = %{version}-%{release}
629 Provides:       webserver(setenv)
630
631 %description mod_setenv
632 mod_setenv is used to add request headers.
633
634 %description mod_setenv -l pl.UTF-8
635 mod_setenv służy do dodawania nagłówków żądań.
636
637 %package mod_simple_vhost
638 Summary:        lighttpd module for simple virtual-hosting
639 Summary(pl.UTF-8):      Moduł lighttpd do prostych hostów wirtualnych
640 Group:          Networking/Daemons/HTTP
641 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModSimpleVhost
642 Requires:       %{name} = %{version}-%{release}
643 Conflicts:      %{name}-mod_mysql_vhost
644
645 %description mod_simple_vhost
646 lighttpd module for simple virtual-hosting.
647
648 %description mod_simple_vhost -l pl.UTF-8
649 Moduł lighttpd do prostych hostów wirtualnych.
650
651 %package mod_ssi
652 Summary:        lighttpd module for server-side includes
653 Summary(pl.UTF-8):      Moduł lighttpd do SSI (server-side includes)
654 Group:          Networking/Daemons/HTTP
655 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModSSI
656 Requires:       %{name} = %{version}-%{release}
657
658 %description mod_ssi
659 The module for server-side includes provides a compatability layer for
660 NSCA/Apache SSI.
661
662 %description mod_ssi -l pl.UTF-8
663 Moduł server-side includes udostępnia warstwę kompatybilności z SSI
664 znanym z NSCA/Apache'a.
665
666 %package mod_staticfile
667 Summary:        lighttpd module for static file serving
668 Summary(pl.UTF-8):      Moduł lighttpd do serwowania statycznych plików
669 Group:          Networking/Daemons/HTTP
670 Requires:       %{name} = %{version}-%{release}
671
672 %description mod_staticfile
673 lighttpd module for static file serving.
674
675 %description mod_staticfile -l pl.UTF-8
676 Moduł lighttpd do serwowania statycznych plików.
677
678 %package mod_status
679 Summary:        lighttpd module for displaying server status
680 Summary(pl.UTF-8):      Moduł lighttpd do wyświetlania stanu serwera
681 Group:          Networking/Daemons/HTTP
682 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModStatus
683 Requires:       %{name} = %{version}-%{release}
684
685 %description mod_status
686 mod_status displays the server's status and configuration.
687
688 %description mod_status -l pl.UTF-8
689 mod_status wyświetla stan i konfigurację serwera.
690
691 %package mod_trigger_b4_dl
692 Summary:        Trigger before Download
693 Summary(pl.UTF-8):      Wyzwalacz przed ściąganiem
694 Group:          Networking/Daemons/HTTP
695 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModTriggerBeforeDownload
696 Requires:       %{name} = %{version}-%{release}
697
698 %description mod_trigger_b4_dl
699 Another anti hot-linking module.
700
701 %description mod_trigger_b4_dl -l pl.UTF-8
702 Jeszcze jeden moduł blokujący bezpośrednie linkowanie.
703
704 %package mod_userdir
705 Summary:        lighttpd module for user homedirs
706 Summary(pl.UTF-8):      Moduł lighttpd obsługujący katalogi domowe użytkowników
707 Group:          Networking/Daemons/HTTP
708 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModUserDir
709 Requires:       %{name} = %{version}-%{release}
710
711 %description mod_userdir
712 The userdir module provides a simple way to link user-based
713 directories into the global namespace of the webserver.
714
715 %description mod_userdir -l pl.UTF-8
716 Moduł userdir udostępnia prosty sposób włączenia katalogów
717 użytkowników do globalnej przestrzeni nazw serwera WWW.
718
719 %package mod_usertrack
720 Summary:        lighttpd usertrack module
721 Summary(pl.UTF-8):      Moduł usertrack dla lighttpd
722 Group:          Networking/Daemons/HTTP
723 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModUserTrack
724 Requires:       %{name} = %{version}-%{release}
725
726 %description mod_usertrack
727 lighttpd usertrack module.
728
729 %description mod_usertrack -l pl.UTF-8
730 Moduł usertrack dla lighttpd.
731
732 %package mod_webdav
733 Summary:        WebDAV module for lighttpd
734 Summary(pl.UTF-8):      Moduł WebDAV dla libghttpd
735 Group:          Networking/Daemons/HTTP
736 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:ModWebDAV
737 Requires:       %{name} = %{version}-%{release}
738
739 %description mod_webdav
740 The WebDAV module is a very minimalistic implementation of RFC 2518.
741 Minimalistic means that not all operations are implementated yet.
742
743 So far we have
744 - PROPFIND
745 - OPTIONS
746 - MKCOL
747 - DELETE
748 - PUT
749 - LOCK (experimental)
750
751 and the usual GET, POST, HEAD from HTTP/1.1.
752
753 So far mounting a webdav resource into Windows XP works and the basic
754 litmus tests are passed.
755
756 %description mod_webdav -l pl.UTF-8
757 Moduł WebDAV to bardzo minimalistyczna implementacja RFC 2518.
758 Minimalistyczna oznacza, że jeszcze nie wszystkie operacje są
759 zaimplementowane. Jak na razie są:
760 - PROPFIND
761 - OPTIONS
762 - MKCOL
763 - DELETE
764 - PUT
765 - LOCK (experimental)
766
767 oraz zwykłe GET, POST, HEAD z HTTP/1.1.
768
769 Jak na razie montowanie zasobu webdav pod Windows XP działa i
770 podstawowe testy lakmusowe przechodzą.
771
772 %package php-spawned
773 Summary:        PHP support via FastCGI, spawned by lighttpd
774 Summary(pl.UTF-8):      Obsługa PHP przez FastCGI, uruchamiane przez lighttpd
775 Group:          Networking/Daemons/HTTP
776 Requires:       %{name} = %{version}-%{release}
777 Requires:       %{name}-mod_fastcgi = %{version}-%{release}
778 Requires:       php(fcgi)
779 Provides:       webserver(php)
780 Obsoletes:      lighttpd-php-external
781
782 %description php-spawned
783 PHP support via FastCGI, spawned by lighttpd.
784
785 %description php-spawned -l pl.UTF-8
786 Obsługa PHP przez FastCGI, uruchamiane przez lighttpd.
787
788 %package php-external
789 Summary:        PHP support via FastCGI, spawning controlled externally
790 Summary(pl.UTF-8):      Obsługa PHP przez FastCGI, uruchamianie sterowane zewnętrznie
791 Group:          Networking/Daemons/HTTP
792 Requires:       %{name} = %{version}-%{release}
793 Requires:       %{name}-mod_fastcgi = %{version}-%{release}
794 Suggests:       php(fpm)
795 Suggests:       php-fcgi-init
796 Obsoletes:      lighttpd-php-spawned
797
798 %description php-external
799 PHP support via FastCGI, spawning controlled externally.
800
801 %description php-external -l pl.UTF-8
802 Obsługa PHP przez FastCGI, uruchamianie sterowane zewnętrznie.
803
804 %package ssl
805 Summary:        lighttpd support for SSLv2 and SSLv3
806 Summary(pl.UTF-8):      Obsługa SSLv2 i SSLv3 dla lighttpd
807 Group:          Networking/Daemons/HTTP
808 URL:            http://redmine.lighttpd.net/projects/lighttpd/wiki/Docs:SSL
809 Requires:       %{name} = %{version}-%{release}
810 Suggests:       ca-certificates
811
812 %description ssl
813 lighttpd support for SSLv2 and SSLv3.
814
815 %description ssl -l pl.UTF-8
816 Obsługa SSLv2 i SSLv3 dla lighttpd.
817
818 %package -n monit-rc-lighttpd
819 Summary:        lighttpd support for monit
820 Summary(pl.UTF-8):      Wsparcie lighttpd dla monit
821 Group:          Applications/System
822 Requires:       %{name} = %{version}-%{release}
823 Requires:       monit
824
825 %description -n monit-rc-lighttpd
826 monitrc file for monitoring lighttpd web server.
827
828 %description -n monit-rc-lighttpd -l pl.UTF-8
829 Plik monitrc do monitorowania serwera www lighttpd.
830
831 %prep
832 %setup -q
833 #%patch100 -p0
834 %patch0 -p1
835 %patch1 -p1
836 %{?with_h264_streaming:%patch2 -p1}
837 %patch3 -p1
838 %{?with_deflate:%patch5 -p1}
839 %patch6 -p1
840 %patch7 -p1
841
842 rm -f src/mod_ssi_exprparser.h # bad patching: should be removed by is emptied instead
843
844 # build mime.types.conf
845 sh %{SOURCE6} /etc/mime.types
846 cp -p %{SOURCE14} PLD-TODO
847
848 %if "%{pld_release}" == "ac"
849 %{__sed} -i -e 's/ serial_tests//' configure.ac
850 %{__sed} -i -e 's/dist-xz/dist-bzip2/' configure.ac
851 %endif
852
853 %build
854 ver=$(awk '/AC_INIT/{a=$2;gsub(/[\[\],]/, "", a); print a}' configure.ac)
855 if [ "$ver" != "%{version}" ]; then
856         : configure.ac specifies wrong version
857         exit 1
858 fi
859
860 %{__libtoolize}
861 %{__aclocal}
862 %{__autoconf}
863 %{__automake}
864
865 %configure \
866         %{!?with_ipv6:--disable-ipv6} \
867         %{!?with_largefile:--disable-lfs} \
868         %{?with_valgrind:--with-valgrind} \
869         %{?with_xattr:--with-attr} \
870         %{?with_mysql:--with-mysql} \
871         %{?with_ldap:--with-ldap} \
872         %{?with_ssl:--with-openssl} \
873         %{?with_lua:--with-lua=lua51} \
874         %{?with_memcache:--with-memcache} \
875         %{?with_webdav_props:--with-webdav-props} \
876         %{?with_webdav_locks:--with-webdav-locks} \
877         %{?with_gamin:--with-gamin} \
878         %{?with_gdbm:--with-gdbm}
879
880 # -j1 as src/mod_ssi_exprparser.h regeneration deps are broken
881 %{__make} -j1
882
883 %if %{with tests}
884 export LIGHTTPD_TEST_PORT=$((2048 + RANDOM % 10))
885 %{__make} check
886 %endif
887
888 %install
889 rm -rf $RPM_BUILD_ROOT
890 install -d $RPM_BUILD_ROOT{%{_lighttpddir}/{cgi-bin,html},/etc/{logrotate.d,rc.d/init.d,sysconfig,monit}} \
891         $RPM_BUILD_ROOT%{_sysconfdir}/{conf,vhosts,webapps}.d \
892         $RPM_BUILD_ROOT{/var/log/{%{name},archive/%{name}},/var/run/%{name}} \
893         $RPM_BUILD_ROOT%{_datadir}/lighttpd/errordocs \
894         $RPM_BUILD_ROOT/var/lib/lighttpd \
895         $RPM_BUILD_ROOT/var/cache/lighttpd/mod_compress
896
897 %{__make} install \
898         DESTDIR=$RPM_BUILD_ROOT
899
900 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
901 cp -p %{SOURCE2} %{SOURCE3} mime.types.conf $RPM_BUILD_ROOT%{_sysconfdir}
902 cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
903 cp -p %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
904 cp -p %{SOURCE12} $RPM_BUILD_ROOT/etc/monit/%{name}.monitrc
905
906 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
907
908 # Install lighttpd images
909 cp -p %{SOURCE7} %{SOURCE8} %{SOURCE9} $RPM_BUILD_ROOT%{_lighttpddir}/html
910 cp -p %{SOURCE11} $RPM_BUILD_ROOT%{_lighttpddir}/html/index.html
911
912 # NOTE: the order of the modules is somewhat important as the modules are
913 # handled in the way they are specified. mod_rewrite should always be the first
914 # module, mod_accesslog always the last.
915
916 conf_available=$RPM_BUILD_ROOT%{_sysconfdir}/conf.d
917 conf_enabled=../
918
919 cp -p %{SOURCE117} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/10_mod_rewrite.conf
920 cp -p %{SOURCE116} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/11_mod_redirect.conf
921
922 cp -p %{SOURCE100} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_access.conf
923 cp -p %{SOURCE102} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_alias.conf
924 cp -p %{SOURCE103} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_auth.conf
925 cp -p %{SOURCE104} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_cgi.conf
926 cp -p %{SOURCE137} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_cgi_php.conf
927 cp -p %{SOURCE105} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_cml.conf
928 cp -p %{SOURCE107} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_deflate.conf
929 cp -p %{SOURCE108} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_dirlisting.conf
930 cp -p %{SOURCE109} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_evasive.conf
931 cp -p %{SOURCE110} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_evhost.conf
932 cp -p %{SOURCE112} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_fastcgi.conf
933 cp -p %{SOURCE113} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_flv_streaming.conf
934 %if %{with h264_streaming}
935 cp -p %{SOURCE136} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_h264_streaming.conf
936 %endif
937 cp -p %{SOURCE114} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_indexfile.conf
938 cp -p %{SOURCE115} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_proxy.conf
939 cp -p %{SOURCE118} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_rrdtool.conf
940 cp -p %{SOURCE119} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_scgi.conf
941 cp -p %{SOURCE120} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_secdownload.conf
942 cp -p %{SOURCE121} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_setenv.conf
943 cp -p %{SOURCE122} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_simple_vhost.conf
944 cp -p %{SOURCE123} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_ssi.conf
945 cp -p %{SOURCE124} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_staticfile.conf
946 cp -p %{SOURCE125} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_status.conf
947 cp -p %{SOURCE126} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_trigger_b4_dl.conf
948 cp -p %{SOURCE127} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_userdir.conf
949 cp -p %{SOURCE128} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_usertrack.conf
950 cp -p %{SOURCE129} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_webdav.conf
951 cp -p %{SOURCE133} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_mysql_vhost.conf
952
953 cp -p %{SOURCE134} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/55_mod_magnet.conf
954 cp -p %{SOURCE111} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/55_mod_expire.conf
955
956 cp -p %{SOURCE106} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/60_mod_compress.conf
957
958 cp -p %{SOURCE101} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_accesslog.conf
959 cp -p %{SOURCE135} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/91_mod_extforward.conf
960
961 cp -p %{SOURCE130} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/php-spawned.conf
962 cp -p %{SOURCE131} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/php-external.conf
963 cp -p %{SOURCE132} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/ssl.conf
964
965 touch $RPM_BUILD_ROOT/var/lib/lighttpd/lighttpd.rrd
966
967 install -d $RPM_BUILD_ROOT/etc/tmpwatch
968 cp -p %{SOURCE138} $RPM_BUILD_ROOT/etc/tmpwatch/lighttpd-mod_compress.conf
969
970 %if %{without mysql}
971 # avoid packaging dummy module
972 %{__rm} $RPM_BUILD_ROOT%{_libdir}/mod_mysql_vhost.so
973 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/*_mod_mysql_vhost.conf
974 %endif
975 %if %{without deflate}
976 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/*_mod_deflate.conf
977 %endif
978
979 touch $RPM_BUILD_ROOT/var/log/%{name}/{access,error,breakage}.log
980
981 %clean
982 rm -rf $RPM_BUILD_ROOT
983
984 %pre
985 %groupadd -g 109 lighttpd
986 %groupadd -g 51 http
987 %useradd -u 116 -d %{_lighttpddir} -c "Lighttpd User" -g lighttpd lighttpd
988 %addusertogroup lighttpd http
989
990 %post
991 for a in access.log error.log breakage.log; do
992         if [ ! -f /var/log/%{name}/$a ]; then
993                 touch /var/log/%{name}/$a
994                 chown lighttpd:lighttpd /var/log/%{name}/$a
995                 chmod 644 /var/log/%{name}/$a
996         fi
997 done
998 /sbin/chkconfig --add %{name}
999
1000 %preun
1001 if [ "$1" = "0" ]; then
1002         %service %{name} stop
1003         /sbin/chkconfig --del %{name}
1004 fi
1005
1006 %postun
1007 if [ "$1" = "0" ]; then
1008         %userremove lighttpd
1009         %groupremove lighttpd
1010         %groupremove http
1011 fi
1012
1013 %posttrans
1014 # minimizing lighttpd restarts logics. we restart webserver:
1015 #
1016 # 1. at the end of transaction. (posttrans, feature from rpm 4.4.2)
1017 # 2. first install of module (post: $1 = 1)
1018 # 2. uninstall of module (postun: $1 = 0)
1019 #
1020 # the strict internal deps between lighttpd modules and
1021 # main package are very important for all this to work.
1022 %service %{name} restart "Lighttpd webserver"
1023 exit 0
1024
1025 # macro called at module post scriptlet
1026 %define module_post \
1027 if [ "$1" = "1" ]; then \
1028         %service -q lighttpd restart \
1029 fi
1030
1031 # macro called at module postun scriptlet
1032 %define module_postun \
1033 if [ "$1" = "0" ]; then \
1034         %service -q lighttpd restart \
1035 fi
1036
1037 # it's sooo annoying to write them
1038 %define module_scripts() \
1039 %post %1 \
1040 %module_post \
1041 \
1042 %postun %1 \
1043 %module_postun
1044
1045 %module_scripts mod_access
1046 %module_scripts mod_accesslog
1047 %module_scripts mod_alias
1048 %module_scripts mod_auth
1049 %module_scripts mod_cgi
1050 %module_scripts mod_cml
1051 %module_scripts mod_compress
1052 %module_scripts mod_deflate
1053 %module_scripts mod_dirlisting
1054 %module_scripts mod_evasive
1055 %module_scripts mod_evhost
1056 %module_scripts mod_expire
1057 %module_scripts mod_extforward
1058 %module_scripts mod_fastcgi
1059 %module_scripts mod_flv_streaming
1060 %module_scripts mod_h264_streaming
1061 %module_scripts mod_indexfile
1062 %module_scripts mod_magnet
1063 %module_scripts mod_mysql_vhost
1064 %module_scripts mod_proxy
1065 %module_scripts mod_redirect
1066 %module_scripts mod_rewrite
1067
1068 %post mod_rrdtool
1069 if [ ! -f /var/lib/lighttpd/lighttpd.rrd ]; then
1070         touch /var/lib/lighttpd/lighttpd.rrd
1071         chown lighttpd:stats /var/lib/lighttpd/lighttpd.rrd
1072         chmod 640 /var/lib/lighttpd/lighttpd.rrd
1073 fi
1074 %module_post
1075
1076 %postun mod_rrdtool
1077 %module_postun
1078
1079 %module_scripts mod_scgi
1080 %module_scripts mod_secdownload
1081 %module_scripts mod_setenv
1082 %module_scripts mod_simple_vhost
1083 %module_scripts mod_ssi
1084 %module_scripts mod_staticfile
1085 %module_scripts mod_status
1086 %module_scripts mod_trigger_b4_dl
1087 %module_scripts mod_userdir
1088 %module_scripts mod_usertrack
1089 %module_scripts mod_webdav
1090
1091 %module_scripts php-spawned
1092 %module_scripts php-external
1093
1094 %triggerpostun -- %{name} < 1.4.18-10.1
1095 if [ -f /etc/lighttpd/conf.d/50_mod_extforward.conf.rpmsave ]; then
1096         cp -f /etc/lighttpd/conf.d/91_mod_extforward.conf{,.rpmnew}
1097         mv -f /etc/lighttpd/conf.d/{50_mod_extforward.conf.rpmsave,91_mod_extforward.conf}
1098 fi
1099
1100 %files
1101 %defattr(644,root,root,755)
1102 %doc NEWS README PLD-TODO
1103 %dir %attr(751,root,lighttpd) %{_sysconfdir}
1104 %dir %attr(750,root,root) %{_sysconfdir}/conf.d
1105 %dir %attr(750,root,root) %{_sysconfdir}/vhosts.d
1106 %dir %attr(750,root,root) %{_sysconfdir}/webapps.d
1107 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
1108 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.types.conf
1109 %attr(640,root,lighttpd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.user
1110
1111 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
1112 %attr(750,root,root) %dir /var/log/archive/%{name}
1113 %dir %attr(751,root,root) /var/log/%{name}
1114 %attr(644,lighttpd,lighttpd) %ghost /var/log/%{name}/access.log
1115 %attr(644,lighttpd,lighttpd) %ghost /var/log/%{name}/error.log
1116 %attr(644,lighttpd,lighttpd) %ghost /var/log/%{name}/breakage.log
1117 %dir %attr(770,root,lighttpd) /var/run/%{name}
1118 %attr(754,root,root) /etc/rc.d/init.d/%{name}
1119 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
1120 %attr(755,root,root) %{_sbindir}/lighttpd
1121 %attr(755,root,root) %{_sbindir}/lighttpd-angel
1122 %dir %{_libdir}
1123 %{_mandir}/man8/lighttpd.8*
1124 %dir %{_lighttpddir}
1125 %dir %{_lighttpddir}/cgi-bin
1126 %dir %{_lighttpddir}/html
1127 %config(noreplace,missingok) %verify(not md5 mtime size) %{_lighttpddir}/html/index.html
1128 %config(missingok) %verify(not md5 mtime size) %{_lighttpddir}/html/*.png
1129 %config(missingok) %verify(not md5 mtime size) %{_lighttpddir}/html/*.ico
1130
1131 %dir %{_datadir}/lighttpd
1132 %dir %{_datadir}/lighttpd/errordocs
1133
1134 # rrdtool database is stored there
1135 %dir %attr(771,root,lighttpd) /var/lib/lighttpd
1136
1137 # mod_compress can put cached files there
1138 %dir /var/cache/lighttpd
1139
1140 %files mod_access
1141 %defattr(644,root,root,755)
1142 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_access.conf
1143 %attr(755,root,root) %{_libdir}/mod_access.so
1144
1145 %files mod_accesslog
1146 %defattr(644,root,root,755)
1147 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_accesslog.conf
1148 %attr(755,root,root) %{_libdir}/mod_accesslog.so
1149
1150 %files mod_alias
1151 %defattr(644,root,root,755)
1152 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_alias.conf
1153 %attr(755,root,root) %{_libdir}/mod_alias.so
1154
1155 %files mod_auth
1156 %defattr(644,root,root,755)
1157 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_auth.conf
1158 %attr(755,root,root) %{_libdir}/mod_auth.so
1159
1160 %files mod_cgi
1161 %defattr(644,root,root,755)
1162 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_cgi.conf
1163 %attr(755,root,root) %{_libdir}/mod_cgi.so
1164
1165 %files mod_cgi_php
1166 %defattr(644,root,root,755)
1167 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_cgi_php.conf
1168
1169 %files mod_cml
1170 %defattr(644,root,root,755)
1171 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_cml.conf
1172 %attr(755,root,root) %{_libdir}/mod_cml.so
1173
1174 %files mod_compress
1175 %defattr(644,root,root,755)
1176 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/tmpwatch/lighttpd-mod_compress.conf
1177 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_compress.conf
1178 %attr(755,root,root) %{_libdir}/mod_compress.so
1179 %dir %attr(775,root,lighttpd) /var/cache/lighttpd/mod_compress
1180
1181 %if %{with deflate}
1182 %files mod_deflate
1183 %defattr(644,root,root,755)
1184 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_deflate.conf
1185 %attr(755,root,root) %{_libdir}/mod_deflate.so
1186 %endif
1187
1188 %files mod_dirlisting
1189 %defattr(644,root,root,755)
1190 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_dirlisting.conf
1191 %attr(755,root,root) %{_libdir}/mod_dirlisting.so
1192
1193 %files mod_evasive
1194 %defattr(644,root,root,755)
1195 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_evasive.conf
1196 %attr(755,root,root) %{_libdir}/mod_evasive.so
1197
1198 %files mod_evhost
1199 %defattr(644,root,root,755)
1200 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_evhost.conf
1201 %attr(755,root,root) %{_libdir}/mod_evhost.so
1202
1203 %files mod_expire
1204 %defattr(644,root,root,755)
1205 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_expire.conf
1206 %attr(755,root,root) %{_libdir}/mod_expire.so
1207
1208 %files mod_extforward
1209 %defattr(644,root,root,755)
1210 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_extforward.conf
1211 %attr(755,root,root) %{_libdir}/mod_extforward.so
1212
1213 %files mod_fastcgi
1214 %defattr(644,root,root,755)
1215 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_fastcgi.conf
1216 %attr(755,root,root) %{_libdir}/mod_fastcgi.so
1217
1218 %files mod_flv_streaming
1219 %defattr(644,root,root,755)
1220 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_flv_streaming.conf
1221 %attr(755,root,root) %{_libdir}/mod_flv_streaming.so
1222
1223 %if %{with h264_streaming}
1224 %files mod_h264_streaming
1225 %defattr(644,root,root,755)
1226 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_h264_streaming.conf
1227 %attr(755,root,root) %{_libdir}/mod_h264_streaming.so
1228 %endif
1229
1230 %files mod_indexfile
1231 %defattr(644,root,root,755)
1232 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_indexfile.conf
1233 %attr(755,root,root) %{_libdir}/mod_indexfile.so
1234
1235 %files mod_magnet
1236 %defattr(644,root,root,755)
1237 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_magnet.conf
1238 %attr(755,root,root) %{_libdir}/mod_magnet.so
1239
1240 %if %{with mysql}
1241 %files mod_mysql_vhost
1242 %defattr(644,root,root,755)
1243 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_mysql_vhost.conf
1244 %attr(755,root,root) %{_libdir}/mod_mysql_vhost.so
1245 %endif
1246
1247 %files mod_proxy
1248 %defattr(644,root,root,755)
1249 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_proxy.conf
1250 %attr(755,root,root) %{_libdir}/mod_proxy.so
1251
1252 %files mod_redirect
1253 %defattr(644,root,root,755)
1254 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_redirect.conf
1255 %attr(755,root,root) %{_libdir}/mod_redirect.so
1256
1257 %files mod_rewrite
1258 %defattr(644,root,root,755)
1259 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_rewrite.conf
1260 %attr(755,root,root) %{_libdir}/mod_rewrite.so
1261
1262 %files mod_rrdtool
1263 %defattr(644,root,root,755)
1264 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_rrdtool.conf
1265 %attr(755,root,root) %{_libdir}/mod_rrdtool.so
1266 %attr(640,lighttpd,stats) %ghost /var/lib/lighttpd/lighttpd.rrd
1267
1268 %files mod_scgi
1269 %defattr(644,root,root,755)
1270 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_scgi.conf
1271 %attr(755,root,root) %{_libdir}/mod_scgi.so
1272
1273 %files mod_secdownload
1274 %defattr(644,root,root,755)
1275 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_secdownload.conf
1276 %attr(755,root,root) %{_libdir}/mod_secdownload.so
1277
1278 %files mod_setenv
1279 %defattr(644,root,root,755)
1280 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_setenv.conf
1281 %attr(755,root,root) %{_libdir}/mod_setenv.so
1282
1283 %files mod_simple_vhost
1284 %defattr(644,root,root,755)
1285 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_simple_vhost.conf
1286 %attr(755,root,root) %{_libdir}/mod_simple_vhost.so
1287
1288 %files mod_ssi
1289 %defattr(644,root,root,755)
1290 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_ssi.conf
1291 %attr(755,root,root) %{_libdir}/mod_ssi.so
1292
1293 %files mod_staticfile
1294 %defattr(644,root,root,755)
1295 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_staticfile.conf
1296 %attr(755,root,root) %{_libdir}/mod_staticfile.so
1297
1298 %files mod_status
1299 %defattr(644,root,root,755)
1300 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_status.conf
1301 %attr(755,root,root) %{_libdir}/mod_status.so
1302
1303 %files mod_trigger_b4_dl
1304 %defattr(644,root,root,755)
1305 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_trigger_b4_dl.conf
1306 %attr(755,root,root) %{_libdir}/mod_trigger_b4_dl.so
1307
1308 %files mod_userdir
1309 %defattr(644,root,root,755)
1310 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_userdir.conf
1311 %attr(755,root,root) %{_libdir}/mod_userdir.so
1312
1313 %files mod_usertrack
1314 %defattr(644,root,root,755)
1315 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_usertrack.conf
1316 %attr(755,root,root) %{_libdir}/mod_usertrack.so
1317
1318 %files mod_webdav
1319 %defattr(644,root,root,755)
1320 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_webdav.conf
1321 %attr(755,root,root) %{_libdir}/mod_webdav.so
1322
1323 %files php-spawned
1324 %defattr(644,root,root,755)
1325 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/php-spawned.conf
1326
1327 %files php-external
1328 %defattr(644,root,root,755)
1329 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/php-external.conf
1330
1331 %files ssl
1332 %defattr(644,root,root,755)
1333 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/ssl.conf
1334
1335 %files -n monit-rc-lighttpd
1336 %defattr(644,root,root,755)
1337 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/monit/%{name}.monitrc