]>
Commit | Line | Data |
---|---|---|
cf6d1e52 JB |
1 | # |
2 | # Conditional build: | |
3106301f | 3 | %bcond_without ipv6 # IPv4-only version (doesn't require IPv6 in kernel) |
cf6d1e52 | 4 | # |
67f6119d | 5 | %define _rc rc21 |
09276aaa | 6 | %define _rel 3 |
c63479f8 | 7 | Summary: Boa high speed HTTP server |
312d7dbc | 8 | Summary(pl.UTF-8): Boa - szybki serwer HTTP |
c63479f8 | 9 | Name: boa |
73b3fb2f | 10 | Version: 0.94.14 |
67f6119d | 11 | Release: 0.%{_rc}.%{_rel} |
cf6d1e52 | 12 | Epoch: 1 |
05790c66 | 13 | License: GPL v2 |
c63479f8 | 14 | Group: Networking/Daemons |
73b3fb2f | 15 | Source0: http://www.boa.org/%{name}-%{version}%{_rc}.tar.gz |
26733935 | 16 | # Source0-md5: e24b570bd767a124fcfb40a34d148ba9 |
720f4760 | 17 | Source1: %{name}.init |
18 | Patch0: %{name}-PLD.patch | |
05790c66 | 19 | URL: http://www.boa.org/ |
26733935 | 20 | BuildRequires: autoconf >= 2.59 |
7632e172 | 21 | BuildRequires: automake |
f846bebe | 22 | BuildRequires: flex |
ec91eb38 | 23 | BuildRequires: rpmbuild(macros) >= 1.268 |
5677d123 | 24 | BuildRequires: sed >= 4.0 |
d3998599 | 25 | BuildRequires: texinfo |
ec91eb38 ER |
26 | Requires(post,preun): /sbin/chkconfig |
27 | Requires(postun): /usr/sbin/groupdel | |
28 | Requires(postun): /usr/sbin/userdel | |
50db7a81 | 29 | Requires(pre): /bin/id |
e77eb2e6 | 30 | Requires(pre): /usr/bin/getgid |
50db7a81 | 31 | Requires(pre): /usr/sbin/groupadd |
32 | Requires(pre): /usr/sbin/useradd | |
ec91eb38 | 33 | Requires: rc-scripts |
e77eb2e6 | 34 | Provides: group(http) |
e77eb2e6 | 35 | Provides: user(http) |
cf6d1e52 | 36 | Provides: webserver |
7632e172 | 37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
30a7acdf | 38 | |
52915e9e | 39 | %description |
b1bfc1c9 | 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 | |
52915e9e | 43 | resource use. |
44 | ||
312d7dbc JR |
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 | |
b1bfc1c9 | 50 | systemowych. |
52915e9e | 51 | |
52 | %prep | |
73b3fb2f | 53 | %setup -q -n %{name}-%{version}%{_rc} |
54 | cp examples/boa.conf . | |
55 | %patch0 -p0 | |
52915e9e | 56 | |
57 | %build | |
3d9590e3 | 58 | cp -f /usr/share/automake/config.sub . |
5677d123 | 59 | %{__sed} -i 's,}, olddir /var/log/archiv/boa\x0a},' contrib/rpm/boa.logrotate |
eea43ad9 | 60 | CFLAGS="%{rpmcflags} %{?with_ipv6:-DINET6} -DSERVER_ROOT='\"%{_sysconfdir}\"'" |
8bd22bb8 | 61 | %{__autoconf} |
c63479f8 | 62 | %configure |
a9816f68 | 63 | %{__make} |
73b3fb2f | 64 | %{__make} -C docs boa.html |
52915e9e | 65 | |
66 | %install | |
b1bfc1c9 | 67 | rm -rf $RPM_BUILD_ROOT |
ec91eb38 | 68 | install -d $RPM_BUILD_ROOT/etc/rc.d/init.d \ |
105bec80 | 69 | $RPM_BUILD_ROOT/var/log/{,archiv/}boa \ |
eea43ad9 | 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} | |
30a7acdf | 74 | |
ec91eb38 | 75 | install src/{boa,boa_indexer} $RPM_BUILD_ROOT%{_sbindir} |
05790c66 | 76 | |
26733935 | 77 | install examples/*.pl examples/*.cgi \ |
eea43ad9 | 78 | $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
26733935 | 79 | install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} |
30a7acdf | 80 | |
b6d37013 | 81 | install boa.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf |
d3998599 | 82 | install contrib/rpm/boa.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/%{name} |
52915e9e | 83 | |
ec91eb38 | 84 | install docs/boa.8 $RPM_BUILD_ROOT%{_mandir}/man8 |
ef7a4e87 | 85 | |
eea43ad9 | 86 | touch $RPM_BUILD_ROOT/var/log/boa/{access_log,agent_log,error_log,referer_log} |
52915e9e | 87 | |
52915e9e | 88 | %clean |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
f98eae27 | 91 | %pre |
cf546417 ER |
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 | |
f98eae27 | 94 | |
95 | %postun | |
96 | if [ "$1" = "0" ]; then | |
e77eb2e6 | 97 | %userremove http |
98 | %groupremove http | |
f98eae27 | 99 | fi |
100 | ||
661b5d38 | 101 | %post |
cf6d1e52 | 102 | /sbin/chkconfig --add boa |
ec91eb38 | 103 | %service boa restart "boa HTTP daemon" |
bb944f0b | 104 | |
661b5d38 | 105 | %preun |
bb944f0b | 106 | if [ "$1" = "0" ]; then |
ec91eb38 | 107 | %service boa stop |
50db7a81 | 108 | /sbin/chkconfig --del boa |
bb944f0b | 109 | fi |
661b5d38 | 110 | |
9fe0283e | 111 | %triggerpostun -- boa < 0.94.14-0.rc20.0 |
112 | if [ -f /etc/httpd/boa.conf.rpmsave ]; then | |
6405ed80 | 113 | echo "warning: installing /etc/boa.conf as /etc/boa.conf.rpmnew" |
9fe0283e | 114 | mv /etc/boa.conf /etc/boa.conf.rpmnew |
6405ed80 | 115 | echo "warning: moving /etc/httpd/boa.conf.rpmsave to /etc/boa.conf" |
9fe0283e | 116 | mv /etc/httpd/boa.conf.rpmsave /etc/boa.conf |
117 | fi | |
118 | ||
52915e9e | 119 | %files |
a200027d | 120 | %defattr(644,root,root,755) |
26733935 | 121 | %doc CHANGES README docs/*.html docs/*.png |
99d28f5e | 122 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/boa.conf |
dd6c213c | 123 | %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/%{name} |
eea43ad9 | 124 | %attr(750,root,root) %dir /var/log/%{name}/ |
105bec80 | 125 | %attr(750,root,root) %dir /var/log/archiv/%{name}/ |
eea43ad9 | 126 | %attr(640,root,root) %ghost /var/log/%{name}/* |
96dbfad0 JB |
127 | %attr(755,root,root) %{_sbindir}/* |
128 | %attr(754,root,root) /etc/rc.d/init.d/%{name} | |
ef7a4e87 | 129 | %{_mandir}/man8/* |
eea43ad9 | 130 | %{_examplesdir}/%{name}-%{version} |