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