blob: 9654655ae4d5a62fae1064253953504c269ca980 [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
willy tarreau4302f492005-12-18 01:00:37 +01003Version: 1.2.3
willy tarreau982249e2005-12-18 00:57:06 +01004Release: 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
willy tarreau982249e2005-12-18 00:57:06 +010012BuildRoot: %{_tmppath}/%{name}-%{version}-root
13BuildRequires: pcre-devel
14Prereq: /sbin/chkconfig
15
16%description
17HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high
18availability environments. Indeed, it can:
19- route HTTP requests depending on statically assigned cookies
20- spread the load among several servers while assuring server persistence
21 through the use of HTTP cookies
22- switch to backup servers in the event a main one fails
23- accept connections to special ports dedicated to service monitoring
24- stop accepting connections without breaking existing ones
25- add/modify/delete HTTP headers both ways
26- block requests matching a particular pattern
27
28It needs very little resource. Its event-driven architecture allows it to easily
29handle thousands of simultaneous connections on hundreds of instances without
30risking the system's stability.
31
32%prep
33%setup -q
34
35%build
willy tarreau4302f492005-12-18 01:00:37 +010036%{__make} REGEX=pcre DEBUG="" LIBS.pcre="-L\$(PCREDIR)/lib -Wl,-Bstatic -lpcreposix -lpcre -Wl,-Bdynamic"
willy tarreau982249e2005-12-18 00:57:06 +010037
38%install
39[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
40
41%{__install} -d %{buildroot}%{_sbindir}
42%{__install} -d %{buildroot}%{_sysconfdir}/rc.d/init.d
willy tarreau982249e2005-12-18 00:57:06 +010043%{__install} -d %{buildroot}%{_sysconfdir}/%{name}
willy tarreau982249e2005-12-18 00:57:06 +010044
45%{__install} -s %{name} %{buildroot}%{_sbindir}/
willy tarreau4302f492005-12-18 01:00:37 +010046%{__install} -c -m 644 examples/%{name}.cfg %{buildroot}%{_sysconfdir}/%{name}/
47%{__install} -c -m 755 examples/%{name}.init %{buildroot}%{_sysconfdir}/rc.d/init.d/%{name}
willy tarreau982249e2005-12-18 00:57:06 +010048
49%clean
50[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
51
52%post
53/sbin/chkconfig --add %{name}
54
55%preun
56if [ $1 = 0 ]; then
57 /sbin/service %{name} stop >/dev/null 2>&1 || :
58 /sbin/chkconfig --del %{name}
59fi
60
61%postun
62if [ "$1" -ge "1" ]; then
63 /sbin/service %{name} condrestart >/dev/null 2>&1 || :
64fi
65
66%files
67%defattr(-,root,root)
willy tarreau4302f492005-12-18 01:00:37 +010068%doc CHANGELOG TODO examples doc/haproxy-en.txt doc/haproxy-fr.txt doc/architecture.txt
willy tarreau982249e2005-12-18 00:57:06 +010069%attr(0755,root,root) %{_sbindir}/%{name}
70%dir %{_sysconfdir}/%{name}
71%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.cfg
72%attr(0755,root,root) %config %{_sysconfdir}/rc.d/init.d/%{name}
willy tarreau982249e2005-12-18 00:57:06 +010073
74%changelog
willy tarreau4302f492005-12-18 01:00:37 +010075* Sat Jan 22 2005 Willy Tarreau <willy@w.ods.org>
76- updated to 1.2.3 (1.1.30)
77
78* Sun Nov 14 2004 Willy Tarreau <w@w.ods.org>
79- updated to 1.1.29
80- fixed path to config and init files
81- statically linked PCRE to increase portability to non-pcre systems
82
willy tarreau982249e2005-12-18 00:57:06 +010083* Sun Jun 6 2004 Willy Tarreau <willy@w.ods.org>
84- updated to 1.1.28
85- added config check support to the init script
86
87* Tue Oct 28 2003 Simon Matter <simon.matter@invoca.ch>
88- updated to 1.1.27
89- added pid support to the init script
90
91* Wed Oct 22 2003 Simon Matter <simon.matter@invoca.ch>
92- updated to 1.1.26
93
94* Thu Oct 16 2003 Simon Matter <simon.matter@invoca.ch>
95- initial build