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