blob: 63ef708bd398a3aaa20e8896e6a96a699d6ffc5b [file] [log] [blame]
willy tarreau982249e2005-12-18 00:57:06 +01001Summary: HA-Proxy is a TCP/HTTP reverse proxy for high availability environments
2Name: haproxy
3Version: 1.2.1
4Release: 1
5License: GPL
6Group: System Environment/Daemons
7URL: http://w.ods.org/tools/%{name}/
8Packager: Simon Matter <simon.matter@invoca.ch>
9Vendor: Invoca Systems
10Distribution: Invoca Linux Server
11Source0: http://w.ods.org/tools/%{name}/%{name}-%{version}.tar.gz
12Source1: %{name}.cfg
13Source2: %{name}.init
14BuildRoot: %{_tmppath}/%{name}-%{version}-root
15BuildRequires: pcre-devel
16Prereq: /sbin/chkconfig
17
18%description
19HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high
20availability environments. Indeed, it can:
21- route HTTP requests depending on statically assigned cookies
22- spread the load among several servers while assuring server persistence
23 through the use of HTTP cookies
24- switch to backup servers in the event a main one fails
25- accept connections to special ports dedicated to service monitoring
26- stop accepting connections without breaking existing ones
27- add/modify/delete HTTP headers both ways
28- block requests matching a particular pattern
29
30It needs very little resource. Its event-driven architecture allows it to easily
31handle thousands of simultaneous connections on hundreds of instances without
32risking the system's stability.
33
34%prep
35%setup -q
36
37%build
38%{__make} REGEX=pcre DEBUG=""
39
40%install
41[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
42
43%{__install} -d %{buildroot}%{_sbindir}
44%{__install} -d %{buildroot}%{_sysconfdir}/rc.d/init.d
45%{__install} -d %{buildroot}%{_sysconfdir}/logrotate.d
46%{__install} -d %{buildroot}%{_sysconfdir}/%{name}
47%{__install} -d %{buildroot}%{_datadir}/%{name}
48
49%{__install} -s %{name} %{buildroot}%{_sbindir}/
50%{__install} -c -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/
51%{__install} -c -m 755 %{SOURCE2} %{buildroot}%{_sysconfdir}/rc.d/init.d/%{name}
52
53%clean
54[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
55
56%post
57/sbin/chkconfig --add %{name}
58
59%preun
60if [ $1 = 0 ]; then
61 /sbin/service %{name} stop >/dev/null 2>&1 || :
62 /sbin/chkconfig --del %{name}
63fi
64
65%postun
66if [ "$1" -ge "1" ]; then
67 /sbin/service %{name} condrestart >/dev/null 2>&1 || :
68fi
69
70%files
71%defattr(-,root,root)
72%doc CHANGELOG TODO examples
73%attr(0755,root,root) %{_sbindir}/%{name}
74%dir %{_sysconfdir}/%{name}
75%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.cfg
76%attr(0755,root,root) %config %{_sysconfdir}/rc.d/init.d/%{name}
77%dir %{_datadir}/%{name}
78
79%changelog
80* Sun Jun 6 2004 Willy Tarreau <willy@w.ods.org>
81- updated to 1.1.28
82- added config check support to the init script
83
84* Tue Oct 28 2003 Simon Matter <simon.matter@invoca.ch>
85- updated to 1.1.27
86- added pid support to the init script
87
88* Wed Oct 22 2003 Simon Matter <simon.matter@invoca.ch>
89- updated to 1.1.26
90
91* Thu Oct 16 2003 Simon Matter <simon.matter@invoca.ch>
92- initial build