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