New .spec for RHEL from DAG

This commit is contained in:
willy tarreau 2006-03-15 19:41:10 +01:00
parent 2bfdd8e26a
commit b6da47990b

View File

@ -1,17 +1,18 @@
Summary: HA-Proxy is a TCP/HTTP reverse proxy for high availability environments
Name: haproxy
Version: 1.2.3
Version: 1.2.9
Release: 1
License: GPL
Group: System Environment/Daemons
URL: http://w.ods.org/tools/%{name}/
Packager: Simon Matter <simon.matter@invoca.ch>
Vendor: Invoca Systems
Distribution: Invoca Linux Server
Source0: http://w.ods.org/tools/%{name}/%{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-root
URL: http://w.ods.org/tools/haproxy/
Source0: http://w.ods.org/tools/haproxy/haproxy-%{version}.tar.gz
Source1: haproxy.cfg
Source2: haproxy.init
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: pcre-devel
Prereq: /sbin/chkconfig
Requires: /sbin/chkconfig, /sbin/service
%description
HA-Proxy is a TCP/HTTP reverse proxy which is particularly suited for high
@ -30,66 +31,48 @@ handle thousands of simultaneous connections on hundreds of instances without
risking the system's stability.
%prep
%setup -q
%setup
%build
%{__make} REGEX=pcre DEBUG="" LIBS.pcre="-L\$(PCREDIR)/lib -Wl,-Bstatic -lpcreposix -lpcre -Wl,-Bdynamic"
%{__make} REGEX="pcre" "COPTS.pcre=-DUSE_PCRE $(pcre-config --cflags)" DEBUG="" TARGET=linux24e
%install
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%{__rm} -rf %{buildroot}
%{__install} -d %{buildroot}%{_sbindir}
%{__install} -d %{buildroot}%{_sysconfdir}/rc.d/init.d
%{__install} -d %{buildroot}%{_sysconfdir}/%{name}
%{__install} -d -m0755 %{buildroot}%{_datadir}/haproxy/
%{__install} -s %{name} %{buildroot}%{_sbindir}/
%{__install} -c -m 644 examples/%{name}.cfg %{buildroot}%{_sysconfdir}/%{name}/
%{__install} -c -m 755 examples/%{name}.init %{buildroot}%{_sysconfdir}/rc.d/init.d/%{name}
%{__install} -D -m0755 haproxy %{buildroot}%{_sbindir}/haproxy
%{__install} -D -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/haproxy/haproxy.cfg
%{__install} -D -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/haproxy
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%{__rm} -rf %{buildroot}
%post
/sbin/chkconfig --add %{name}
/sbin/chkconfig --add haproxy
%preun
if [ $1 = 0 ]; then
/sbin/service %{name} stop >/dev/null 2>&1 || :
/sbin/chkconfig --del %{name}
if [ $1 -eq 0 ]; then
/sbin/service haproxy stop &>/dev/null || :
/sbin/chkconfig --del haproxy
fi
%postun
if [ "$1" -ge "1" ]; then
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
if [ $1 -ge 1 ]; then
/sbin/service haproxy condrestart &>/dev/null || :
fi
%files
%defattr(-,root,root)
%doc CHANGELOG TODO examples doc/haproxy-en.txt doc/haproxy-fr.txt doc/architecture.txt
%attr(0755,root,root) %{_sbindir}/%{name}
%dir %{_sysconfdir}/%{name}
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.cfg
%attr(0755,root,root) %config %{_sysconfdir}/rc.d/init.d/%{name}
%defattr(-, root, root, 0755)
%doc CHANGELOG README TODO doc/* examples/
%config(noreplace) %{_sysconfdir}/haproxy/
%config %{_initrddir}/haproxy
%{_sbindir}/haproxy
%dir %{_datadir}/haproxy/
%changelog
* Sat Jan 22 2005 Willy Tarreau <willy@w.ods.org>
- updated to 1.2.3 (1.1.30)
* Wed Mar 15 2006 Willy Tarreau <willy@w.ods.org> - 1.2.9-1
- ported to 1.2.9.
* Sun Nov 14 2004 Willy Tarreau <w@w.ods.org>
- updated to 1.1.29
- fixed path to config and init files
- statically linked PCRE to increase portability to non-pcre systems
* Sun Jun 6 2004 Willy Tarreau <willy@w.ods.org>
- updated to 1.1.28
- added config check support to the init script
* Tue Oct 28 2003 Simon Matter <simon.matter@invoca.ch>
- updated to 1.1.27
- added pid support to the init script
* Wed Oct 22 2003 Simon Matter <simon.matter@invoca.ch>
- updated to 1.1.26
* Thu Oct 16 2003 Simon Matter <simon.matter@invoca.ch>
- initial build
* Tue Feb 07 2006 Dag Wieers <dag@wieers.com> - 1.1.34-1
- Initial package. (using DAR)