]> git.pld-linux.org Git - packages/lighttpd.git/blob - lighttpd.spec
14615e6c23c9216625fda48318894be0081e446e
[packages/lighttpd.git] / lighttpd.spec
1 #
2 # Conditional build for freebsd:
3 %bcond_without  xattr   # without support of extended attributes
4 #
5 Summary:        Fast and light HTTP server
6 Summary(pl):    Szybki i lekki serwer HTTP
7 Name:           lighttpd
8 Version:        1.3.7
9 Release:        0.1
10 Group:          Networking/Daemons
11 License:        BSD
12 ## do not remove next two lines because atomic revisions are common in lighttpd
13 #%define                _rel    20041102-1041
14 #Source0:       http://jan.kneschke.de/projects/lighttpd/download/%{name}-%{version}-%{_rel}.tar.gz
15 Source0:        http://jan.kneschke.de/projects/lighttpd/download/%{name}-%{version}.tar.gz
16 # Source0-md5:  40ac1d07d9efb0366720d081c3e02224
17 Source1:        %{name}.init
18 Source2:        %{name}.conf
19 Source3:        %{name}.user
20 Source4:        %{name}.logrotate
21 URL:            http://jan.kneschke.de/projects/lighttpd/
22 BuildRequires:  autoconf
23 BuildRequires:  automake
24 BuildRequires:  bzip2-devel
25 BuildRequires:  libtool
26 BuildRequires:  openssl-devel
27 BuildRequires:  pcre-devel
28 BuildRequires:  rpmbuild(macros) >= 1.159
29 BuildRequires:  zlib-devel
30 %if %{with xattr}
31 BuildRequires:  attr-devel
32 %endif
33 PreReq:         rc-scripts
34 Requires(pre):  sh-utils
35 Requires(pre):  /bin/id
36 Requires(pre):  /usr/bin/getgid
37 Requires(pre):  /usr/sbin/groupadd
38 Requires(pre):  /usr/sbin/useradd
39 Requires(post,preun):   /sbin/chkconfig
40 Requires(postun):       /usr/sbin/groupdel
41 Requires(postun):       /usr/sbin/userdel
42 Provides:       group(lighttpd)
43 Provides:       httpd
44 Provides:       user(lighttpd)
45 Provides:       webserver
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %define         _libdir         %{_prefix}/%{_lib}/%{name}
49 %define         _lighttpddir    /home/services/%{name}
50 %define         _sysconfdir     /etc/%{name}
51
52 %description
53 lighttpd is a secure, fast, compliant and very flexible web-server
54 which has been optimized for high-performance environments. It has
55 a very low memory footprint compared to other webservers and takes
56 care of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth,
57 Output-Compression, URL-Rewriting and many more) make lighttpd the
58 perfect webserver-software for every server that is suffering load
59 problems.
60
61 %description -l pl
62 lighttpd jest bezpiecznym, szybkim, przyjaznym i bardzo elastycznym
63 serwerem WWW, który zosta³ zoptymalizowany pod k±tem
64 wysokowydajno¶ciowych ¶rodowisk. Zajmuje bardzo ma³± ilo¶æ pamiêci
65 w porównaniu do innych serwerów WWW oraz dba o zajêto¶æ procesora.
66 Szeroki zestaw opcji (FastCGI, CGI, uwierzytelnianie, kompresja
67 wyj¶cia, przepisywanie URL-i i wiele innych) czyni± z lighttpd
68 doskona³e oprogramowanie web-serwerowe na ka¿dy serwer cierpi±cy
69 z powodu problemów z obci±¿eniem.
70
71 %prep
72 %setup -q
73
74 %build
75 %{__libtoolize}
76 %{__aclocal}
77 %{__autoconf}
78 #%{__automake}
79 %configure \
80         --enable-mod-chat \
81         --enable-mod-cache \
82         --enable-mod-localizer \
83         %{?with_xattr:--with-attr} \
84         --with-openssl
85         
86 %{__make}
87
88 %install
89 rm -rf $RPM_BUILD_ROOT
90 install -d $RPM_BUILD_ROOT{%{_lighttpddir}/cgi-bin,/etc/{logrotate.d,rc.d/init.d},%{_sysconfdir}} \
91         $RPM_BUILD_ROOT/var/log/{%{name},archiv/%{name}}
92
93 %{__make} install \
94         DESTDIR=$RPM_BUILD_ROOT
95
96 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
97 install %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
98 install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %pre
104 if [ -n "`/usr/bin/getgid lighttpd`" ]; then
105         if [ "`/usr/bin/getgid lighttpd`" != 109 ]; then
106                 echo "Error: group lighttpd doesn't have gid=109. Correct this before installing %{name}." 1>&2
107                 exit 1
108         fi
109 else
110         /usr/sbin/groupadd -g 109 lighttpd
111 fi
112 if [ -n "`/bin/id -u lighttpd 2>/dev/null`" ]; then
113         if [ "`/bin/id -u lighttpd`" != 116 ]; then
114                 echo "Error: user lighhttpd doesn't have uid=116. Correct this before installing %{name}." 1>&2
115                 exit 1
116         fi
117 else
118         /usr/sbin/useradd -u 116 -d %{_lighttpddir} -s /bin/false \
119                 -c "HTTP User" -g lighttpd lighttpd 1>&2
120 fi
121
122 %post
123 /sbin/chkconfig --add %{name}
124 if [ -f /var/lock/subsys/%{name} ]; then
125         /etc/rc.d/init.d/%{name} restart 1>&2
126 else
127         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
128 fi
129
130 %preun
131 if [ "$1" = "0" ]; then
132         if [ -f /var/lock/subsys/%{name} ]; then
133                 /etc/rc.d/init.d/%{name} stop 1>&2
134         fi
135         /sbin/chkconfig --del %{name}
136 fi
137
138 %postun
139 if [ "$1" = "0" ]; then
140         %userremove lighttpd
141         %groupremove lighttpd
142 fi
143
144 %files
145 %defattr(644,root,root,755)
146 %doc NEWS README 
147 %attr(755,root,root) %{_sbindir}/*
148 %attr(755,root,root) %{_bindir}/*
149 %dir %{_libdir}
150 %attr(755,root,root) %{_libdir}/*.so
151 %attr(750,root,root) %dir /var/log/archiv/%{name}
152 %dir %attr(750,lighttpd,root) /var/log/%{name}
153 %attr(755,lighttpd,lighttpd) %{_lighttpddir}
154 %attr(754,root,root) /etc/rc.d/init.d/%{name}
155 %dir %attr(754,root,root) %{_sysconfdir}
156 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.*
157 %attr(640,root,root) %config(noreplace) %verify(not size mtime md5) /etc/logrotate.d/%{name}
158 %{_mandir}/man?/*
This page took 0.063183 seconds and 2 git commands to generate.