]> git.pld-linux.org Git - packages/lighttpd.git/blob - lighttpd.spec
- updated to 1.3.14
[packages/lighttpd.git] / lighttpd.spec
1 #
2 # TODO:
3 # - test ldap and mysql (failed at this time)
4 # - mysql issue: http://www.freebsd.org/cgi/query-pr.cgi?pr=76866
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_with     mysql           # with mysql
15 %bcond_with     ldap            # with ldap
16 %bcond_with     valgrind        # compile code with valgrind support.
17 %bcond_with     dirhide         # with 'hide from dirlisting' hack
18 #
19 # Prerelease snapshot: DATE-TIME
20 ##define _snap 20050116-1743
21
22 %if 0%{?_snap}
23 %define _source http://www.lighttpd.net/download/%{name}-%{version}-%{_snap}.tar.gz
24 %else
25 %define _source http://www.lighttpd.net/download/%{name}-%{version}.tar.gz
26 %endif
27
28 %define         _rel 1
29
30 Summary:        Fast and light HTTP server
31 Summary(pl):    Szybki i lekki serwer HTTP
32 Name:           lighttpd
33 Version:        1.3.14
34 Release:        %{_rel}%{?_snap:.%(echo %{_snap}|tr - _)}
35 Group:          Networking/Daemons
36 License:        BSD
37 Source0:        %{_source}
38 # Source0-md5:  16d9f8c40bcb5638ee452fa23b21e346
39 Source1:        %{name}.init
40 Source2:        %{name}.conf
41 Source3:        %{name}.user
42 Source4:        %{name}.logrotate
43 Source5:        %{name}.sysconfig
44 Patch0:         http://minghetti.ch/blob/dirlist-hide.patch
45 Patch1:         %{name}-fcgi-verbose.patch
46 URL:            http://www.lighttpd.net/
47 BuildRequires:  autoconf
48 BuildRequires:  automake
49 BuildRequires:  bzip2-devel
50 BuildRequires:  libtool
51 %{?with_ssl:BuildRequires:      openssl-devel}
52 BuildRequires:  pcre-devel
53 BuildRequires:  rpmbuild(macros) >= 1.159
54 BuildRequires:  zlib-devel
55 %if %{with xattr}
56 BuildRequires:  attr-devel
57 %endif
58 %{?with_ldap:BuildRequires:     openldap-devel}
59 %{?with_mysql:BuildRequires:    mysql-devel}
60 %{?debug:BuildRequires: valgrind}
61 BuildRequires:  rpmbuild(macros) >= 1.202
62 PreReq:         rc-scripts
63 Requires(pre):  sh-utils
64 Requires(pre):  /bin/id
65 Requires(pre):  /usr/bin/getgid
66 Requires(pre):  /usr/sbin/groupadd
67 Requires(pre):  /usr/sbin/useradd
68 Requires(post,preun):   /sbin/chkconfig
69 Requires(postun):       /usr/sbin/groupdel
70 Requires(postun):       /usr/sbin/userdel
71 Provides:       group(lighttpd)
72 Provides:       httpd
73 Provides:       user(lighttpd)
74 Provides:       webserver
75 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
76
77 %define         _libdir         %{_prefix}/%{_lib}/%{name}
78 %define         _lighttpddir    /home/services/%{name}
79 %define         _sysconfdir     /etc/%{name}
80
81 %description
82 lighttpd is a secure, fast, compliant and very flexible web-server
83 which has been optimized for high-performance environments. It has a
84 very low memory footprint compared to other webservers and takes care
85 of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth,
86 Output-Compression, URL-Rewriting and many more) make lighttpd the
87 perfect webserver-software for every server that is suffering load
88 problems.
89
90 %description -l pl
91 lighttpd jest bezpiecznym, szybkim, przyjaznym i bardzo elastycznym
92 serwerem WWW, który zosta³ zoptymalizowany pod k±tem
93 wysokowydajno¶ciowych ¶rodowisk. Zajmuje bardzo ma³± ilo¶æ pamiêci w
94 porównaniu do innych serwerów WWW oraz dba o zajêto¶æ procesora.
95 Szeroki zestaw opcji (FastCGI, CGI, uwierzytelnianie, kompresja
96 wyj¶cia, przepisywanie URL-i i wiele innych) czyni± z lighttpd
97 doskona³e oprogramowanie web-serwerowe na ka¿dy serwer cierpi±cy z
98 powodu problemów z obci±¿eniem.
99
100 %package -n spawn-fcgi
101 Summary:        Spawn fcgi-process directly
102 Summary(pl):    Bezpo¶rednie uruchamianie procesów fcgi
103 Group:          Applications
104
105 %description -n spawn-fcgi
106 spawn-fcgi is used to spawn fcgi-process directly without the help of
107 a webserver or the programm itself.
108
109 %description -n spawn-fcgi -l pl
110 spawn-fcgi s³u¿y do uruchamiania procesów fcgi bezpo¶rednio, bez
111 pomocy serwera WWW ani samego programu.
112
113 %prep
114 %setup -q
115 %{?with_dirhide:%patch0 -p0}
116 %patch1 -p1
117
118 %build
119 %{__libtoolize}
120 %{__aclocal}
121 %{__autoconf}
122
123 %configure \
124         %{?with_valgrind:--with-valgrind} \
125         %{?with_xattr:--with-attr} \
126         %{?with_mysql:--with-mysql} \
127         %{?with_ldap:--with-ldap} \
128         %{!?with_ipv6:--disable-ipv6} \
129         %{!?with_largefile:--disable-lfs} \
130         %{?with_ssl:--with-openssl}
131
132 %{__make}
133
134 %install
135 rm -rf $RPM_BUILD_ROOT
136 install -d $RPM_BUILD_ROOT{%{_lighttpddir}/{cgi-bin,html},/etc/{logrotate.d,rc.d/init.d,sysconfig},%{_sysconfdir}} \
137         $RPM_BUILD_ROOT/var/log/{%{name},archiv/%{name}}
138
139 %{__make} install \
140         DESTDIR=$RPM_BUILD_ROOT
141
142 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
143 install %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
144 install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
145 install %{SOURCE5} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
146
147 rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
148
149 # could use automake patch, but automake generation fails...
150 mv $RPM_BUILD_ROOT%{_bindir}/spawn-fcgi $RPM_BUILD_ROOT%{_sbindir}/spawn-fcgi
151
152 %clean
153 rm -rf $RPM_BUILD_ROOT
154
155 %pre
156 %groupadd -g 109 lighttpd
157 %useradd -u 116 -d %{_lighttpddir} -c "HTTP User" -g lighttpd lighttpd
158
159 %post
160 /sbin/chkconfig --add %{name}
161 if [ -f /var/lock/subsys/%{name} ]; then
162         /etc/rc.d/init.d/%{name} restart 1>&2
163 else
164         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
165 fi
166
167 %preun
168 if [ "$1" = "0" ]; then
169         if [ -f /var/lock/subsys/%{name} ]; then
170                 /etc/rc.d/init.d/%{name} stop 1>&2
171         fi
172         /sbin/chkconfig --del %{name}
173 fi
174
175 %postun
176 if [ "$1" = "0" ]; then
177         %userremove lighttpd
178         %groupremove lighttpd
179 fi
180
181 %triggerpostun -- %{name} <= 1.3.6-2
182 # upgraded
183 if [ "$1" = "2" ]; then
184 %banner %{name} -e <<EOF
185 spawn-fcgi program is now available separately from spawn-fcgi package.
186
187 EOF
188 fi
189
190 %files
191 %defattr(644,root,root,755)
192 %doc NEWS README ChangeLog doc/lighttpd.conf doc/*.txt doc/rrdtool-graph.sh
193 %attr(755,root,root) %{_sbindir}/*
194 %dir %{_libdir}
195 %attr(755,root,root) %{_libdir}/*.so
196 %attr(750,root,root) %dir /var/log/archiv/%{name}
197 %dir %attr(750,lighttpd,root) /var/log/%{name}
198 %attr(755,lighttpd,lighttpd) %{_lighttpddir}
199 %attr(754,root,root) /etc/rc.d/init.d/%{name}
200 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
201 %dir %attr(750,root,lighttpd) %{_sysconfdir}
202 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}.conf
203 %attr(640,root,lighttpd) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/*.user
204 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
205 %{_mandir}/man?/*
206
207 %files -n spawn-fcgi
208 %defattr(644,root,root,755)
209 %doc doc/spawn-php.sh
210 %attr(755,root,root) %{_sbindir}/spawn-fcgi
This page took 0.058253 seconds and 4 git commands to generate.