Simplify setting of CFLAGS/LDFLAGS to avoid issue with package notes

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=2059488.
For some reason, the %_package_note_file path was not expanded properly.
Let's call it one of the mystries of recursive rpm macro expansion.
Since we have https://fedoraproject.org/wiki/Changes/SetBuildFlagsBuildCheck,
we can just use $CLFAGS and $LDFLAGS and this should DTRT.

I tested the build in mock and it seems all fine.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2022-03-29 10:24:20 +02:00
parent 63694da3a1
commit 4bc4dc6eb1

View File

@ -146,13 +146,13 @@ if test "$api" != "%{redis_modules_abi}"; then
exit 1
fi
%global make_flags DEBUG="" V="echo" LDFLAGS="%{?__global_ldflags}" CFLAGS+="%{optflags} -fPIC" INSTALL="install -p" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes
%global make_flags DEBUG="" V="echo" LDFLAGS="$LDFLAGS" CFLAGS+="$CFLAGS -fPIC" INSTALL="install -p" PREFIX=%{buildroot}%{_prefix} BUILD_WITH_SYSTEMD=yes BUILD_TLS=yes
%build
%make_build %{make_flags} all
%install
make %{make_flags} install
%make_install %{make_flags}
# Filesystem.
install -d %{buildroot}%{_sharedstatedir}/%{name}