%define name haproxy %define version 1.4.8 %define release %mkrel 1 Name: %{name} Version: %{version} Release: %{release} Summary: TCP/HTTP reverse proxy for high availability environments License: GPLv2 Group: System/Servers URL: http://haproxy.1wt.eu/ Source0: http://haproxy.1wt.eu/download/1.4/src/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: libpcre-devel %description HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments. Indeed, it can: - route HTTP requests depending on statically assigned cookies - spread the load among several servers while assuring server persistence through the use of HTTP cookies - switch to backup servers in the event a main one fails - accept connections to special ports dedicated to service monitoring - stop accepting connections without breaking existing ones - add/modify/delete HTTP headers both ways - block requests matching a particular pattern It needs very little resource. Its event-driven architecture allows it to easily handle thousands of simultaneous connections on hundreds of instances without risking the system's stability. %prep %setup -q %build %{__make} USE_PCRE=1 DEBUG="" TARGET=linux26 CFLAGS="%{optflags}" %install [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} %{__install} -d %{buildroot}%{_sbindir} %{__install} -d %{buildroot}%{_initrddir} %{__install} -d %{buildroot}%{_sysconfdir}/%{name} %{__install} -s %{name} %{buildroot}%{_sbindir}/ %{__install} -c -m 644 examples/%{name}.cfg %{buildroot}%{_sysconfdir}/%{name}/ %{__install} -c -m 755 examples/%{name}.init %{buildroot}%{_initrddir}/%{name} %{__sed} -i -e 's, - , 2345 ,' %{buildroot}%{_initrddir}/%{name} %clean [ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot} %post /sbin/chkconfig --add %{name} %preun if [ $1 = 0 ]; then /sbin/service %{name} stop >/dev/null 2>&1 || : /sbin/chkconfig --del %{name} fi %postun if [ "$1" -ge "1" ]; then /sbin/service %{name} condrestart >/dev/null 2>&1 || : fi %files %defattr(-,root,root) %doc CHANGELOG TODO examples doc/haproxy-en.txt doc/haproxy-fr.txt doc/architecture.txt examples/url-switching.cfg %attr(0755,root,root) %{_sbindir}/%{name} %dir %{_sysconfdir}/%{name} %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.cfg %attr(0755,root,root) %config %{_initrddir}/%{name} %changelog * Thu Jun 17 2010 Kazuhiko Shiozaki 1.4.8-1nxd2010.0 - version 1.4.8 * Fri Jun 11 2010 Kazuhiko Shiozaki 1.4.7-1nxd2010.0 - version 1.4.7 * Mon Apr 12 2010 Kazuhiko Shiozaki 1.4.4-1nxd2010.0 - version 1.4.4 * Mon Mar 29 2010 Kazuhiko Shiozaki 1.4.2-1nxd2010.0 - version 1.4.2 * Mon Dec 8 2008 Kazuhiko Shiozaki 1.3.15.7-1nxd2008.1 - version 1.3.15.7 * Thu Oct 9 2008 Kazuhiko Shiozaki 1.3.15.4-1nxd2008.1 - version 1.3.15.4 * Thu Aug 28 2008 Kazuhiko Shiozaki 1.3.15.2-1nxd2008.1 - initial package for Mandriva