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