willy tarreau | 982249e | 2005-12-18 00:57:06 +0100 | [diff] [blame] | 1 | Summary: HA-Proxy is a TCP/HTTP reverse proxy for high availability environments |
| 2 | Name: haproxy |
willy tarreau | 4302f49 | 2005-12-18 01:00:37 +0100 | [diff] [blame] | 3 | Version: 1.2.3 |
willy tarreau | 982249e | 2005-12-18 00:57:06 +0100 | [diff] [blame] | 4 | Release: 1 |
| 5 | License: GPL |
| 6 | Group: System Environment/Daemons |
| 7 | URL: http://w.ods.org/tools/%{name}/ |
| 8 | Packager: Simon Matter <simon.matter@invoca.ch> |
| 9 | Vendor: Invoca Systems |
| 10 | Distribution: Invoca Linux Server |
| 11 | Source0: http://w.ods.org/tools/%{name}/%{name}-%{version}.tar.gz |
willy tarreau | 982249e | 2005-12-18 00:57:06 +0100 | [diff] [blame] | 12 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
| 13 | BuildRequires: pcre-devel |
| 14 | Prereq: /sbin/chkconfig |
| 15 | |
| 16 | %description |
| 17 | HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high |
| 18 | availability 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 | |
| 28 | It needs very little resource. Its event-driven architecture allows it to easily |
| 29 | handle thousands of simultaneous connections on hundreds of instances without |
| 30 | risking the system's stability. |
| 31 | |
| 32 | %prep |
| 33 | %setup -q |
| 34 | |
| 35 | %build |
willy tarreau | 4302f49 | 2005-12-18 01:00:37 +0100 | [diff] [blame] | 36 | %{__make} REGEX=pcre DEBUG="" LIBS.pcre="-L\$(PCREDIR)/lib -Wl,-Bstatic -lpcreposix -lpcre -Wl,-Bdynamic" |
willy tarreau | 982249e | 2005-12-18 00:57:06 +0100 | [diff] [blame] | 37 | |
| 38 | %install |
| 39 | [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} |
| 40 | |
| 41 | %{__install} -d %{buildroot}%{_sbindir} |
| 42 | %{__install} -d %{buildroot}%{_sysconfdir}/rc.d/init.d |
willy tarreau | 982249e | 2005-12-18 00:57:06 +0100 | [diff] [blame] | 43 | %{__install} -d %{buildroot}%{_sysconfdir}/%{name} |
willy tarreau | 982249e | 2005-12-18 00:57:06 +0100 | [diff] [blame] | 44 | |
| 45 | %{__install} -s %{name} %{buildroot}%{_sbindir}/ |
willy tarreau | 4302f49 | 2005-12-18 01:00:37 +0100 | [diff] [blame] | 46 | %{__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 tarreau | 982249e | 2005-12-18 00:57:06 +0100 | [diff] [blame] | 48 | |
| 49 | %clean |
| 50 | [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} |
| 51 | |
| 52 | %post |
| 53 | /sbin/chkconfig --add %{name} |
| 54 | |
| 55 | %preun |
| 56 | if [ $1 = 0 ]; then |
| 57 | /sbin/service %{name} stop >/dev/null 2>&1 || : |
| 58 | /sbin/chkconfig --del %{name} |
| 59 | fi |
| 60 | |
| 61 | %postun |
| 62 | if [ "$1" -ge "1" ]; then |
| 63 | /sbin/service %{name} condrestart >/dev/null 2>&1 || : |
| 64 | fi |
| 65 | |
| 66 | %files |
| 67 | %defattr(-,root,root) |
willy tarreau | 4302f49 | 2005-12-18 01:00:37 +0100 | [diff] [blame] | 68 | %doc CHANGELOG TODO examples doc/haproxy-en.txt doc/haproxy-fr.txt doc/architecture.txt |
willy tarreau | 982249e | 2005-12-18 00:57:06 +0100 | [diff] [blame] | 69 | %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 tarreau | 982249e | 2005-12-18 00:57:06 +0100 | [diff] [blame] | 73 | |
| 74 | %changelog |
willy tarreau | 4302f49 | 2005-12-18 01:00:37 +0100 | [diff] [blame] | 75 | * 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 tarreau | 982249e | 2005-12-18 00:57:06 +0100 | [diff] [blame] | 83 | * 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 |