]> git.pld-linux.org Git - packages/lighttpd.git/blob - lighttpd.spec
- tidy up spec header of notes and todo and bconds
[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 # - gdbm for mod_trigger_b4_dl http://www.lighttpd.net/documentation/trigger_b4_dl.html
5 #
6 # NOTES:
7 # - fcgi-devel is only used for the test-scripts
8 # - disable largefile, if you have 2.4 kernel to get sendfile() support, and don't need > 2GB file requests,
9 #   see http://article.gmane.org/gmane.comp.web.lighttpd:722
10 #
11 # Conditional build for lighttpd:
12 %bcond_without  xattr           # without support of extended attributes
13 %bcond_without  ipv6            # IPv4-only version (doesn't require IPv6 in kernel)
14 %bcond_without  largefile       # without largefile support (see notes above)
15 %bcond_without  ssl                     # disable ssl support
16 %bcond_without  mysql           # without mysql
17 %bcond_with     ldap            # with ldap
18 %bcond_with     lua                     # enable LUA support in mod_cml
19 %bcond_with     memcache        # enable memcached support in mod_cml / mod_trigger_b4_dl
20 %bcond_with     valgrind        # compile code with valgrind support.
21 %bcond_with     dirhide         # with 'hide from dirlisting' hack
22
23 # Prerelease snapshot: DATE-TIME
24 #define _snap 20050116-1743
25
26 %if 0%{?_snap}
27 %define _source http://www.lighttpd.net/download/%{name}-%{version}-%{_snap}.tar.gz
28 %else
29 %define _source http://www.lighttpd.net/download/%{name}-%{version}.tar.gz
30 %endif
31
32 %define         _rel 1.12
33
34 Summary:        Fast and light HTTP server
35 Summary(pl):    Szybki i lekki serwer HTTP
36 Name:           lighttpd
37 Version:        1.3.15
38 Release:        %{_rel}%{?_snap:.%(echo %{_snap}|tr - _)}
39 Group:          Networking/Daemons
40 License:        BSD
41 Source0:        %{_source}
42 # Source0-md5:  e605ade1071f25dec9001730ec753112
43 Source1:        %{name}.init
44 Source2:        %{name}.conf
45 Source3:        %{name}.user
46 Source4:        %{name}.logrotate
47 Source5:        %{name}.sysconfig
48 Patch0:         http://minghetti.ch/blob/dirlist-hide.patch
49 Patch1:         %{name}-fcgi-verbose.patch
50 Patch2:         %{name}-ssl-redirect-fix.patch
51 URL:            http://www.lighttpd.net/
52 %{?with_xattr:BuildRequires:    attr-devel}
53 BuildRequires:  autoconf
54 BuildRequires:  automake
55 BuildRequires:  bzip2-devel
56 BuildRequires:  libtool
57 %{?with_mysql:BuildRequires:    mysql-devel}
58 %{?with_ldap:BuildRequires:             openldap-devel}
59 %{?with_ssl:BuildRequires:      openssl-devel}
60 %{?with_lua:BuildRequires:      lua50-devel}
61 %{?with_memcache:BuildRequires: libmemcache-devel}
62 BuildRequires:  pcre-devel
63 BuildRequires:  rpmbuild(macros) >= 1.202
64 %{?debug:BuildRequires: valgrind}
65 BuildRequires:  zlib-devel
66 PreReq:         rc-scripts
67 Requires(pre):  sh-utils
68 Requires(pre):  /bin/id
69 Requires(pre):  /usr/bin/getgid
70 Requires(pre):  /usr/sbin/groupadd
71 Requires(pre):  /usr/sbin/useradd
72 Requires(post,preun):   /sbin/chkconfig
73 Requires(postun):       /usr/sbin/groupdel
74 Requires(postun):       /usr/sbin/userdel
75 Provides:       group(lighttpd)
76 Provides:       httpd
77 Provides:       user(lighttpd)
78 Provides:       webserver
79 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
80
81 %define         _libdir         %{_prefix}/%{_lib}/%{name}
82 %define         _lighttpddir    /home/services/%{name}
83 %define         _sysconfdir     /etc/%{name}
84
85 %description
86 lighttpd is a secure, fast, compliant and very flexible web-server
87 which has been optimized for high-performance environments. It has a
88 very low memory footprint compared to other webservers and takes care
89 of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth,
90 Output-Compression, URL-Rewriting and many more) make lighttpd the
91 perfect webserver-software for every server that is suffering load
92 problems.
93
94 %description -l pl
95 lighttpd jest bezpiecznym, szybkim, przyjaznym i bardzo elastycznym
96 serwerem WWW, który zosta³ zoptymalizowany pod k±tem
97 wysokowydajno¶ciowych ¶rodowisk. Zajmuje bardzo ma³± ilo¶æ pamiêci w
98 porównaniu do innych serwerów WWW oraz dba o zajêto¶æ procesora.
99 Szeroki zestaw opcji (FastCGI, CGI, uwierzytelnianie, kompresja
100 wyj¶cia, przepisywanie URL-i i wiele innych) czyni± z lighttpd
101 doskona³e oprogramowanie web-serwerowe na ka¿dy serwer cierpi±cy z
102 powodu problemów z obci±¿eniem.
103
104 %package mod_compress
105 Summary:        Output Compression
106 Group:          Networking/Daemons
107 URL:            http://www.lighttpd.net/documentation/compress.html
108 Requires:       %{name} = %{version}-%{release}
109
110 %description mod_compress
111 Output compression reduces the network load and can improve the
112 overall throughput of the webserver.
113
114 Only static content is supported up to now.
115
116 The server negotiates automaticly which compression method is used.
117 Supported are gzip, deflate, bzip.
118
119 %package mod_cml
120 Summary:        Cache Meta Language module
121 Group:          Networking/Daemons
122 URL:            http://www.lighttpd.net/documentation/cml.html
123 Requires:       %{name} = %{version}-%{release}
124
125 %description mod_cml
126 CML is a Meta language to describe the dependencies of a page at one
127 side and building a page from its fragments on the other side using
128 LUA.
129
130 %package mod_mysql_vhost
131 Summary:        MySQL based vhosting
132 Group:          Networking/Daemons
133 URL:            http://www.lighttpd.net/documentation/mysqlvhost.html
134 Requires:       %{name} = %{version}-%{release}
135
136 %description mod_mysql_vhost
137 This module provides virtual hosts (vhosts) based on a MySQL table.
138
139 %package mod_trigger_b4_dl
140 Summary:        Trigger before Download
141 Group:          Networking/Daemons
142 URL:            http://www.lighttpd.net/documentation/trigger_b4_dl.html
143 Requires:       %{name} = %{version}-%{release}
144
145 %description mod_trigger_b4_dl
146 Another anti hot-linking module.
147
148 %package -n spawn-fcgi
149 Summary:        Spawn fcgi-process directly
150 Summary(pl):    Bezpo¶rednie uruchamianie procesów fcgi
151 Group:          Applications
152
153 %description -n spawn-fcgi
154 spawn-fcgi is used to spawn fcgi-process directly without the help of
155 a webserver or the programm itself.
156
157 %description -n spawn-fcgi -l pl
158 spawn-fcgi s³u¿y do uruchamiania procesów fcgi bezpo¶rednio, bez
159 pomocy serwera WWW ani samego programu.
160
161 %prep
162 %setup -q
163 %{?with_dirhide:%patch0 -p0}
164 %patch1 -p1
165 %patch2 -p1
166
167 %build
168 %{__libtoolize}
169 %{__aclocal}
170 %{__autoconf}
171
172 %configure \
173         %{?with_valgrind:--with-valgrind} \
174         %{?with_xattr:--with-attr} \
175         %{?with_mysql:--with-mysql} \
176         %{?with_ldap:--with-ldap} \
177         %{!?with_ipv6:--disable-ipv6} \
178         %{!?with_largefile:--disable-lfs} \
179         %{?with_ssl:--with-openssl} \
180         %{?with_lua:--with-lua} \
181         %{?with_memcache:--with-memcache}
182
183 %{__make}
184
185 %install
186 rm -rf $RPM_BUILD_ROOT
187 install -d $RPM_BUILD_ROOT{%{_lighttpddir}/{cgi-bin,html},/etc/{logrotate.d,rc.d/init.d,sysconfig},%{_sysconfdir}} \
188         $RPM_BUILD_ROOT/var/log/{%{name},archiv/%{name}}
189
190 %{__make} install \
191         DESTDIR=$RPM_BUILD_ROOT
192
193 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
194 install %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
195 install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
196 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
197
198 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
199
200 # could use automake patch, but automake generation fails...
201 mv $RPM_BUILD_ROOT%{_bindir}/spawn-fcgi $RPM_BUILD_ROOT%{_sbindir}/spawn-fcgi
202
203 %clean
204 rm -rf $RPM_BUILD_ROOT
205
206 %pre
207 %groupadd -g 109 lighttpd
208 %useradd -u 116 -d %{_lighttpddir} -c "HTTP User" -g lighttpd lighttpd
209
210 %post
211 /sbin/chkconfig --add %{name}
212 if [ -f /var/lock/subsys/%{name} ]; then
213         /etc/rc.d/init.d/%{name} restart 1>&2
214 else
215         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
216 fi
217
218 %preun
219 if [ "$1" = "0" ]; then
220         if [ -f /var/lock/subsys/%{name} ]; then
221                 /etc/rc.d/init.d/%{name} stop 1>&2
222         fi
223         /sbin/chkconfig --del %{name}
224 fi
225
226 %postun
227 if [ "$1" = "0" ]; then
228         %userremove lighttpd
229         %groupremove lighttpd
230 fi
231
232 %triggerpostun -- %{name} <= 1.3.6-2
233 # upgraded
234 if [ "$1" = "2" ]; then
235 %banner %{name} -e <<EOF
236 spawn-fcgi program is now available separately from spawn-fcgi package.
237
238 EOF
239 fi
240
241 %files
242 %defattr(644,root,root,755)
243 %doc NEWS README ChangeLog doc/lighttpd.conf doc/*.txt doc/rrdtool-graph.sh
244 %attr(755,root,root) %{_sbindir}/*
245 %dir %{_libdir}
246 %attr(755,root,root) %{_libdir}/mod_access.so
247 %attr(755,root,root) %{_libdir}/mod_accesslog.so
248 %attr(755,root,root) %{_libdir}/mod_alias.so
249 %attr(755,root,root) %{_libdir}/mod_auth.so
250 %attr(755,root,root) %{_libdir}/mod_cgi.so
251 %attr(755,root,root) %{_libdir}/mod_evhost.so
252 %attr(755,root,root) %{_libdir}/mod_expire.so
253 %attr(755,root,root) %{_libdir}/mod_fastcgi.so
254 %attr(755,root,root) %{_libdir}/mod_proxy.so
255 %attr(755,root,root) %{_libdir}/mod_redirect.so
256 %attr(755,root,root) %{_libdir}/mod_rewrite.so
257 %attr(755,root,root) %{_libdir}/mod_rrdtool.so
258 %attr(755,root,root) %{_libdir}/mod_scgi.so
259 %attr(755,root,root) %{_libdir}/mod_secdownload.so
260 %attr(755,root,root) %{_libdir}/mod_setenv.so
261 %attr(755,root,root) %{_libdir}/mod_simple_vhost.so
262 %attr(755,root,root) %{_libdir}/mod_ssi.so
263 %attr(755,root,root) %{_libdir}/mod_status.so
264 %attr(755,root,root) %{_libdir}/mod_userdir.so
265 %attr(755,root,root) %{_libdir}/mod_usertrack.so
266 %attr(750,root,root) %dir /var/log/archiv/%{name}
267 %dir %attr(750,lighttpd,root) /var/log/%{name}
268 %attr(755,lighttpd,lighttpd) %{_lighttpddir}
269 %attr(754,root,root) /etc/rc.d/init.d/%{name}
270 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
271 %dir %attr(750,root,lighttpd) %{_sysconfdir}
272 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
273 %attr(640,root,lighttpd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.user
274 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
275 %{_mandir}/man?/*
276
277 %files mod_compress
278 %defattr(644,root,root,755)
279 %attr(755,root,root) %{_libdir}/mod_compress.so
280
281 %files mod_cml
282 %defattr(644,root,root,755)
283 %attr(755,root,root) %{_libdir}/mod_cml.so
284
285 %files mod_mysql_vhost
286 %defattr(644,root,root,755)
287 %attr(755,root,root) %{_libdir}/mod_mysql_vhost.so
288
289 %files mod_trigger_b4_dl
290 %defattr(644,root,root,755)
291 %attr(755,root,root) %{_libdir}/mod_trigger_b4_dl.so
292
293 %files -n spawn-fcgi
294 %defattr(644,root,root,755)
295 %doc doc/spawn-php.sh
296 %attr(755,root,root) %{_sbindir}/spawn-fcgi
This page took 0.050204 seconds and 4 git commands to generate.