3 %bcond_without ipv6 # IPv4-only version (doesn't require IPv6 in kernel)
6 Summary: Boa high speed HTTP server
7 Summary(pl): Boa - szybki serwer HTTP
13 Group: Networking/Daemons
14 Source0: http://www.boa.org/%{name}-%{version}%{_rc}.tar.gz
15 # Source0-md5: e24b570bd767a124fcfb40a34d148ba9
17 Patch0: %{name}-PLD.patch
18 URL: http://www.boa.org/
19 BuildRequires: autoconf >= 2.59
20 BuildRequires: automake
22 BuildRequires: rpmbuild(macros) >= 1.268
23 BuildRequires: sed >= 4.0
24 BuildRequires: texinfo
25 Requires(post,preun): /sbin/chkconfig
26 Requires(postun): /usr/sbin/groupdel
27 Requires(postun): /usr/sbin/userdel
28 Requires(pre): /bin/id
29 Requires(pre): /usr/bin/getgid
30 Requires(pre): /usr/sbin/groupadd
31 Requires(pre): /usr/sbin/useradd
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39 A high speed, lightweight web server (HTTP protocol). Based on direct
40 use of the select(2) system call, it internally multiplexes all
41 connections without forking, for maximum speed and minimum system
45 Niezwykle szybki i wysoko wydajny serwer WWW (protokó³ HTTP). Bazuje
46 na bezpo¶rednim u¿yciu funkcji systemowej select(2) dziêki czemu mo¿e
47 obs³ugiwaæ wiele po³±czeñ równocze¶nie bez fork()owania co w efekcie
48 znacznie zwiêksza szybko¶æ dzia³ania oraz zmniejsza zu¿ycie zasobów
52 %setup -q -n %{name}-%{version}%{_rc}
53 cp examples/boa.conf .
57 cp -f /usr/share/automake/config.sub .
58 %{__sed} -i 's,}, olddir /var/log/archiv/boa\x0a},' contrib/rpm/boa.logrotate
59 CFLAGS="%{rpmcflags} %{?with_ipv6:-DINET6} -DSERVER_ROOT='\"%{_sysconfdir}\"'"
63 %{__make} -C docs boa.html
66 rm -rf $RPM_BUILD_ROOT
67 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d \
68 $RPM_BUILD_ROOT/var/log/{,archiv/}boa \
69 $RPM_BUILD_ROOT%{_sbindir} \
70 $RPM_BUILD_ROOT%{_mandir}/man8 \
71 $RPM_BUILD_ROOT/etc/logrotate.d \
72 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
74 install src/{boa,boa_indexer} $RPM_BUILD_ROOT%{_sbindir}
76 install examples/*.pl examples/*.cgi \
77 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
78 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
80 install boa.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
81 install contrib/rpm/boa.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
83 install docs/boa.8 $RPM_BUILD_ROOT%{_mandir}/man8
85 touch $RPM_BUILD_ROOT/var/log/boa/{access_log,agent_log,error_log,referer_log}
88 rm -rf $RPM_BUILD_ROOT
91 %groupadd -g 51 -r -f http
92 %useradd -u 51 -r -d /usr/share/empty -s /bin/false -c "HTTP User" -g http http
95 if [ "$1" = "0" ]; then
101 /sbin/chkconfig --add boa
102 %service boa restart "boa HTTP daemon"
105 if [ "$1" = "0" ]; then
107 /sbin/chkconfig --del boa
110 %triggerpostun -- boa < 0.94.14-0.rc20.0
111 if [ -f /etc/httpd/boa.conf.rpmsave ]; then
112 echo "warning: installing /etc/boa.conf as /etc/boa.conf.rpmnew"
113 mv /etc/boa.conf /etc/boa.conf.rpmnew
114 echo "warning: moving /etc/httpd/boa.conf.rpmsave to /etc/boa.conf"
115 mv /etc/httpd/boa.conf.rpmsave /etc/boa.conf
119 %defattr(644,root,root,755)
120 %doc CHANGES README docs/*.html docs/*.png
121 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/boa.conf
122 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
123 %attr(750,root,root) %dir /var/log/%{name}/
124 %attr(750,root,root) %dir /var/log/archiv/%{name}/
125 %attr(640,root,root) %ghost /var/log/%{name}/*
126 %attr(755,root,root) %{_sbindir}/*
127 %attr(754,root,root) /etc/rc.d/init.d/%{name}
129 %{_examplesdir}/%{name}-%{version}