Fix usage of build flags

This commit is contained in:
Ryan O'Hara 2021-06-03 08:42:36 -05:00
parent 318e522383
commit 1d3400c8bd

View File

@ -8,13 +8,13 @@
Name: haproxy Name: haproxy
Version: 2.4.0 Version: 2.4.0
Release: 4%{?dist} Release: 5%{?dist}
Summary: HAProxy reverse proxy for high availability environments Summary: HAProxy reverse proxy for high availability environments
License: GPLv2+ License: GPLv2+
URL: http://www.haproxy.org/ URL: http://www.haproxy.org/
Source0: %{url}/download/2.3/src/haproxy-%{version}.tar.gz Source0: %{url}/download/2.4/src/haproxy-%{version}.tar.gz
Source1: %{name}.service Source1: %{name}.service
Source2: %{name}.cfg Source2: %{name}.cfg
Source3: %{name}.logrotate Source3: %{name}.logrotate
@ -29,7 +29,7 @@ BuildRequires: systemd-devel
BuildRequires: systemd BuildRequires: systemd
BuildRequires: make BuildRequires: make
Requires(pre): shadow-utils Requires(pre): shadow-utils
%{?systemd_requires} %{?systemd_requires}
%description %description
@ -55,11 +55,13 @@ regparm_opts=
regparm_opts="USE_REGPARM=1" regparm_opts="USE_REGPARM=1"
%endif %endif
%{__make} %{?_smp_mflags} CPU="generic" TARGET="linux-glibc" USE_OPENSSL=1 USE_PCRE2=1 USE_SLZ=1 USE_LUA=1 USE_CRYPT_H=1 USE_SYSTEMD=1 USE_LINUX_TPROXY=1 USE_GETADDRINFO=1 USE_PROMEX=1 ${regparm_opts} ADDINC="%{optflags}" ADDLIB="%{__global_ldflags}" %{__make} %{?_smp_mflags} CPU="generic" TARGET="linux-glibc" USE_OPENSSL=1 USE_PCRE2=1 USE_SLZ=1 USE_LUA=1 USE_CRYPT_H=1 USE_SYSTEMD=1 USE_LINUX_TPROXY=1 USE_GETADDRINFO=1 USE_PROMEX=1 ${regparm_opts} ADDINC="%{build_cflags}" ADDLIB="%{build_ldflags}"
%{__make} admin/halog/halog OPTIMIZE="%{optflags} %{build_ldflags}" %{__make} admin/halog/halog ADDINC="%{build_cflags}" ADDLIB="%{build_ldflags}"
%{__make} admin/iprange/iprange OPTIMIZE="%{optflags} %{build_ldflags}"
%{__make} admin/iprange/ip6range OPTIMIZE="%{optflags} %{build_ldflags}" pushd admin/iprange
%{__make} OPTIMIZE="%{build_cflags}" LDFLAGS="%{build_ldflags}"
popd
%install %install
%{__make} install-bin DESTDIR=%{buildroot} PREFIX=%{_prefix} TARGET="linux2628" %{__make} install-bin DESTDIR=%{buildroot} PREFIX=%{_prefix} TARGET="linux2628"
@ -129,6 +131,9 @@ exit 0
%{_mandir}/man1/* %{_mandir}/man1/*
%changelog %changelog
* Thu Jun 03 2021 Ryan O'Hara <rohara@redhat.com> - 2.4.0-5
- Fix usage of build flags
* Mon May 17 2021 Ryan O'Hara <rohara@redhat.com> - 2.4.0-4 * Mon May 17 2021 Ryan O'Hara <rohara@redhat.com> - 2.4.0-4
- Fix path of contrib/admin tools - Fix path of contrib/admin tools