blob: 77ca08f497337301bcb8af6737b54901f340001f [file] [log] [blame]
willy tarreau9974d732006-04-15 21:47:17 +02001Summary: HA-Proxy is a TCP/HTTP reverse proxy for high availability environments
2Name: haproxy
3Version: 1.2.12
4Release: 1
5License: GPL
6Group: System Environment/Daemons
7URL: http://w.ods.org/tools/%{name}/
8Source0: http://w.ods.org/tools/%{name}/%{name}-%{version}.tar.gz
9BuildRoot: %{_tmppath}/%{name}-%{version}-root
10BuildRequires: pcre-devel
11Requires: /sbin/chkconfig, /sbin/service
12
13%description
14HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high
15availability environments. Indeed, it can:
16- route HTTP requests depending on statically assigned cookies
17- spread the load among several servers while assuring server persistence
18 through the use of HTTP cookies
19- switch to backup servers in the event a main one fails
20- accept connections to special ports dedicated to service monitoring
21- stop accepting connections without breaking existing ones
22- add/modify/delete HTTP headers both ways
23- block requests matching a particular pattern
24
25It needs very little resource. Its event-driven architecture allows it to easily
26handle thousands of simultaneous connections on hundreds of instances without
27risking the system's stability.
28
29%prep
30%setup -q
31
32%build
33%{__make} REGEX="pcre" "COPTS.pcre=-DUSE_PCRE $(pcre-config --cflags)" DEBUG="" TARGET=linux24e SMALL_OPTS="-DBUFSIZE=8030 -DMAXREWRITE=1030 -DSYSTEM_MAXCONN=1024" DEBUG="" LIBS.pcre="-L\$(PCREDIR)/lib -Wl,-Bstatic -lpcreposix -lpcre -Wl,-Bdynamic"
34
35%install
36[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
37
38%{__install} -d %{buildroot}%{_sbindir}
39%{__install} -d %{buildroot}%{_sysconfdir}/rc.d/init.d
40%{__install} -d %{buildroot}%{_sysconfdir}/%{name}
41
42%{__install} -s %{name} %{buildroot}%{_sbindir}/
43%{__install} -c -m 644 examples/%{name}.cfg %{buildroot}%{_sysconfdir}/%{name}/
44%{__install} -c -m 755 examples/%{name}.init %{buildroot}%{_sysconfdir}/rc.d/init.d/%{name}
45
46%clean
47[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
48
49%post
50/sbin/chkconfig --add %{name}
51
52%preun
53if [ $1 = 0 ]; then
54 /sbin/service %{name} stop >/dev/null 2>&1 || :
55 /sbin/chkconfig --del %{name}
56fi
57
58%postun
59if [ "$1" -ge "1" ]; then
60 /sbin/service %{name} condrestart >/dev/null 2>&1 || :
61fi
62
63%files
64%defattr(-,root,root)
65%doc CHANGELOG TODO examples doc/haproxy-en.txt doc/haproxy-fr.txt doc/architecture.txt
66%attr(0755,root,root) %{_sbindir}/%{name}
67%dir %{_sysconfdir}/%{name}
68%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.cfg
69%attr(0755,root,root) %config %{_sysconfdir}/rc.d/init.d/%{name}
70
71%changelog
72* Wed Apr 15 2006 Willy Tarreau <willy@w.ods.org>
73- updated to 1.2.12
74
75* Wed Mar 30 2006 Willy Tarreau <willy@w.ods.org>
76- updated to 1.2.11.1
77
78* Wed Mar 19 2006 Willy Tarreau <willy@w.ods.org>
79- updated to 1.2.10
80
81* Wed Mar 15 2006 Willy Tarreau <willy@w.ods.org>
82- updated to 1.2.9
83
84* Sat Jan 22 2005 Willy Tarreau <willy@w.ods.org>
85- updated to 1.2.3 (1.1.30)
86
87* Sun Nov 14 2004 Willy Tarreau <w@w.ods.org>
88- updated to 1.1.29
89- fixed path to config and init files
90- statically linked PCRE to increase portability to non-pcre systems
91
92* Sun Jun 6 2004 Willy Tarreau <willy@w.ods.org>
93- updated to 1.1.28
94- added config check support to the init script
95
96* Tue Oct 28 2003 Simon Matter <simon.matter@invoca.ch>
97- updated to 1.1.27
98- added pid support to the init script
99
100* Wed Oct 22 2003 Simon Matter <simon.matter@invoca.ch>
101- updated to 1.1.26
102
103* Thu Oct 16 2003 Simon Matter <simon.matter@invoca.ch>
104- initial build