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