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