]> git.pld-linux.org Git - packages/lighttpd.git/blob - lighttpd.spec
- up to 1.2.8
[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.2.8
9 Release:        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    20080401-0000   
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:  72bca49aa35d073551e9a0489098f973
17 Source1:        %{name}.init
18 Source2:        %{name}.conf
19 Source3:        %{name}.user
20 Source4:        %{name}.logrotate
21 Patch1:         lighttpd-amd64-LINUX_SENDFILE-temporary.patch
22 URL:            http://jan.kneschke.de/projects/lighttpd/
23 BuildRequires:  autoconf
24 BuildRequires:  automake
25 BuildRequires:  bzip2-devel
26 BuildRequires:  libtool
27 BuildRequires:  openssl-devel
28 BuildRequires:  pcre-devel
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/userdel
41 Requires(postun):       /usr/sbin/groupdel
42 Provides:       httpd
43 Provides:       webserver
44 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45
46 %define         _libdir         %{_prefix}/%{_lib}/%{name}
47 %define         _lighttpddir    /home/services/%{name}
48 %define         _sysconfdir     /etc/%{name}
49
50 %description
51 lighttpd is a secure, fast, compliant and very flexible web-server
52 which has been optimized for high-performance environments. It has
53 a very low memory footprint compared to other webservers and takes
54 care of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth,
55 Output-Compression, URL-Rewriting and many more) make lighttpd the
56 perfect webserver-software for every server that is suffering load
57 problems.
58
59 %description -l pl
60 lighttpd jest bezpiecznym, szybkim, przyjaznym i bardzo elastycznym
61 serwerem WWW, który zosta³ zoptymalizowany pod k±tem
62 wysokowydajno¶ciowych ¶rodowisk. Zajmuje bardzo ma³± ilo¶æ pamiêci
63 w porównaniu do innych serwerów WWW oraz dba o zajêto¶æ procesora.
64 Szeroki zestaw opcji (FastCGI, CGI, uwierzytelnianie, kompresja
65 wyj¶cia, przepisywanie URL-i i wiele innych) czyni± z lighttpd
66 doskona³e oprogramowanie web-serwerowe na ka¿dy serwer cierpi±cy
67 z powodu problemów z obci±¿eniem.
68
69 %prep
70 %setup -q
71
72 %ifarch amd64
73 %patch1 
74 %endif
75
76 %build
77 %{__libtoolize}
78 %{__aclocal}
79 %{__autoconf}
80 %{__automake}
81 %configure \
82         --enable-mod-chat \
83         --enable-mod-cache \
84         --enable-mod-localizer \
85         %{?with_xattr:--with-attr} \
86         --with-openssl
87         
88 %{__make}
89
90 %install
91 rm -rf $RPM_BUILD_ROOT
92 install -d $RPM_BUILD_ROOT{%{_lighttpddir}/cgi-bin,/etc/{logrotate.d,rc.d/init.d},%{_sysconfdir}} \
93         $RPM_BUILD_ROOT/var/log/{%{name},archiv/%{name}}
94
95 %{__make} install \
96         DESTDIR=$RPM_BUILD_ROOT
97
98 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
99 install %{SOURCE2} %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
100 install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
101
102 %clean
103 rm -rf $RPM_BUILD_ROOT
104
105 %pre
106 if [ -n "`getgid lighttpd`" ]; then
107         if [ "`getgid lighttpd`" != "109" ]; then
108                 echo "Error: group lighttpd doesn't have gid=109. Correct this before installing %{name}." 1>&2
109                 exit 1
110         fi
111 else
112         /usr/sbin/groupadd -g 109 -r -f lighttpd
113 fi
114 if [ -n "`id -u lighttpd 2>/dev/null`" ]; then
115         if [ "`id -u lighttpd`" != "116" ]; then
116                 echo "Error: user lighhttpd doesn't have uid=116. Correct this before installing %{name}." 1>&2
117                 exit 1
118         fi
119 else
120         /usr/sbin/useradd -u 116 -r -d %{_lighttpddir} -s /bin/false -c "HTTP User" -g lighttpd lighttpd 1>&2
121 fi
122
123 %post
124 /sbin/chkconfig --add %{name}
125 if [ -f /var/lock/subsys/%{name} ]; then
126         /etc/rc.d/init.d/%{name} restart 1>&2
127 else
128         echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
129 fi
130
131 %preun
132 if [ "$1" = "0" ]; then
133         if [ -f /var/lock/subsys/%{name} ]; then
134                 /etc/rc.d/init.d/%{name} stop 1>&2
135         fi
136         /sbin/chkconfig --del %{name}
137 fi
138
139 %postun
140 if [ "$1" = "0" ]; then
141         /usr/sbin/userdel lighttpd
142         /usr/sbin/groupdel lighttpd
143 fi
144
145 %files
146 %defattr(644,root,root,755)
147 %doc NEWS README 
148 %attr(755,root,root) %{_sbindir}/*
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(-, 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) /etc/logrotate.d/%{name}
158 %{_mandir}/man?/*
This page took 0.057385 seconds and 3 git commands to generate.