]> git.pld-linux.org Git - packages/lighttpd.git/blob - lighttpd.spec
- merged 1.4.14-20060907-1319 snapshot from DEVEL
[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 # - lighttpd writes early startup messages to stderr, and if started from
7 #   rc-scripts the stderr is closed which causes lighttpd to abort():
8 #   2006-07-20 21:05:52: (server.c.1233) WARNING: unknown config-key: url.rewrite-final (ignored)
9 #
10 # NOTES:
11 # - fcgi-devel is only used for the test-scripts
12 # - disable largefile, if you have 2.4 kernel to get sendfile() support, and don't need > 2GB file requests,
13 #   see http://article.gmane.org/gmane.comp.web.lighttpd:722
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_without  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 (needs LUA >= 5.1)
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 %bcond_with     deflate         # build deflate module (needs patch update with current svn)
30
31 %define         _rel 0.55
32 # SVN snapshot
33 #define         _svn    1277
34 # Prerelease snapshot: DATE-TIME
35 %define _snap 20060907-1319
36
37 %if 0%{?_snap}
38 %define _source http://www.lighttpd.net/download/%{name}-%{version}-%{_snap}.tar.gz
39 %else
40 %define _source http://www.lighttpd.net/download/%{name}-%{version}.tar.gz
41 %endif
42
43 %define         _rel 0.58
44
45 Summary:        Fast and light HTTP server
46 Summary(pl):    Szybki i lekki serwer HTTP
47 Name:           lighttpd
48 Version:        1.4.12
49 Release:        %{_rel}%{?_snap:.%(echo %{_snap}|tr - _)}%{?_svn:.%{_svn}}
50 License:        BSD
51 Group:          Networking/Daemons
52 Source0:        http://www.lighttpd.net/download/%{name}-%{version}-%{_snap}.tar.gz
53 # Source0-md5:  a9c4747984235db61b9685388e9160f7
54 Source1:        %{name}.init
55 Source2:        %{name}.conf
56 Source3:        %{name}.user
57 Source4:        %{name}.logrotate
58 Source5:        %{name}.sysconfig
59 Source6:        %{name}-mime.types.sh
60 Source7:        http://www.lighttpd.net/favicon.ico
61 # Source7-md5:  a358994becabd4060393a5454bde505d
62 Source8:        http://www.lighttpd.net/light_button.png
63 # Source8-md5:  02330e2313fadc29144edfd6000879f8
64 Source9:        http://www.lighttpd.net/light_logo.png
65 # Source9-md5:  ac20784510e420d5cbe5fc1cdb53d7a7
66 Source10:       http://gdl.hopto.org/~spider/pldstats/gfx/pld1.png
67 # Source10-md5: 486ecec3f6f4fe7f9bf7cee757b864f4
68 Source11:       %{name}-pld.html
69 Source100:      %{name}-mod_access.conf
70 Source101:      %{name}-mod_accesslog.conf
71 Source102:      %{name}-mod_alias.conf
72 Source103:      %{name}-mod_auth.conf
73 Source104:      %{name}-mod_cgi.conf
74 Source105:      %{name}-mod_cml.conf
75 Source106:      %{name}-mod_compress.conf
76 Source107:      %{name}-mod_deflate.conf
77 Source108:      %{name}-mod_dirlisting.conf
78 Source109:      %{name}-mod_evasive.conf
79 Source110:      %{name}-mod_evhost.conf
80 Source111:      %{name}-mod_expire.conf
81 Source112:      %{name}-mod_fastcgi.conf
82 Source113:      %{name}-mod_flv_streaming.conf
83 Source114:      %{name}-mod_indexfile.conf
84 Source115:      %{name}-mod_proxy.conf
85 Source116:      %{name}-mod_redirect.conf
86 Source117:      %{name}-mod_rewrite.conf
87 Source118:      %{name}-mod_rrdtool.conf
88 Source119:      %{name}-mod_scgi.conf
89 Source120:      %{name}-mod_secdownload.conf
90 Source121:      %{name}-mod_setenv.conf
91 Source122:      %{name}-mod_simple_vhost.conf
92 Source123:      %{name}-mod_ssi.conf
93 Source124:      %{name}-mod_staticfile.conf
94 Source125:      %{name}-mod_status.conf
95 Source126:      %{name}-mod_trigger_b4_dl.conf
96 Source127:      %{name}-mod_userdir.conf
97 Source128:      %{name}-mod_usertrack.conf
98 Source129:      %{name}-mod_webdav.conf
99 Source130:      %{name}-php-spawned.conf
100 Source131:      %{name}-php-external.conf
101 Source132:      %{name}-ssl.conf
102 Source133:      %{name}-mod_proxy_core.conf
103 Source134:      %{name}-mod_mysql_vhost.conf
104 Source135:      %{name}-mod_uploadprogress.conf
105 Patch100:       %{name}-branch.diff
106 Patch0:         %{name}-mod_deflate.patch
107 Patch1:         %{name}-use_bin_sh.patch
108 Patch2:         %{name}-initgroups.patch
109 Patch3:         http://trac.lighttpd.net/trac/attachment/ticket/444/%{name}-apr1.patch?format=txt
110 Patch4:         %{name}-mod_evasive-status_code.patch
111 URL:            http://www.lighttpd.net/
112 %{?with_xattr:BuildRequires:    attr-devel}
113 BuildRequires:  autoconf
114 BuildRequires:  automake
115 BuildRequires:  bzip2-devel
116 %{?with_gamin:BuildRequires:    gamin-devel}
117 %{?with_gdbm:BuildRequires:     gdbm-devel}
118 %{?with_memcache:BuildRequires: libmemcache-devel}
119 BuildRequires:  libtool
120 BuildRequires:  libuuid-devel
121 %{?with_webdav_props:BuildRequires:     libxml2-devel}
122 %{?with_lua:BuildRequires:      lua50-devel >= 5.0.2-5.1}
123 BuildRequires:  mailcap >= 2.1.14-4.4
124 %{?with_mysql:BuildRequires:    mysql-devel}
125 %{?with_ldap:BuildRequires:     openldap-devel}
126 %{?with_ssl:BuildRequires:      openssl-devel}
127 BuildRequires:  pcre-devel
128 BuildRequires:  pkgconfig
129 BuildRequires:  rpmbuild(macros) >= 1.268
130 %{?with_webdav_props:BuildRequires:     sqlite3-devel}
131 %{?with_valgrind:BuildRequires: valgrind}
132 BuildRequires:  zlib-devel
133 Requires(post,preun):   /sbin/chkconfig
134 Requires(postun):       /usr/sbin/groupdel
135 Requires(postun):       /usr/sbin/userdel
136 Requires(pre):  /bin/id
137 Requires(pre):  /usr/bin/getgid
138 Requires(pre):  /usr/lib/rpm/user_group.sh
139 Requires(pre):  /usr/sbin/groupadd
140 Requires(pre):  /usr/sbin/useradd
141 Requires(pre):  /usr/sbin/usermod
142 Requires:       %{name}-mod_dirlisting
143 Requires:       %{name}-mod_indexfile
144 Requires:       %{name}-mod_staticfile
145 Requires:       rc-scripts
146 Provides:       group(http)
147 Provides:       group(lighttpd)
148 Provides:       user(lighttpd)
149 Provides:       webserver
150 # for the posttrans scriptlet, conflicts because in vserver environment rpm package is not installed.
151 Conflicts:      rpm < 4.4.2-0.2
152 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
153
154 %define         _libdir         %{_prefix}/%{_lib}/%{name}
155 %define         _lighttpddir    /home/services/%{name}
156 %define         _sysconfdir     /etc/%{name}
157
158 %description
159 lighttpd is a secure, fast, compliant and very flexible web-server
160 which has been optimized for high-performance environments. It has a
161 very low memory footprint compared to other webservers and takes care
162 of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth,
163 Output-Compression, URL-Rewriting and many more) make lighttpd the
164 perfect webserver-software for every server that is suffering load
165 problems.
166
167 %description -l pl
168 lighttpd jest bezpiecznym, szybkim, przyjaznym i bardzo elastycznym
169 serwerem WWW, który zosta³ zoptymalizowany pod k±tem
170 wysokowydajno¶ciowych ¶rodowisk. Zajmuje bardzo ma³± ilo¶æ pamiêci w
171 porównaniu do innych serwerów WWW oraz dba o zajêto¶æ procesora.
172 Szeroki zestaw opcji (FastCGI, CGI, uwierzytelnianie, kompresja
173 wyj¶cia, przepisywanie URL-i i wiele innych) czyni± z lighttpd
174 doskona³e oprogramowanie web-serwerowe na ka¿dy serwer cierpi±cy z
175 powodu problemów z obci±¿eniem.
176
177 %package mod_access
178 Summary:        lighttpd module for making access restrictions
179 Group:          Networking/Daemons
180 Requires:       %{name} = %{version}-%{release}
181 Provides:       webserver(access)
182
183 %description mod_access
184 The access module is used to deny access to files with given trailing
185 path names.
186
187 %package mod_accesslog
188 Summary:        lighttpd module to record access logs
189 Group:          Networking/Daemons
190 Requires:       %{name} = %{version}-%{release}
191
192 %description mod_accesslog
193 CLF like by default, flexible like Apache.
194
195 %package mod_alias
196 Summary:        lighttpd module for making url aliasing
197 Group:          Networking/Daemons
198 Requires:       %{name} = %{version}-%{release}
199 Provides:       webserver(alias)
200
201 %description mod_alias
202 The alias module is used to specify a special document-root for a
203 given url-subset.
204
205 %package mod_auth
206 Summary:        lighttpd module for authentication support
207 Group:          Networking/Daemons
208 Requires:       %{name} = %{version}-%{release}
209 Provides:       webserver(auth)
210
211 %description mod_auth
212 lighttpd supportes both authentication method described by RFC 2617:
213 basic and digest.
214
215 %package mod_cgi
216 Summary:        lighttpd module for CGI handling
217 Group:          Networking/Daemons
218 Requires:       %{name} = %{version}-%{release}
219 Provides:       webserver(cgi)
220
221 %description mod_cgi
222 The cgi module provides a CGI-conforming interface.
223
224 CGI programs allow you to enhance the functionality of the server in a
225 very straight and simple way...
226
227 %package mod_cml
228 Summary:        lighttpd module for Cache Meta Language
229 Summary(pl):    Modu³ Cache Meta Language
230 Group:          Networking/Daemons
231 Requires:       %{name} = %{version}-%{release}
232
233 %description mod_cml
234 CML is a Meta language to describe the dependencies of a page at one
235 side and building a page from its fragments on the other side using
236 LUA.
237
238 %description mod_cml -l pl
239 CML to metajêzyk s³u¿±cy z jednej strony do opisu zale¿no¶ci strony i
240 z drugiej strony do budowania strony z fragmentów przy u¿yciu LUA.
241
242 %package mod_compress
243 Summary:        lighttpd module for output compression
244 Summary(pl):    Kompresja wyj¶cia
245 Group:          Networking/Daemons
246 Requires:       %{name} = %{version}-%{release}
247
248 %description mod_compress
249 Output compression reduces the network load and can improve the
250 overall throughput of the webserver.
251
252 Only static content is supported up to now.
253
254 The server negotiates automatically which compression method is used.
255 Supported are gzip, deflate, bzip.
256
257 %description mod_compress -l pl
258 Kompresja wyj¶cia zmniejsza obci±¿enie sieci i mo¿e poprawiæ ca³kowit±
259 przepustowo¶æ serwera WWW.
260
261 Jak na razie obs³ugiwana jest tylko statyczna tre¶æ.
262
263 Serwer automatycznie negocjuje, która metoda kompresji jest u¿ywana.
264 Obs³ugiwane s± gzip, deflate i bzip.
265
266 %package mod_deflate
267 Summary:        lighttpd module for output compression
268 Summary(pl):    Kompresja wyj¶cia
269 Group:          Networking/Daemons
270 URL:            http://trac.lighttpd.net/trac/wiki/Mod_Deflate
271 Requires:       %{name} = %{version}-%{release}
272
273 %description mod_deflate
274 mod_deflate can compress any output from lighttpd static or dynamic.
275 It doesn't support caching compressed output like mod_compress.
276
277 %package mod_dirlisting
278 Summary:        lighttpd module for directory listings
279 Group:          Networking/Daemons
280 Requires:       %{name} = %{version}-%{release}
281
282 %description mod_dirlisting
283 mod_dirlisting generates HTML based directory listings with full CSS
284 control.
285
286 %package mod_evasive
287 Summary:        lighttpd evasive module
288 Group:          Networking/Daemons
289 Requires:       %{name} = %{version}-%{release}
290
291 %description mod_evasive
292
293 %package mod_evhost
294 Summary:        lighttpd module for enhanced virtual-hosting
295 Group:          Networking/Daemons
296 Requires:       %{name} = %{version}-%{release}
297
298 %description mod_evhost
299 mod_evhost builds the document-root based on a pattern which contains
300 wildcards. Those wildcards can represent parts of the submitted
301 hostname.
302
303 %package mod_expire
304 Summary:        lighttpd module for controlling the expiration of content in caches
305 Group:          Networking/Daemons
306 Requires:       %{name} = %{version}-%{release}
307
308 %description mod_expire
309 mod_expire controls the setting of the the Expire response header.
310
311 %package mod_fastcgi
312 Summary:        lighttpd module for FastCGI interface
313 Group:          Networking/Daemons
314 Requires:       %{name} = %{version}-%{release}
315
316 %description mod_fastcgi
317 The FastCGI interface is the fastest and most secure way to interface
318 external process-handlers like Perl, PHP and your self-written
319 applications.
320
321 %package mod_flv_streaming
322 Summary:        lighttpd module for flv streaming
323 Group:          Networking/Daemons
324 Requires:       %{name} = %{version}-%{release}
325
326 %description mod_flv_streaming
327 lighttpd module for flv streaming.
328
329 %package mod_indexfile
330 Summary:        lighttpd indexfile module
331 Group:          Networking/Daemons
332 Requires:       %{name} = %{version}-%{release}
333 Provides:       webserver(indexfile)
334
335 %description mod_indexfile
336 indexfile module.
337
338 %package mod_mysql_vhost
339 Summary:        lighttpd module for MySQL based vhosting
340 Summary(pl):    vhosty oparte na MySQL-u
341 Group:          Networking/Daemons
342 Requires:       %{name} = %{version}-%{release}
343 Conflicts:      %{name}-mod_simple_vhost
344
345 %description mod_mysql_vhost
346 This module provides virtual hosts (vhosts) based on a MySQL table.
347
348 %description mod_mysql_vhost -l pl
349 Ten modu³ udostêpnia wirtualne hosty (vhosty) oparte na tabeli MySQL.
350
351 %package mod_proxy
352 Summary:        lighttpd module for proxying requests
353 Group:          Networking/Daemons
354 Requires:       %{name} = %{version}-%{release}
355
356 %description mod_proxy
357 The proxy module a simplest way to connect lighttpd to java servers
358 which have a HTTP-interface.
359
360 %package mod_proxy_core
361 Summary:        lighttpd module for proxying requests
362 Group:          Networking/Daemons
363 URL:            http://blog.lighttpd.net/articles/2006/07/18/mod_proxy_core-commited-to-svn
364 Requires:       %{name} = %{version}-%{release}
365
366 %description mod_proxy_core
367 The proxy module a simplest way to connect lighttpd to java servers
368 which have a HTTP-interface.
369
370 This is the new proxy code.
371
372 %package mod_redirect
373 Summary:        lighttpd module for URL redirects
374 Group:          Networking/Daemons
375 Requires:       %{name} = %{version}-%{release}
376
377 %description mod_redirect
378 With mod_redirect module you can redirects a set of URLs externally.
379
380 %package mod_rewrite
381 Summary:        lighttpd module for internal redirects, URL rewrite
382 Group:          Networking/Daemons
383 Requires:       %{name} = %{version}-%{release}
384
385 %description mod_rewrite
386 This module allows you rewrite a set of URLs interally in the
387 webserver BEFORE they are handled.
388
389 %package mod_rrdtool
390 Summary:        lighttpd module for monitoring traffic and server load
391 Group:          Networking/Daemons
392 Requires:       %{name} = %{version}-%{release}
393 Requires:       rrdtool
394
395 %description mod_rrdtool
396 RRD is a system to store and display time-series data (i.e. network
397 bandwidth, machine-room temperature, server load average).
398
399 With this module you can monitor the traffic and load on the
400 webserver.
401
402 %package mod_scgi
403 Summary:        lighttpd module for SCGI interface
404 Group:          Networking/Daemons
405 Requires:       %{name} = %{version}-%{release}
406
407 %description mod_scgi
408 SCGI is a fast and simplified CGI interface. It is mostly used by
409 Python + WSGI.
410
411 %package mod_secdownload
412 Summary:        lighttpd module for secure and fast downloading
413 Group:          Networking/Daemons
414 Requires:       %{name} = %{version}-%{release}
415
416 %description mod_secdownload
417 With this module you can easily achieve authenticated file requests
418 and a countermeasure against deep-linking.
419
420 %package mod_setenv
421 Summary:        lighttpd module for setting conditional request headers
422 Group:          Networking/Daemons
423 Requires:       %{name} = %{version}-%{release}
424
425 %description mod_setenv
426 mod_setenv is used to add request headers.
427
428 %package mod_simple_vhost
429 Summary:        lighttpd module for simple virtual-hosting
430 Group:          Networking/Daemons
431 Requires:       %{name} = %{version}-%{release}
432 Conflicts:      %{name}-mod_mysql_vhost
433
434 %description mod_simple_vhost
435 lighttpd module for simple virtual-hosting.
436
437 %package mod_ssi
438 Summary:        lighttpd module for server-side includes
439 Group:          Networking/Daemons
440 Requires:       %{name} = %{version}-%{release}
441
442 %description mod_ssi
443 The module for server-side includes provides a compatability layer for
444 NSCA/Apache SSI.
445
446 %package mod_staticfile
447 Summary:        lighttpd module for static file serving
448 Group:          Networking/Daemons
449 Requires:       %{name} = %{version}-%{release}
450
451 %description mod_staticfile
452 lighttpd module for static file serving.
453
454 %package mod_status
455 Summary:        lighttpd module for displaying server status
456 Group:          Networking/Daemons
457 Requires:       %{name} = %{version}-%{release}
458
459 %description mod_status
460 mod_status displays the server's status and configuration.
461
462 %package mod_trigger_b4_dl
463 Summary:        Trigger before Download
464 Summary(pl):    Wyzwalacz przed ¶ci±ganiem
465 Group:          Networking/Daemons
466 Requires:       %{name} = %{version}-%{release}
467
468 %description mod_trigger_b4_dl
469 Another anti hot-linking module.
470
471 %description mod_trigger_b4_dl -l pl
472 Jeszcze jeden modu³ blokuj±cy bezpo¶rednie linkowanie.
473
474 %package mod_uploadprogress
475 Summary:        lighttpd module for upload progress
476 Group:          Networking/Daemons
477 Requires:       %{name} = %{version}-%{release}
478
479 %description mod_uploadprogress
480 Upload progress module.
481
482 %package mod_userdir
483 Summary:        lighttpd module for user homedirs
484 Group:          Networking/Daemons
485 Requires:       %{name} = %{version}-%{release}
486
487 %description mod_userdir
488 The userdir module provides a simple way to link user-based
489 directories into the global namespace of the webserver.
490
491 %package mod_usertrack
492 Summary:        lighttpd usertrack module
493 Group:          Networking/Daemons
494 Requires:       %{name} = %{version}-%{release}
495
496 %description mod_usertrack
497
498 %package mod_webdav
499 Summary:        WebDAV module for lighttpd
500 Summary(pl):    Modu³ WebDAV dla libghttpd
501 Group:          Networking/Daemons
502 Requires:       %{name} = %{version}-%{release}
503
504 %description mod_webdav
505 The WebDAV module is a very minimalistic implementation of RFC 2518.
506 Minimalistic means that not all operations are implementated yet.
507
508 So far we have
509 - PROPFIND
510 - OPTIONS
511 - MKCOL
512 - DELETE
513 - PUT
514
515 and the usual GET, POST, HEAD from HTTP/1.1.
516
517 So far mounting a webdav resource into Windows XP works and the basic
518 litmus tests are passed.
519
520 %description mod_webdav -l pl
521 Modu³ WebDAV to bardzo minimalistyczna implementacja RFC 2518.
522 Minimalistyczna oznacza, ¿e jeszcze nie wszystkie operacje s±
523 zaimplementowane. Jak na razie s±:
524 - PROPFIND
525 - OPTIONS
526 - MKCOL
527 - DELETE
528 - PUT
529 oraz zwyk³e GET, POST, HEAD z HTTP/1.1.
530
531 Jak na razie montowanie zasobu webdav pod Windows XP dzia³a i
532 podstawowe testy lakmusowe przechodz±.
533
534 %package -n spawn-fcgi
535 Summary:        Spawn fcgi-process directly
536 Summary(pl):    Bezpo¶rednie uruchamianie procesów fcgi
537 Group:          Applications
538
539 %description -n spawn-fcgi
540 spawn-fcgi is used to spawn fcgi-process directly without the help of
541 a webserver or the programm itself.
542
543 %description -n spawn-fcgi -l pl
544 spawn-fcgi s³u¿y do uruchamiania procesów fcgi bezpo¶rednio, bez
545 pomocy serwera WWW ani samego programu.
546
547 %package php-spawned
548 Summary:        PHP support via FastCGI, spawned by lighttpd
549 Group:          Networking/Daemons
550 Requires:       %{name} = %{version}-%{release}
551 Requires:       %{name}-mod_fastcgi = %{version}-%{release}
552 Requires:       php-fcgi
553 Obsoletes:      lighttpd-php-external
554
555 %description php-spawned
556 PHP support via FastCGI, spawned by lighttpd
557
558 %package php-external
559 Summary:        PHP support via FastCGI, spawning controlled externally
560 Group:          Networking/Daemons
561 Requires:       %{name} = %{version}-%{release}
562 Requires:       %{name}-mod_fastcgi = %{version}-%{release}
563 Requires:       php-fcgi-init
564 Obsoletes:      lighttpd-php-spawned
565
566 %description php-external
567 PHP support via FastCGI, spawning controlled externally
568
569 %package ssl
570 Summary:        lighttpd support for SSLv2 and SSLv3
571 Group:          Networking/Daemons
572 Requires:       %{name} = %{version}-%{release}
573
574 %description ssl
575 lighttpd support for SSLv2 and SSLv3.
576
577 %prep
578 %setup -q
579 #%patch100 -p1
580 #%patch0 -p1 # applied already?
581 #%patch1 -p1 # outdated
582 %patch2 -p1
583 #%patch3 -p1
584 %patch4 -p0
585 install %{SOURCE6} mime.types.sh
586
587 # build mime.types.conf
588 ./mime.types.sh /etc/mime.types
589
590 %build
591 %{__libtoolize}
592 %{__aclocal}
593 %{__autoconf}
594 %{__automake}
595
596 %configure \
597         %{!?with_ipv6:--disable-ipv6} \
598         %{!?with_largefile:--disable-lfs} \
599         %{?with_valgrind:--with-valgrind} \
600         %{?with_xattr:--with-attr} \
601         %{?with_mysql:--with-mysql} \
602         %{?with_ldap:--with-ldap} \
603         %{?with_ssl:--with-openssl} \
604         %{?with_lua:--with-lua} \
605         %{?with_memcache:--with-memcache} \
606         %{?with_webdav_props:--with-webdav-props} \
607         %{?with_gamin:--with-gamin} \
608         %{?with_gdbm:--with-gdbm}
609
610 %{__make}
611
612 %install
613 rm -rf $RPM_BUILD_ROOT
614 install -d $RPM_BUILD_ROOT{%{_lighttpddir}/{cgi-bin,html},/etc/{logrotate.d,rc.d/init.d,sysconfig}} \
615         $RPM_BUILD_ROOT%{_sysconfdir}/{conf,webapps}.d \
616         $RPM_BUILD_ROOT{/var/log/{%{name},archiv/%{name}},/var/run/%{name}}
617
618 %{__make} install \
619         DESTDIR=$RPM_BUILD_ROOT
620
621 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
622 install %{SOURCE2} %{SOURCE3} mime.types.conf $RPM_BUILD_ROOT%{_sysconfdir}
623 install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
624 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
625
626 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
627
628 # could use automake patch, but automake generation fails...
629 mv $RPM_BUILD_ROOT%{_bindir}/spawn-fcgi $RPM_BUILD_ROOT%{_sbindir}/spawn-fcgi
630
631 # Install lighttpd images
632 install %{SOURCE7} %{SOURCE8} %{SOURCE9} $RPM_BUILD_ROOT%{_lighttpddir}/html
633 install %{SOURCE10} $RPM_BUILD_ROOT%{_lighttpddir}/html/pld_button.png
634 install %{SOURCE11} $RPM_BUILD_ROOT%{_lighttpddir}/html/index.html
635
636 # NOTE: the order of the modules is somewhat important as the modules are
637 # handled in the way they are specified. mod_rewrite should always be the first
638 # module, mod_accesslog always the last.
639
640 install %{SOURCE117} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/10_mod_rewrite.conf
641 install %{SOURCE116} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/11_mod_redirect.conf
642
643 install %{SOURCE100} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_access.conf
644 install %{SOURCE102} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_alias.conf
645 install %{SOURCE103} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_auth.conf
646 install %{SOURCE104} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_cgi.conf
647 install %{SOURCE105} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_cml.conf
648 install %{SOURCE106} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_compress.conf
649 install %{SOURCE107} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_deflate.conf
650 install %{SOURCE108} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_dirlisting.conf
651 install %{SOURCE109} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_evasive.conf
652 install %{SOURCE110} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_evhost.conf
653 install %{SOURCE111} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_expire.conf
654 install %{SOURCE112} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_fastcgi.conf
655 install %{SOURCE113} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_flv_streaming.conf
656 install %{SOURCE114} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_indexfile.conf
657 install %{SOURCE115} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_proxy.conf
658 install %{SOURCE118} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_rrdtool.conf
659 install %{SOURCE119} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_scgi.conf
660 install %{SOURCE120} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_secdownload.conf
661 install %{SOURCE121} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_setenv.conf
662 install %{SOURCE122} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_simple_vhost.conf
663 install %{SOURCE123} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_ssi.conf
664 install %{SOURCE124} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_staticfile.conf
665 install %{SOURCE125} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_status.conf
666 install %{SOURCE126} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_trigger_b4_dl.conf
667 install %{SOURCE135} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_uploadprogress.conf
668 install %{SOURCE127} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_userdir.conf
669 install %{SOURCE128} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_usertrack.conf
670 install %{SOURCE129} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_webdav.conf
671 install %{SOURCE133} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_proxy_core.conf
672 install %{SOURCE134} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/50_mod_mysql_vhost.conf
673
674 install %{SOURCE101} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_accesslog.conf
675
676 install %{SOURCE130} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/php-spawned.conf
677 install %{SOURCE131} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/php-external.conf
678 install %{SOURCE132} $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/ssl.conf
679
680 %if %{without mysql}
681 # avoid packaging dummy module
682 rm -f $RPM_BUILD_ROOT%{_libdir}/mod_mysql_vhost.so
683 rm -f $RPM_BUILD_ROOT%{_libdir}/mod_sql_vhost_core.so
684 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/*_mod_mysql_vhost.conf
685 %endif
686 %if %{without deflate}
687 rm -f $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/*_mod_deflate.conf
688 %endif
689
690 %clean
691 rm -rf $RPM_BUILD_ROOT
692
693 %pre
694 %groupadd -g 109 lighttpd
695 %groupadd -g 51 http
696 %useradd -u 116 -d %{_lighttpddir} -c "LigHTTPd User" -g lighttpd lighttpd
697 %addusertogroup lighttpd http
698
699 %post
700 /sbin/chkconfig --add %{name}
701
702 %preun
703 if [ "$1" = "0" ]; then
704         %service %{name} stop
705         /sbin/chkconfig --del %{name}
706 fi
707
708 %postun
709 if [ "$1" = "0" ]; then
710         %userremove lighttpd
711         %groupremove lighttpd
712         %groupremove http
713 fi
714
715 %posttrans
716 # minimizing lighttpd restarts logics. we restart webserver:
717 #
718 # 1. at the end of transaction. (posttrans, feature from rpm 4.4.2)
719 # 2. first install of module (post: $1 = 1)
720 # 2. uninstall of module (postun: $1 == 0)
721 #
722 # the strict internal deps between lighttpd modules and
723 # main package are very important for all this to work.
724 %service %{name} restart "LigHTTPd webserver"
725 exit 0
726
727 # macro called at module post scriptlet
728 %define module_post \
729 if [ "$1" = "1" ]; then \
730         %service -q lighttpd restart \
731 fi
732
733 # macro called at module postun scriptlet
734 %define module_postun \
735 if [ "$1" = "0" ]; then \
736         %service -q lighttpd restart \
737 fi
738
739 # it's sooo annoying to write them
740 %define module_scripts() \
741 %post %1 \
742 %module_post \
743 \
744 %postun %1 \
745 %module_postun
746
747 %module_scripts mod_access
748 %module_scripts mod_accesslog
749 %module_scripts mod_alias
750 %module_scripts mod_auth
751 %module_scripts mod_cgi
752 %module_scripts mod_cml
753 %module_scripts mod_compress
754 %module_scripts mod_deflate
755 %module_scripts mod_dirlisting
756 %module_scripts mod_evasive
757 %module_scripts mod_evhost
758 %module_scripts mod_expire
759 %module_scripts mod_fastcgi
760 %module_scripts mod_flv_streaming
761 %module_scripts mod_indexfile
762 %module_scripts mod_mysql_vhost
763 %module_scripts mod_proxy
764 %module_scripts mod_redirect
765 %module_scripts mod_rewrite
766 %module_scripts mod_rrdtool
767 %module_scripts mod_scgi
768 %module_scripts mod_secdownload
769 %module_scripts mod_setenv
770 %module_scripts mod_simple_vhost
771 %module_scripts mod_ssi
772 %module_scripts mod_staticfile
773 %module_scripts mod_status
774 %module_scripts mod_trigger_b4_dl
775 %module_scripts mod_uploadprogress
776 %module_scripts mod_userdir
777 %module_scripts mod_usertrack
778 %module_scripts mod_webdav
779
780 %module_scripts php-spawned
781 %module_scripts php-external
782
783 %triggerpostun -- %{name} <= 1.3.6-2
784 %banner %{name} -e <<EOF
785 spawn-fcgi program is now available separately from spawn-fcgi package.
786
787 EOF
788
789 %files
790 %defattr(644,root,root,755)
791 %doc NEWS README ChangeLog doc/lighttpd.conf doc/*.txt doc/rrdtool-graph.sh
792 %dir %attr(750,root,lighttpd) %{_sysconfdir}
793 %dir %attr(750,root,root) %{_sysconfdir}/webapps.d
794 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
795 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mime.types.conf
796 %attr(640,root,lighttpd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.user
797
798 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
799 %attr(750,root,root) %dir /var/log/archiv/%{name}
800 %dir %attr(770,root,lighttpd) /var/log/%{name}
801 %dir %attr(770,root,lighttpd) /var/run/%{name}
802 %attr(754,root,root) /etc/rc.d/init.d/%{name}
803 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
804 %attr(755,root,root) %{_sbindir}/*
805 %dir %{_libdir}
806 %{_mandir}/man?/*
807 %dir %{_lighttpddir}
808 %dir %{_lighttpddir}/cgi-bin
809 %dir %{_lighttpddir}/html
810 %config(noreplace,missingok) %verify(not md5 mtime size) %{_lighttpddir}/html/*
811
812 %files mod_access
813 %defattr(644,root,root,755)
814 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_access.conf
815 %attr(755,root,root) %{_libdir}/mod_access.so
816
817 %files mod_accesslog
818 %defattr(644,root,root,755)
819 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_accesslog.conf
820 %attr(755,root,root) %{_libdir}/mod_accesslog.so
821
822 %files mod_alias
823 %defattr(644,root,root,755)
824 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_alias.conf
825 %attr(755,root,root) %{_libdir}/mod_alias.so
826
827 %files mod_auth
828 %defattr(644,root,root,755)
829 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_auth.conf
830 %attr(755,root,root) %{_libdir}/mod_auth.so
831
832 %files mod_cgi
833 %defattr(644,root,root,755)
834 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_cgi.conf
835 %attr(755,root,root) %{_libdir}/mod_cgi.so
836
837 %files mod_cml
838 %defattr(644,root,root,755)
839 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_cml.conf
840 %attr(755,root,root) %{_libdir}/mod_cml.so
841
842 %files mod_compress
843 %defattr(644,root,root,755)
844 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_compress.conf
845 %attr(755,root,root) %{_libdir}/mod_compress.so
846
847 %if %{with deflate}
848 %files mod_deflate
849 %defattr(644,root,root,755)
850 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_deflate.conf
851 %attr(755,root,root) %{_libdir}/mod_deflate.so
852 %endif
853
854 %files mod_dirlisting
855 %defattr(644,root,root,755)
856 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_dirlisting.conf
857 %attr(755,root,root) %{_libdir}/mod_dirlisting.so
858
859 %files mod_evasive
860 %defattr(644,root,root,755)
861 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_evasive.conf
862 %attr(755,root,root) %{_libdir}/mod_evasive.so
863
864 %files mod_evhost
865 %defattr(644,root,root,755)
866 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_evhost.conf
867 %attr(755,root,root) %{_libdir}/mod_evhost.so
868
869 %files mod_expire
870 %defattr(644,root,root,755)
871 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_expire.conf
872 %attr(755,root,root) %{_libdir}/mod_expire.so
873
874 %files mod_fastcgi
875 %defattr(644,root,root,755)
876 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_fastcgi.conf
877 %attr(755,root,root) %{_libdir}/mod_fastcgi.so
878
879 %files mod_flv_streaming
880 %defattr(644,root,root,755)
881 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_flv_streaming.conf
882 %attr(755,root,root) %{_libdir}/mod_flv_streaming.so
883
884 %files mod_indexfile
885 %defattr(644,root,root,755)
886 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_indexfile.conf
887 %attr(755,root,root) %{_libdir}/mod_indexfile.so
888
889 %if %{with mysql}
890 %files mod_mysql_vhost
891 %defattr(644,root,root,755)
892 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_mysql_vhost.conf
893 #%attr(755,root,root) %{_libdir}/mod_sql_vhost_core.so
894 %attr(755,root,root) %{_libdir}/mod_mysql_vhost.so
895 %endif
896
897 %files mod_proxy
898 %defattr(644,root,root,755)
899 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_proxy.conf
900 %attr(755,root,root) %{_libdir}/mod_proxy.so
901
902 %if 0
903 %files mod_proxy_core
904 %defattr(644,root,root,755)
905 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_proxy_core.conf
906 %attr(755,root,root) %{_libdir}/mod_proxy_core.so
907 %endif
908
909 %files mod_redirect
910 %defattr(644,root,root,755)
911 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_redirect.conf
912 %attr(755,root,root) %{_libdir}/mod_redirect.so
913
914 %files mod_rewrite
915 %defattr(644,root,root,755)
916 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_rewrite.conf
917 %attr(755,root,root) %{_libdir}/mod_rewrite.so
918
919 %files mod_rrdtool
920 %defattr(644,root,root,755)
921 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_rrdtool.conf
922 %attr(755,root,root) %{_libdir}/mod_rrdtool.so
923
924 %files mod_scgi
925 %defattr(644,root,root,755)
926 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_scgi.conf
927 %attr(755,root,root) %{_libdir}/mod_scgi.so
928
929 %files mod_secdownload
930 %defattr(644,root,root,755)
931 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_secdownload.conf
932 %attr(755,root,root) %{_libdir}/mod_secdownload.so
933
934 %files mod_setenv
935 %defattr(644,root,root,755)
936 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_setenv.conf
937 %attr(755,root,root) %{_libdir}/mod_setenv.so
938
939 %files mod_simple_vhost
940 %defattr(644,root,root,755)
941 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_simple_vhost.conf
942 %attr(755,root,root) %{_libdir}/mod_simple_vhost.so
943
944 %files mod_ssi
945 %defattr(644,root,root,755)
946 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_ssi.conf
947 %attr(755,root,root) %{_libdir}/mod_ssi.so
948
949 %files mod_staticfile
950 %defattr(644,root,root,755)
951 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_staticfile.conf
952 %attr(755,root,root) %{_libdir}/mod_staticfile.so
953
954 %files mod_status
955 %defattr(644,root,root,755)
956 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_status.conf
957 %attr(755,root,root) %{_libdir}/mod_status.so
958
959 %files mod_trigger_b4_dl
960 %defattr(644,root,root,755)
961 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_trigger_b4_dl.conf
962 %attr(755,root,root) %{_libdir}/mod_trigger_b4_dl.so
963
964 %if 0
965 %files mod_uploadprogress
966 %defattr(644,root,root,755)
967 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_uploadprogress.conf
968 %attr(755,root,root) %{_libdir}/mod_uploadprogress.so
969 %endif
970
971 %files mod_userdir
972 %defattr(644,root,root,755)
973 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_userdir.conf
974 %attr(755,root,root) %{_libdir}/mod_userdir.so
975
976 %files mod_usertrack
977 %defattr(644,root,root,755)
978 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_usertrack.conf
979 %attr(755,root,root) %{_libdir}/mod_usertrack.so
980
981 %files mod_webdav
982 %defattr(644,root,root,755)
983 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*mod_webdav.conf
984 %attr(755,root,root) %{_libdir}/mod_webdav.so
985
986 %files -n spawn-fcgi
987 %defattr(644,root,root,755)
988 %doc doc/spawn-php.sh
989 %attr(755,root,root) %{_sbindir}/spawn-fcgi
990
991 %files php-spawned
992 %defattr(644,root,root,755)
993 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/php-spawned.conf
994
995 %files php-external
996 %defattr(644,root,root,755)
997 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/php-external.conf
998
999 %files ssl
1000 %defattr(644,root,root,755)
1001 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/ssl.conf
This page took 0.109576 seconds and 4 git commands to generate.