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