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