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