]> git.pld-linux.org Git - packages/boa.git/blob - boa.spec
- Req user-http
[packages/boa.git] / boa.spec
1 #
2 # Conditional build:
3 # _without_ipv6 - IPv4-only version (doesn't require IPv6 in kernel)
4 #
5 Summary:        Boa high speed HTTP server
6 Summary(pl):    Boa - szybki serwer HTTP
7 Name:           boa
8 Version:        0.94.13
9 Release:        1
10 Epoch:          1
11 License:        GPL v2
12 Group:          Networking/Daemons
13 Source0:        http://www.boa.org/%{name}-%{version}.tar.gz
14 Source1:        %{name}.init
15 Patch0:         %{name}-PLD.patch
16 Patch1:         %{name}-logrotate.patch
17 URL:            http://www.boa.org/
18 BuildRequires:  autoconf
19 BuildRequires:  flex
20 BuildRequires:  sgml-tools
21 PreReq:         rc-scripts
22 Requires(pre):  user-http
23 Requires(post,preun):   /sbin/chkconfig
24 Provides:       httpd
25 Provides:       webserver
26 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
27 Obsoletes:      apache
28 Obsoletes:      httpd
29 Obsoletes:      thttpd
30 Obsoletes:      webserver
31
32 %define         _sysconfdir     /etc/httpd
33
34 %description
35 A high speed, lightweight web server (HTTP protocol). Based on direct
36 use of the select(2) system call, it internally multiplexes all
37 connections without forking, for maximum speed and minimum system
38 resource use.
39
40 %description -l pl
41 Niezwykle szybki i wysoko wydajny serwer WWW (protokó³ HTTP). Bazuje
42 na bezpo¶rednim u¿yciu funkcji systemowej select(2) dziêki czemu mo¿e
43 obs³ugiwaæ wiele po³±czeñ równocze¶nie bez fork()owania co w efekcie
44 znacznie zwiêksza szybko¶æ dzia³ania oraz zmniejsza zu¿ycie zasobów
45 systemowych.
46
47 %prep
48 %setup -q
49 %patch0 -p1
50 %patch1 -p0
51
52 %build
53 cd src
54 CFLAGS="%{rpmcflags} %{!?_without_ipv6:-DINET6}"
55 %{__autoconf}
56 %configure
57 %{__make}
58 cd ../docs
59 %{__make} boa.html
60
61 %install
62 rm -rf $RPM_BUILD_ROOT
63 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d/ \
64         $RPM_BUILD_ROOT/var/log/httpd \
65         $RPM_BUILD_ROOT/home/services/httpd/{cgi-bin,html} \
66         $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/conf,%{_mandir}/man8} \
67         $RPM_BUILD_ROOT/etc/logrotate.d
68
69 install src/{boa,boa_indexer} $RPM_BUILD_ROOT%{_sbindir}/
70
71 install src/*.pl $RPM_BUILD_ROOT/home/services/httpd/cgi-bin/
72 install examples/* $RPM_BUILD_ROOT/home/services/httpd/cgi-bin/
73 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
74
75 install boa.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
76 install contrib/redhat/boa.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
77
78 install docs/boa.8 $RPM_BUILD_ROOT%{_mandir}/man8/
79
80 touch $RPM_BUILD_ROOT/var/log/httpd/{access_log,agent_log,error_log,referer_log}
81
82 %clean
83 rm -rf $RPM_BUILD_ROOT
84
85 %post
86 /sbin/chkconfig --add boa
87 if [ -f /var/lock/subsys/boa ]; then
88         /etc/rc.d/init.d/boa restart 1>&2
89 else
90         echo "Run \"/etc/rc.d/init.d/boa start\" to start boa http daemon."
91 fi
92
93 %preun
94 if [ "$1" = "0" ]; then
95         if [ -f /var/lock/subsys/boa ]; then
96                 /etc/rc.d/init.d/boa stop 1>&2
97         fi
98         /sbin/chkconfig --del boa
99 fi
100
101 %files
102 %defattr(644,root,root,755)
103 %doc README ChangeLog docs/*.html docs/*.png
104 %attr(750,root,root) %dir %{_sysconfdir}
105 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/*
106 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/%{name}
107 %dir /home/services/httpd
108 %attr(755,root,root) /home/services/httpd/html
109 %attr(755,root,root) /home/services/httpd/cgi-bin
110 %attr(750,root,root) %dir /var/log/httpd/
111 %attr(640,root,root) %ghost /var/log/httpd/*
112 %attr(755,root,root) %{_sbindir}/*
113 %attr(754,root,root) /etc/rc.d/init.d/%{name}
114 %{_mandir}/man8/*
This page took 1.186124 seconds and 4 git commands to generate.