]> git.pld-linux.org Git - packages/boa.git/blob - boa.spec
*** empty log message ***
[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.12
9 Release:        3
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):  /bin/id
23 Requires(pre):  /usr/sbin/groupadd
24 Requires(pre):  /usr/sbin/useradd
25 Requires(postun):       /usr/sbin/groupdel
26 Requires(postun):       /usr/sbin/userdel
27 Requires(post,preun):   /sbin/chkconfig
28 Provides:       httpd
29 Provides:       webserver
30 Obsoletes:      apache
31 Obsoletes:      httpd
32 Obsoletes:      thttpd
33 Obsoletes:      webserver
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %define         _sysconfdir     /etc/httpd
37
38 %description
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
42 resource use.
43
44 %description -l pl
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
49 systemowych.
50
51 %prep
52 %setup -q
53 %patch0 -p1
54 %patch1 -p0
55
56 %build
57 cd src
58 CFLAGS="%{rpmcflags} %{!?_without_ipv6:-DINET6}"
59 %{__autoconf}
60 %configure
61 %{__make}
62 cd ../docs
63 %{__make} boa.html
64
65 %install
66 rm -rf $RPM_BUILD_ROOT
67 install -d $RPM_BUILD_ROOT/etc/rc.d/init.d/ \
68         $RPM_BUILD_ROOT/var/log/httpd \
69         $RPM_BUILD_ROOT/home/httpd/{cgi-bin,html} \
70         $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/conf,%{_mandir}/man8} \
71         $RPM_BUILD_ROOT/etc/logrotate.d
72
73
74 install src/{boa,boa_indexer} $RPM_BUILD_ROOT%{_sbindir}/
75
76 install src/*.pl $RPM_BUILD_ROOT/home/httpd/cgi-bin/
77 install examples/* $RPM_BUILD_ROOT/home/httpd/cgi-bin/
78 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
79
80 install boa.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
81 install contrib/redhat/boa.logrotate $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
82
83 install docs/boa.8 $RPM_BUILD_ROOT%{_mandir}/man8/
84
85 touch $RPM_BUILD_ROOT/var/log/httpd/{access_log,agent_log,error_log,referer_log}
86
87 gzip -9nf README ChangeLog
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %pre
93 if [ -n "`id -u http 2>/dev/null`" ]; then
94         if [ "`id -u http`" != "51" ]; then
95                 echo "Error: user http doesn't have uid=51. Correct this before installing boa." 1>&2
96                 exit 1
97         fi
98 else
99         echo "Creating user http UID=51"
100         /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" http 1>&2
101 fi
102
103 %postun
104 if [ "$1" = "0" ]; then
105         echo "Removing user http UID=51"
106         /usr/sbin/userdel http > /dev/null 2>&1
107 fi
108
109 %post
110 /sbin/chkconfig --add boa
111 if [ -f /var/lock/subsys/boa ]; then
112         /etc/rc.d/init.d/boa restart 1>&2
113 else
114         echo "Run \"/etc/rc.d/init.d/boa start\" to start boa http daemon."
115 fi
116
117 %preun
118 if [ "$1" = "0" ]; then
119         if [ -f /var/lock/subsys/boa ]; then
120                 /etc/rc.d/init.d/boa stop 1>&2
121         fi
122         /sbin/chkconfig --del boa
123 fi
124
125 %files
126 %defattr(644,root,root,755)
127 %doc *.gz docs/*.html docs/*.png
128 %attr(750, root,root) %dir %{_sysconfdir}
129 %attr(640, root,root) %config(noreplace) %{_sysconfdir}/*
130 %attr(640, root,root) %config(noreplace) /etc/logrotate.d/%{name}
131 %attr(755, root,root) /home/httpd/html
132 %attr(755, root,root) /home/httpd/cgi-bin
133 %attr(750, root,root) %dir /var/log/httpd/
134 %attr(640, root,root) %ghost /var/log/httpd/*
135 %attr(755, root,root) %{_sbindir}/*
136 %attr(754, root,root) /etc/rc.d/init.d/%{name}
137 %{_mandir}/man8/*
This page took 0.058286 seconds and 3 git commands to generate.