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