Haproxy 1.8 Rpm Spec File
Summary: HA-Proxy is a TCP/HTTP reverse proxy for high availability environments |
Name: haproxy |
Version: 1.6.4 |
Release: 1 |
License: GPL |
Group: System Environment/Daemons |
URL: http://haproxy.1wt.eu/ |
Source0: http://haproxy.1wt.eu/download/1.5/src/devel/%{name}-%{version}.tar.gz |
BuildRoot: %{_tmppath}/%{name}-%{version}-root |
BuildRequires: pcre-devel openssl-devel |
Requires: /sbin/chkconfig, /sbin/service |
%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 |
# We don't want any perl dependecies in this RPM: |
%define __perl_requires /bin/true |
%build |
%{__make} USE_PCRE=1 DEBUG='' ARCH=%{_target_cpu} TARGET=linux26 USE_OPENSSL=1 |
%install |
[ '%{buildroot}'!='/' ] && %{__rm} -rf %{buildroot} |
%{__install} -d %{buildroot}%{_sbindir} |
%{__install} -d %{buildroot}%{_sysconfdir}/rc.d/init.d |
%{__install} -d %{buildroot}%{_sysconfdir}/%{name} |
%{__install} -d %{buildroot}%{_mandir}/man1/ |
mkdir -p %{buildroot}/usr/share/haproxy |
mkdir -p %{buildroot}/var/lib/haproxy |
cp examples/errorfiles/400.http %{buildroot}/usr/share/haproxy/400.http |
cp examples/errorfiles/403.http %{buildroot}/usr/share/haproxy/403.http |
cp examples/errorfiles/408.http %{buildroot}/usr/share/haproxy/408.http |
cp examples/errorfiles/500.http %{buildroot}/usr/share/haproxy/500.http |
cp examples/errorfiles/502.http %{buildroot}/usr/share/haproxy/502.http |
cp examples/errorfiles/503.http %{buildroot}/usr/share/haproxy/503.http |
cp examples/errorfiles/504.http %{buildroot}/usr/share/haproxy/504.http |
cp examples/errorfiles/README %{buildroot}/usr/share/haproxy/README |
mkdir -p %{buildroot}/etc/logrotate.d/ |
mkdir -p %{buildroot}/etc/sysconfig/ |
%{__install} -s %{name} %{buildroot}%{_sbindir}/ |
%{__install} -c -m 644 examples/acl-content-sw.cfg %{buildroot}%{_sysconfdir}/%{name}/%{name}-acl-content-sw.cfg.example |
%{__install} -c -m 644 examples/auth.cfg %{buildroot}%{_sysconfdir}/%{name}/%{name}-auth.cfg.example |
%{__install} -c -m 644 examples/content-sw-sample.cfg %{buildroot}%{_sysconfdir}/%{name}/%{name}-content-sw-sample.cfg.example |
%{__install} -c -m 644 examples/option-http_proxy.cfg %{buildroot}%{_sysconfdir}/%{name}/%{name}-option-http_proxy.cfg.example |
%{__install} -c -m 644 examples/ssl.cfg %{buildroot}%{_sysconfdir}/%{name}/%{name}-ssl.cfg.example |
%{__install} -c -m 644 examples/transparent_proxy.cfg %{buildroot}%{_sysconfdir}/%{name}/%{name}-transparent_proxy.cfg.example |
%{__install} -c -m 644 examples/%{name}.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/%{name} |
%{__install} -c -m 755 examples/%{name}.init %{buildroot}%{_sysconfdir}/rc.d/init.d/%{name} |
%{__install} -c -m 755 examples/%{name}.logrotated %{buildroot}%{_sysconfdir}/logrotate.d/%{name} |
%{__install} -c -m 755 doc/%{name}.1 %{buildroot}%{_mandir}/man1/ |
%clean |
[ '%{buildroot}'!='/' ] && %{__rm} -rf %{buildroot} |
%pre |
/usr/sbin/groupadd -g 188 -r haproxy 2>/dev/null : |
/usr/sbin/useradd -u 188 -g haproxy -d /var/lib/haproxy -s /sbin/nologin -r haproxy 2>/dev/null : |
%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 |
/usr/share/haproxy |
%defattr(-,root,root) |
%doc CHANGELOG examples/*.cfg README doc/architecture.txt doc/configuration.txt doc/intro.txt doc/management.txt doc/proxy-protocol.txt |
%doc %{_mandir}/man1/%{name}.1* |
%attr(0755,root,root) %{_sbindir}/%{name} |
%dir %{_sysconfdir}/%{name} |
%attr(0644,root,root) %{_sysconfdir}/%{name}/*.cfg.example |
%attr(0755,root,root) %config %{_sysconfdir}/rc.d/init.d/%{name} |
%attr(0644,root,root) %config %{_sysconfdir}/sysconfig/%{name} |
%attr(0644,root,root) %{_sysconfdir}/logrotate.d/%{name} |
%attr(0755,haproxy,haproxy) %{_sharedstatedir}/haproxy |
%changelog |
* Tue Apr 26 2016Taro Hirose <uorat1616@gmail.com> |
- initial build @1.6.4 |
There are GitHub repositories with customized.spec files to build your own RPM. In fact, there is an haproxy.spec file that may be found in the official.tar.gz file under examples. However, here is a unique way to build one as close to the original, haproxy-1.5.4-2.el6.rpm, official build found in the CentOS 6 base repositories.
Idle Speed = Manufacturer recommended idle speed in RPM. Max RPM = Manufacturer recommended maximum no-load top speed (other than typically mounted bar and chain) in crankshaft revolutions per minute. SPS = Verified STIHL-published specs. Odd notations within tables: FIXED = The carburetor has a fixed (non-adjustable) jet for this fuel circuit. HAProxy SPEC file for v1.6.4. GitHub Gist: instantly share code, notes, and snippets.
RPM Package Manager is a package management system used primarily for GNU/Linux operating systems. It used the .rpm file format. Cheat droid pro no root.