]> git.pld-linux.org Git - packages/boa.git/blob - boa.spec
- massive attack: source-md5
[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 # Source0-md5:  c8d6f46f9aa60909f171529068813fe0
15 Source1:        %{name}.init
16 Patch0:         %{name}-PLD.patch
17 Patch1:         %{name}-logrotate.patch
18 URL:            http://www.boa.org/
19 BuildRequires:  autoconf
20 BuildRequires:  flex
21 BuildRequires:  sgml-tools
22 PreReq:         rc-scripts
23 Requires(pre): /usr/bin/getgid
24 Requires(pre): /bin/id
25 Requires(pre): /usr/sbin/groupadd
26 Requires(pre): /usr/sbin/useradd
27 Requires(postun):      /usr/sbin/groupdel
28 Requires(postun):      /usr/sbin/userdel
29 Requires(post,preun):   /sbin/chkconfig
30 Provides:       httpd
31 Provides:       webserver
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 Obsoletes:      apache
34 Obsoletes:      httpd
35 Obsoletes:      thttpd
36 Obsoletes:      webserver
37
38 %define         _sysconfdir     /etc/httpd
39
40 %description
41 A high speed, lightweight web server (HTTP protocol). Based on direct
42 use of the select(2) system call, it internally multiplexes all
43 connections without forking, for maximum speed and minimum system
44 resource use.
45
46 %description -l pl
47 Niezwykle szybki i wysoko wydajny serwer WWW (protokó³ HTTP). Bazuje
48 na bezpo¶rednim u¿yciu funkcji systemowej select(2) dziêki czemu mo¿e
49 obs³ugiwaæ wiele po³±czeñ równocze¶nie bez fork()owania co w efekcie
50 znacznie zwiêksza szybko¶æ dzia³ania oraz zmniejsza zu¿ycie zasobów
51 systemowych.
52
53 %prep
54 %setup -q
55 %patch0 -p1
56 %patch1 -p0
57
58 %build
59 cd src
60 CFLAGS="%{rpmcflags} %{!?_without_ipv6:-DINET6}"
61 %{__autoconf}
62 %configure
63 %{__make}
64 cd ../docs
65 %{__make} boa.html
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d/ \
70         $RPM_BUILD_ROOT/var/log/httpd \
71         $RPM_BUILD_ROOT/home/services/httpd/{cgi-bin,html} \
72         $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/conf,%{_mandir}/man8} \
73         $RPM_BUILD_ROOT/etc/logrotate.d
74
75 install src/{boa,boa_indexer} $RPM_BUILD_ROOT%{_sbindir}/
76
77 install src/*.pl $RPM_BUILD_ROOT/home/services/httpd/cgi-bin/
78 install examples/* $RPM_BUILD_ROOT/home/services/httpd/cgi-bin/
79 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
80
81 install boa.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
82 install contrib/redhat/boa.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
83
84 install docs/boa.8 $RPM_BUILD_ROOT%{_mandir}/man8/
85
86 touch $RPM_BUILD_ROOT/var/log/httpd/{access_log,agent_log,error_log,referer_log}
87
88 %clean
89 rm -rf $RPM_BUILD_ROOT
90
91 %pre
92 if [ -n "`getgid http`" ]; then
93         if [ "`getgid http`" != "51" ]; then
94                echo "Error: group http doesn't have gid=51. Correct this before installing boa." 1>&2
95             exit 1
96         fi
97 else
98         echo "Creating group http GID=51"
99         /usr/sbin/groupadd -g 51 -r -f http
100 fi
101 if [ -n "`id -u http 2>/dev/null`" ]; then
102         if [ "`id -u http`" != "51" ]; then
103                 echo "Error: user http doesn't have uid=51. Correct this before installing boa." 1>&2
104                 exit 1
105         fi
106 else
107         echo "Creating user http UID=51"
108         /usr/sbin/useradd -u 51 -r -d /home/services/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
109 fi
110
111 %postun
112 if [ "$1" = "0" ]; then
113         echo "Removing user http UID=51"
114         /usr/sbin/userdel http > /dev/null 2>&1
115         echo "Removing group http GID=51"
116         /usr/sbin/groupdel http > /dev/null 2>&1
117 fi
118
119 %post
120 /sbin/chkconfig --add boa
121 if [ -f /var/lock/subsys/boa ]; then
122         /etc/rc.d/init.d/boa restart 1>&2
123 else
124         echo "Run \"/etc/rc.d/init.d/boa start\" to start boa http daemon."
125 fi
126
127 %preun
128 if [ "$1" = "0" ]; then
129         if [ -f /var/lock/subsys/boa ]; then
130                 /etc/rc.d/init.d/boa stop 1>&2
131         fi
132         /sbin/chkconfig --del boa
133 fi
134
135 %files
136 %defattr(644,root,root,755)
137 %doc README ChangeLog docs/*.html docs/*.png
138 %attr(750,root,root) %dir %{_sysconfdir}
139 %attr(640,root,root) %config(noreplace) %{_sysconfdir}/*
140 %attr(640,root,root) %config(noreplace) /etc/logrotate.d/%{name}
141 %dir /home/services/httpd
142 %attr(755,root,root) /home/services/httpd/html
143 %attr(755,root,root) /home/services/httpd/cgi-bin
144 %attr(750,root,root) %dir /var/log/httpd/
145 %attr(640,root,root) %ghost /var/log/httpd/*
146 %attr(755,root,root) %{_sbindir}/*
147 %attr(754,root,root) /etc/rc.d/init.d/%{name}
148 %{_mandir}/man8/*
This page took 0.622552 seconds and 4 git commands to generate.