]>
Commit | Line | Data |
---|---|---|
bee4f74e AM |
1 | # TODO: |
2 | # - fix SSL build | |
3 | Summary: Fast as 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: GPL | |
10 | Source0: http://jan.kneschke.de/projects/lighttpd/download/%{name}-%{version}.tar.gz | |
11 | # Source0-md5: 2b5d247d2f62ac5255fa711a0c85bf06 | |
12 | Source1: %{name}.init | |
13 | URL: http://jan.kneschke.de/projects/lighttpd/ | |
14 | Provides: httpd | |
15 | Provides: webserver | |
16 | PreReq: rc-scripts | |
17 | Requires(pre): sh-utils | |
18 | Requires(pre): /bin/id | |
19 | Requires(pre): /usr/bin/getgid | |
20 | Requires(pre): /usr/sbin/groupadd | |
21 | Requires(pre): /usr/sbin/useradd | |
22 | Requires(post,preun): /sbin/chkconfig | |
23 | Requires(postun): /usr/sbin/userdel | |
24 | Requires(postun): /usr/sbin/groupdel | |
25 | BuildRequires: mysql-devel | |
26 | BuildRequires: zlib-devel | |
27 | BuildRequires: bzip2-devel | |
28 | BuildRequires: openssl-devel | |
29 | BuildRequires: pcre-devel | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %define _libdir %{_prefix}/%{_lib}/%{name} | |
33 | %define _sysconfdir /etc/%{name} | |
34 | ||
35 | %description | |
36 | ighttpd a secure, fast, compliant and very flexible web-server which | |
37 | has been optimized for high-performance environments. It has a very | |
38 | low memory footprint compared to other webservers and takes care of | |
39 | cpu-load. Its advanced feature-set (FastCGI, CGI, Auth, | |
40 | Output-Compression, URL-Rewriting and many more) make lighttpd the | |
41 | perfect webserver-software for every server that is suffering load | |
42 | problems. | |
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 | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | install -d $RPM_BUILD_ROOT{/home/httpd/cgi-bin,/etc/{rc.d/init.d,%{name}}} | |
60 | ||
61 | %{__make} install \ | |
62 | DESTDIR=$RPM_BUILD_ROOT | |
63 | ||
64 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} | |
65 | install doc/lighttpd.{conf,user} $RPM_BUILD_ROOT%{_sysconfdir} | |
66 | ||
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %pre | |
71 | if [ -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 | |
76 | else | |
77 | /usr/sbin/groupadd -g 51 -r -f http | |
78 | fi | |
79 | if [ -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 | |
84 | else | |
85 | /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2 | |
86 | fi | |
87 | ||
88 | %post | |
89 | /sbin/chkconfig --add %{name} | |
90 | if [ -f /var/lock/subsys/%{name} ]; then | |
91 | /etc/rc.d/init.d/%{name} restart 1>&2 | |
92 | else | |
93 | echo "Run \"/etc/rc.d/init.d/%{name} start\" to start %{name} daemon." | |
94 | fi | |
95 | ||
96 | %preun | |
97 | if [ "$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} | |
102 | fi | |
103 | ||
104 | %postun | |
105 | if [ "$1" = "0" ]; then | |
106 | /usr/sbin/userdel http | |
107 | /usr/sbin/groupdel http | |
108 | fi | |
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?/* |