]> git.pld-linux.org Git - packages/lighttpd.git/blob - lighttpd.spec
- add directory for logs
[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.2a
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:  2b5d247d2f62ac5255fa711a0c85bf06
12 Source1:        %{name}.init
13 Source2:        %{name}.conf
14 Source3:        %{name}.user
15 Patch0:         %{name}-configure.patch
16 URL:            http://jan.kneschke.de/projects/lighttpd/
17 Provides:       httpd
18 Provides:       webserver
19 PreReq:         rc-scripts
20 Requires(pre):  sh-utils
21 Requires(pre):  /bin/id
22 Requires(pre):  /usr/bin/getgid
23 Requires(pre):  /usr/sbin/groupadd
24 Requires(pre):  /usr/sbin/useradd
25 Requires(post,preun):   /sbin/chkconfig
26 Requires(postun):       /usr/sbin/userdel
27 Requires(postun):       /usr/sbin/groupdel
28 BuildRequires:  automake
29 BuildRequires:  autoconf
30 BuildRequires:  libtool
31 BuildRequires:  mysql-devel
32 BuildRequires:  zlib-devel
33 BuildRequires:  bzip2-devel
34 BuildRequires:  openssl-devel
35 BuildRequires:  pcre-devel
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 web, 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 web oraz dba o zajêto¶æ procesora.
55 Szeroki zestaw opcji (FastCGI, CGI, Auth, Output-Compression,
56 URL-Rewriting i wiele innych) czyni± z lighttpd doskona³e
57 oprogramowanie web-serwerowe na ka¿dy serwer cierpi±cy z powodu
58 problemów z obci±¿eniem.
59
60 %prep
61 %setup -q
62 %patch0 -p0
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.060223 seconds and 3 git commands to generate.