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