]> git.pld-linux.org Git - packages/lighttpd.git/blame - lighttpd.spec
- new, nice http server (php support, separate uid/gid)
[packages/lighttpd.git] / lighttpd.spec
CommitLineData
bee4f74e
AM
1# TODO:
2# - fix SSL build
3Summary: Fast as light http server
4Summary(pl): Szybki i lekki serwer http
5Name: lighttpd
6Version: 1.1.2a
7Release: 0.1
8Group: Networking/Daemons
9License: GPL
10Source0: http://jan.kneschke.de/projects/lighttpd/download/%{name}-%{version}.tar.gz
11# Source0-md5: 2b5d247d2f62ac5255fa711a0c85bf06
12Source1: %{name}.init
13URL: http://jan.kneschke.de/projects/lighttpd/
14Provides: httpd
15Provides: webserver
16PreReq: rc-scripts
17Requires(pre): sh-utils
18Requires(pre): /bin/id
19Requires(pre): /usr/bin/getgid
20Requires(pre): /usr/sbin/groupadd
21Requires(pre): /usr/sbin/useradd
22Requires(post,preun): /sbin/chkconfig
23Requires(postun): /usr/sbin/userdel
24Requires(postun): /usr/sbin/groupdel
25BuildRequires: mysql-devel
26BuildRequires: zlib-devel
27BuildRequires: bzip2-devel
28BuildRequires: openssl-devel
29BuildRequires: pcre-devel
30BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32%define _libdir %{_prefix}/%{_lib}/%{name}
33%define _sysconfdir /etc/%{name}
34
35%description
36ighttpd a secure, fast, compliant and very flexible web-server which
37has been optimized for high-performance environments. It has a very
38low memory footprint compared to other webservers and takes care of
39cpu-load. Its advanced feature-set (FastCGI, CGI, Auth,
40Output-Compression, URL-Rewriting and many more) make lighttpd the
41perfect webserver-software for every server that is suffering load
42problems.
43
44%prep
45%setup -q
46
47%build
48%configure \
49 --enable-mod-chat \
50 --enable-mod-cache \
51 --enable-mod-localizer \
52 --with-mysql \
53 --without-ssl
54
55%{__make}
56
57%install
58rm -rf $RPM_BUILD_ROOT
59install -d $RPM_BUILD_ROOT{/home/httpd/cgi-bin,/etc/{rc.d/init.d,%{name}}}
60
61%{__make} install \
62 DESTDIR=$RPM_BUILD_ROOT
63
64install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
65install doc/lighttpd.{conf,user} $RPM_BUILD_ROOT%{_sysconfdir}
66
67%clean
68rm -rf $RPM_BUILD_ROOT
69
70%pre
71if [ -n "`getgid http`" ]; then
72 if [ "`getgid http`" != "51" ]; then
73 echo "Error: group http doesn't have gid=51. Correct this before installing %{name}." 1>&2
74 exit 1
75 fi
76else
77 /usr/sbin/groupadd -g 51 -r -f http
78fi
79if [ -n "`id -u http 2>/dev/null`" ]; then
80 if [ "`id -u http`" != "51" ]; then
81 echo "Error: user http doesn't have uid=51. Correct this before installing %{name}." 1>&2
82 exit 1
83 fi
84else
85 /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
86fi
87
88%post
89/sbin/chkconfig --add %{name}
90if [ -f /var/lock/subsys/%{name} ]; then
91 /etc/rc.d/init.d/%{name} restart 1>&2
92else
93 echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon."
94fi
95
96%preun
97if [ "$1" = "0" ]; then
98 if [ -f /var/lock/subsys/%{name} ]; then
99 /etc/rc.d/init.d/%{name} stop 1>&2
100 fi
101 /sbin/chkconfig --del %{name}
102fi
103
104%postun
105if [ "$1" = "0" ]; then
106 /usr/sbin/userdel http
107 /usr/sbin/groupdel http
108fi
109
110%files
111%defattr(644,root,root,755)
112%doc NEWS README doc/*.txt
113%attr(755,root,root) %{_sbindir}/*
114%dir %{_libdir}
115%attr(644,root,root) %{_libdir}/*.a
116%attr(-, http, http) /home/httpd
117%attr(754,root,root) /etc/rc.d/init.d/lighttpd
118%dir %attr(754,root,root) /etc/%{name}
119%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/*.*
120%{_mandir}/man?/*
This page took 0.037754 seconds and 4 git commands to generate.