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