3 # _without_ipv6 - IPv4-only version (doesn't require IPv6 in kernel)
5 Summary: Boa high speed HTTP server
6 Summary(pl): Boa - szybki serwer HTTP
12 Group: Networking/Daemons
13 Source0: http://www.boa.org/%{name}-%{version}.tar.gz
15 Patch0: %{name}-PLD.patch
16 Patch1: %{name}-logrotate.patch
17 URL: http://www.boa.org/
18 BuildRequires: autoconf
20 BuildRequires: sgml-tools
22 Requires(pre): /bin/id
23 Requires(pre): /usr/bin/getgid
24 Requires(pre): /usr/sbin/groupadd
25 Requires(pre): /usr/sbin/useradd
26 Requires(postun): /usr/sbin/groupdel
27 Requires(postun): /usr/sbin/userdel
28 Requires(post,preun): /sbin/chkconfig
35 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
37 %define _sysconfdir /etc/httpd
40 A high speed, lightweight web server (HTTP protocol). Based on direct
41 use of the select(2) system call, it internally multiplexes all
42 connections without forking, for maximum speed and minimum system
46 Niezwykle szybki i wysoko wydajny serwer WWW (protokó³ HTTP). Bazuje
47 na bezpo¶rednim u¿yciu funkcji systemowej select(2) dziêki czemu mo¿e
48 obs³ugiwaæ wiele po³±czeñ równocze¶nie bez fork()owania co w efekcie
49 znacznie zwiêksza szybko¶æ dzia³ania oraz zmniejsza zu¿ycie zasobów
59 CFLAGS="%{rpmcflags} %{!?_without_ipv6:-DINET6}"
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d/ \
69 $RPM_BUILD_ROOT/var/log/httpd \
70 $RPM_BUILD_ROOT/home/httpd/{cgi-bin,html} \
71 $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/conf,%{_mandir}/man8} \
72 $RPM_BUILD_ROOT/etc/logrotate.d
75 install src/{boa,boa_indexer} $RPM_BUILD_ROOT%{_sbindir}/
77 install src/*.pl $RPM_BUILD_ROOT/home/httpd/cgi-bin/
78 install examples/* $RPM_BUILD_ROOT/home/httpd/cgi-bin/
79 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
81 install boa.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
82 install contrib/redhat/boa.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
84 install docs/boa.8 $RPM_BUILD_ROOT%{_mandir}/man8/
86 touch $RPM_BUILD_ROOT/var/log/httpd/{access_log,agent_log,error_log,referer_log}
88 gzip -9nf README ChangeLog
91 rm -rf $RPM_BUILD_ROOT
94 if [ -n "`getgid http`" ]; then
95 if [ "`getgid http`" != "51" ]; then
96 echo "Error: group http doesn't have gid=51. Correct this before installing boa." 1>&2
100 echo "Creating group http GID=51"
101 /usr/sbin/groupadd -g 51 -r -f http
103 if [ -n "`id -u http 2>/dev/null`" ]; then
104 if [ "`id -u http`" != "51" ]; then
105 echo "Error: user http doesn't have uid=51. Correct this before installing boa." 1>&2
109 echo "Creating user http UID=51"
110 /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
114 if [ "$1" = "0" ]; then
115 echo "Removing user http UID=51"
116 /usr/sbin/userdel http > /dev/null 2>&1
117 echo "Removing group http GID=51"
118 /usr/sbin/groupdel http > /dev/null 2>&1
122 /sbin/chkconfig --add boa
123 if [ -f /var/lock/subsys/boa ]; then
124 /etc/rc.d/init.d/boa restart 1>&2
126 echo "Run \"/etc/rc.d/init.d/boa start\" to start boa http daemon."
130 if [ "$1" = "0" ]; then
131 if [ -f /var/lock/subsys/boa ]; then
132 /etc/rc.d/init.d/boa stop 1>&2
134 /sbin/chkconfig --del boa
138 %defattr(644,root,root,755)
139 %doc *.gz docs/*.html docs/*.png
140 %attr(750, root,http) %dir %{_sysconfdir}
141 %attr(640, root,http) %config(noreplace) %{_sysconfdir}/*
142 %attr(640, root,http) %config(noreplace) /etc/logrotate.d/%{name}
143 %attr(755, root,http) /home/httpd/html
144 %attr(755, root,http) /home/httpd/cgi-bin
145 %attr(750, root,http) %dir /var/log/httpd/
146 %attr(640, root,http) %ghost /var/log/httpd/*
147 %attr(755, root,root) %{_sbindir}/*
148 %attr(754, root,root) /etc/rc.d/init.d/%{name}