3 %bcond_without ipv6 # IPv4-only version (doesn't require IPv6 in kernel)
7 Summary: Boa high speed HTTP server
8 Summary(pl.UTF-8): Boa - szybki serwer HTTP
11 Release: 0.%{_rc}.%{_rel}
14 Group: Networking/Daemons/HTTP
15 Source0: http://www.boa.org/%{name}-%{version}%{_rc}.tar.gz
16 # Source0-md5: e24b570bd767a124fcfb40a34d148ba9
18 Patch0: %{name}-PLD.patch
19 URL: http://www.boa.org/
20 BuildRequires: autoconf >= 2.59
21 BuildRequires: automake
23 BuildRequires: rpmbuild(macros) >= 1.268
24 BuildRequires: sed >= 4.0
25 BuildRequires: texinfo
26 Requires(post,preun): /sbin/chkconfig
27 Requires(postun): /usr/sbin/groupdel
28 Requires(postun): /usr/sbin/userdel
29 Requires(pre): /bin/id
30 Requires(pre): /usr/bin/getgid
31 Requires(pre): /usr/sbin/groupadd
32 Requires(pre): /usr/sbin/useradd
37 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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
45 %description -l pl.UTF-8
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
53 %setup -q -n %{name}-%{version}%{_rc}
54 cp examples/boa.conf .
58 cp -f /usr/share/automake/config.sub .
59 %{__sed} -i 's,}, olddir /var/log/archive/boa\x0a},' contrib/rpm/boa.logrotate
60 CFLAGS="%{rpmcflags} %{?with_ipv6:-DINET6} -DSERVER_ROOT='\"%{_sysconfdir}\"'"
64 %{__make} -C docs boa.html
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d \
69 $RPM_BUILD_ROOT/var/log/{,archive/}boa \
70 $RPM_BUILD_ROOT%{_sbindir} \
71 $RPM_BUILD_ROOT%{_mandir}/man8 \
72 $RPM_BUILD_ROOT/etc/logrotate.d \
73 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
75 install src/{boa,boa_indexer} $RPM_BUILD_ROOT%{_sbindir}
77 install examples/*.pl examples/*.cgi \
78 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
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/rpm/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/boa/{access_log,agent_log,error_log,referer_log}
89 rm -rf $RPM_BUILD_ROOT
92 %groupadd -g 51 -r -f http
93 %useradd -u 51 -r -d /usr/share/empty -s /bin/false -c "HTTP User" -g http http
96 if [ "$1" = "0" ]; then
102 /sbin/chkconfig --add boa
103 %service boa restart "boa HTTP daemon"
106 if [ "$1" = "0" ]; then
108 /sbin/chkconfig --del boa
111 %triggerpostun -- boa < 0.94.14-0.rc20.0
112 if [ -f /etc/httpd/boa.conf.rpmsave ]; then
113 echo "warning: installing /etc/boa.conf as /etc/boa.conf.rpmnew"
114 mv /etc/boa.conf /etc/boa.conf.rpmnew
115 echo "warning: moving /etc/httpd/boa.conf.rpmsave to /etc/boa.conf"
116 mv /etc/httpd/boa.conf.rpmsave /etc/boa.conf
120 %defattr(644,root,root,755)
121 %doc CHANGES README docs/*.html docs/*.png
122 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/boa.conf
123 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name}
124 %attr(750,root,root) %dir /var/log/%{name}/
125 %attr(750,root,root) %dir /var/log/archive/%{name}/
126 %attr(640,root,root) %ghost /var/log/%{name}/*
127 %attr(755,root,root) %{_sbindir}/*
128 %attr(754,root,root) /etc/rc.d/init.d/%{name}
130 %{_examplesdir}/%{name}-%{version}