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