mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-23 13:17:16 +00:00
fixed haproxy.spec to build correctly on RHEL3
This commit is contained in:
parent
50be0170d1
commit
e4c2e10a98
@ -4,13 +4,9 @@ Version: 1.2.9
|
||||
Release: 1
|
||||
License: GPL
|
||||
Group: System Environment/Daemons
|
||||
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
|
||||
|
||||
URL: http://w.ods.org/tools/%{name}/
|
||||
Source0: http://w.ods.org/tools/%{name}/%{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
BuildRequires: pcre-devel
|
||||
Requires: /sbin/chkconfig, /sbin/service
|
||||
|
||||
@ -31,48 +27,71 @@ handle thousands of simultaneous connections on hundreds of instances without
|
||||
risking the system's stability.
|
||||
|
||||
%prep
|
||||
%setup
|
||||
%setup -q
|
||||
|
||||
%build
|
||||
%{__make} REGEX="pcre" "COPTS.pcre=-DUSE_PCRE $(pcre-config --cflags)" DEBUG="" TARGET=linux24e
|
||||
#%{__make} REGEX=pcre DEBUG="" LIBS.pcre="-L\$(PCREDIR)/lib -Wl,-Bstatic -lpcreposix -lpcre -Wl,-Bdynamic"
|
||||
|
||||
|
||||
%install
|
||||
%{__rm} -rf %{buildroot}
|
||||
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
|
||||
|
||||
%{__install} -d -m0755 %{buildroot}%{_datadir}/haproxy/
|
||||
%{__install} -d %{buildroot}%{_sbindir}
|
||||
%{__install} -d %{buildroot}%{_sysconfdir}/rc.d/init.d
|
||||
%{__install} -d %{buildroot}%{_sysconfdir}/%{name}
|
||||
|
||||
%{__install} -D -m0755 haproxy %{buildroot}%{_sbindir}/haproxy
|
||||
%{__install} -D -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/haproxy/haproxy.cfg
|
||||
%{__install} -D -m0755 %{SOURCE2} %{buildroot}%{_initrddir}/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}
|
||||
|
||||
%clean
|
||||
%{__rm} -rf %{buildroot}
|
||||
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
|
||||
|
||||
%post
|
||||
/sbin/chkconfig --add haproxy
|
||||
/sbin/chkconfig --add %{name}
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ]; then
|
||||
/sbin/service haproxy stop &>/dev/null || :
|
||||
/sbin/chkconfig --del haproxy
|
||||
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 haproxy condrestart &>/dev/null || :
|
||||
if [ "$1" -ge "1" ]; then
|
||||
/sbin/service %{name} condrestart >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%files
|
||||
%defattr(-, root, root, 0755)
|
||||
%doc CHANGELOG README TODO doc/* examples/
|
||||
%config(noreplace) %{_sysconfdir}/haproxy/
|
||||
%config %{_initrddir}/haproxy
|
||||
%{_sbindir}/haproxy
|
||||
%dir %{_datadir}/haproxy/
|
||||
%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}
|
||||
|
||||
%changelog
|
||||
* Wed Mar 15 2006 Willy Tarreau <willy@w.ods.org> - 1.2.9-1
|
||||
- ported to 1.2.9.
|
||||
* Wed Mar 15 2006 Willy Tarreau <willy@w.ods.org>
|
||||
- updated to 1.2.9
|
||||
|
||||
* Tue Feb 07 2006 Dag Wieers <dag@wieers.com> - 1.1.34-1
|
||||
- Initial package. (using DAR)
|
||||
* Sat Jan 22 2005 Willy Tarreau <willy@w.ods.org>
|
||||
- updated to 1.2.3 (1.1.30)
|
||||
|
||||
* 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
|
||||
|
Loading…
Reference in New Issue
Block a user