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