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