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