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