]> git.pld-linux.org Git - packages/boa.git/blob - boa.spec
896d09324bb53f6af312760598d926c7c3cf28d1
[packages/boa.git] / boa.spec
1 Summary:        Boa high speed HTTP server
2 Summary(pl):    Boa - szybki serwer HTTP
3 Name:           boa
4 Version:        0.94.8.3
5 Release:        2
6 License:        GPL
7 Group:          Networking/Daemons
8 Group(de):      Netzwerkwesen/Server
9 Group(pl):      Sieciowe/Serwery
10 Source0:        http://www.boa.org/%{name}-%{version}.tar.gz
11 Source1:        %{name}.init
12 Patch0:         %{name}-PLD.patch
13 Provides:       httpd                                                           
14 Provides:       webserver                                                       
15 Prereq:         sh-utils
16 Prereq:         %{_sbindir}/groupadd
17 Prereq:         %{_sbindir}/groupdel
18 Prereq:         %{_sbindir}/useradd
19 Prereq:         %{_sbindir}/userdel
20 BuildRequires:  flex
21 BuildRequires:  sgml-tools
22 Prereq:         rc-scripts
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24 Obsoletes:      apache
25
26 %define         _sysconfdir     /etc/httpd
27
28 %description
29 A high speed, lightweight web server (HTTP protocol). Based on direct
30 use of the select(2) system call, it internally multiplexes all
31 connections without forking, for maximum speed and minimum system
32 resource use.
33
34 %description -l pl
35 Niezwykle szybki i wysoko wydajny serwer WWW (protokó³ HTTP). Bazuje
36 na bezpo¶rednim u¿yciu funkcji systemowej select(2) dziêki czemu mo¿e
37 obs³ugiwaæ wiele po³±czeñ równocze¶nie bez fork()owania co w efekcie
38 znacznie zwiêksza szybko¶æ dzia³ania oraz zmniejsza zu¿ycie zasobów
39 systemowych.
40
41 %prep
42 %setup -q
43 %patch0 -p1
44
45 %build
46 cd src
47 CFLAGS="%{?debug:-O0 -g}%{!?debug:$RPM_OPT_FLAGS} -DINET6"
48 %configure
49 %{__make}
50 (cd ../docs; make boa.html )
51
52 %install
53 rm -rf $RPM_BUILD_ROOT
54 install -d $RPM_BUILD_ROOT{/etc/rc.d/init.d/,/var/log/httpd} \
55         $RPM_BUILD_ROOT/home/httpd/{cgi-bin,html} \
56         $RPM_BUILD_ROOT{%{_sbindir},%{_sysconfdir}/conf,%{_mandir}/man8}
57
58 install src/{boa,boa_indexer} $RPM_BUILD_ROOT%{_sbindir}
59
60 install src/*.pl $RPM_BUILD_ROOT/home/httpd/cgi-bin
61 install examples/resolver.pl $RPM_BUILD_ROOT/home/httpd/cgi-bin
62 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
63
64 install boa.conf $RPM_BUILD_ROOT%{_sysconfdir}/%{name}.conf
65
66 install docs/boa.8 $RPM_BUILD_ROOT%{_mandir}/man8/
67
68 touch $RPM_BUILD_ROOT/var/log/httpd/{access_log,agent_log,error_log,referer_log}
69
70 gzip -9nf README
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %pre
76 if [ -n "`getgid http`" ]; then
77         if [ "`getgid http`" != "51" ]; then
78                 echo "Warning:group http haven't gid=51. Corect this before install boa" 1>&2
79                 exit 1
80         fi
81 else
82         /usr/sbin/groupadd -g 51 -r -f http
83 fi
84 if [ -n "`id -u http 2>/dev/null`" ]; then
85         if [ "`id -u http`" != "51" ]; then
86                 echo "Warning:user http haven't uid=51. Corect this before install boa" 1>&2
87                 exit 1
88         fi
89 else
90         /usr/sbin/useradd -u 51 -r -d /home/httpd -s /bin/false -c "HTTP User" -g http http 1>&2
91 fi
92
93
94 %postun
95 if [ "$1" = "0" ]; then
96         %{_sbindir}/userdel http > /dev/null 2>&1
97         %{_sbindir}/groupdel http > /dev/null 2>&1
98 fi
99
100 %post
101 /sbin/chkconfig --add %{name}
102
103 if [ -f /var/lock/subsys/httpd ]; then
104         /etc/rc.d/init.d/httpd restart 1>&2
105 else
106         echo "Run \"/etc/rc.d/init.d/boa start\" to start boa http daemon."
107 fi
108
109
110 %preun
111 if [ "$1" = "0" ]; then
112         if [ -f /var/lock/subsys/boa ]; then
113                 /etc/rc.d/init.d/boa stop 1>&2
114         fi
115         /sbin/chkconfig --del boa
116 fi
117
118 %files
119 %defattr(644,root,root,755)
120 %doc README.gz docs/*.html docs/*.png docs/boa.{ps,sgml}
121 %attr(750, root,http) %dir %{_sysconfdir}
122 %attr(640, root,http) %config %{_sysconfdir}/*
123 %attr(755, root,http) /home/httpd/html
124 %attr(755, root,http) /home/httpd/cgi-bin
125 %attr(750, root,http) %dir /var/log/httpd/
126 %attr(640, root,http) %ghost /var/log/httpd/*
127 %attr(755, root,root) %{_sbindir}/*
128 %attr(754, root,root) /etc/rc.d/init.d/%{name}
129 %{_mandir}/man8/*
This page took 1.9815 seconds and 2 git commands to generate.