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