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 |
| 3 | Version: 1.2.1 |
| 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 |
| 12 | Source1: %{name}.cfg |
| 13 | Source2: %{name}.init |
| 14 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
| 15 | BuildRequires: pcre-devel |
| 16 | Prereq: /sbin/chkconfig |
| 17 | |
| 18 | %description |
| 19 | HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high |
| 20 | availability 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 | |
| 30 | It needs very little resource. Its event-driven architecture allows it to easily |
| 31 | handle thousands of simultaneous connections on hundreds of instances without |
| 32 | risking 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 |
| 60 | if [ $1 = 0 ]; then |
| 61 | /sbin/service %{name} stop >/dev/null 2>&1 || : |
| 62 | /sbin/chkconfig --del %{name} |
| 63 | fi |
| 64 | |
| 65 | %postun |
| 66 | if [ "$1" -ge "1" ]; then |
| 67 | /sbin/service %{name} condrestart >/dev/null 2>&1 || : |
| 68 | fi |
| 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 |