1 |
Name: haproxy |
2 |
Version: 1.4.10 |
3 |
Release: %mkrel 1 |
4 |
Summary: TCP/HTTP reverse proxy for high availability environments |
5 |
License: GPLv2 |
6 |
Group: System/Servers |
7 |
URL: http://haproxy.1wt.eu/ |
8 |
Source0: http://haproxy.1wt.eu/download/1.4/src/%{name}-%{version}.tar.gz |
9 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root |
10 |
BuildRequires: libpcre-devel |
11 |
|
12 |
%description |
13 |
HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high |
14 |
availability environments. Indeed, it can: |
15 |
- route HTTP requests depending on statically assigned cookies |
16 |
- spread the load among several servers while assuring server persistence |
17 |
through the use of HTTP cookies |
18 |
- switch to backup servers in the event a main one fails |
19 |
- accept connections to special ports dedicated to service monitoring |
20 |
- stop accepting connections without breaking existing ones |
21 |
- add/modify/delete HTTP headers both ways |
22 |
- block requests matching a particular pattern |
23 |
|
24 |
It needs very little resource. Its event-driven architecture allows it to easily |
25 |
handle thousands of simultaneous connections on hundreds of instances without |
26 |
risking the system's stability. |
27 |
|
28 |
%prep |
29 |
%setup -q |
30 |
|
31 |
%build |
32 |
#%{__make} USE_PCRE=1 "COPTS.pcre=-DUSE_PCRE $(pcre-config --cflags)" DEBUG="" TARGET=linux26 |
33 |
%serverbuild |
34 |
%make TARGET=linux26 CFLAGS="%{optflags}" |
35 |
|
36 |
%install |
37 |
rm -rf %{buildroot} |
38 |
|
39 |
mkdir -p %{buildroot}%{_sbindir} |
40 |
mkdir -p %{buildroot}%{_initrddir} |
41 |
mkdir -p %{buildroot}%{_sysconfdir}/%{name} |
42 |
|
43 |
cp %{name} %{buildroot}%{_sbindir}/ |
44 |
cp examples/%{name}.cfg %{buildroot}%{_sysconfdir}/%{name}/ |
45 |
cp examples/%{name}.init %{buildroot}%{_initrddir}/%{name} |
46 |
|
47 |
%clean |
48 |
rm -rf $RPM_BUILD_ROOT |
49 |
|
50 |
%files |
51 |
%defattr(-,root,root) |
52 |
%doc CHANGELOG TODO examples doc/haproxy-en.txt doc/haproxy-fr.txt doc/architecture.txt examples/url-switching.cfg |
53 |
%attr(0755,root,root) %{_sbindir}/%{name} |
54 |
%dir %{_sysconfdir}/%{name} |
55 |
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.cfg |
56 |
%attr(0755,root,root) %config %{_initrddir}/%{name} |
57 |
|
58 |
|
59 |
|