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