Use build flags set by %set_build_flags

This commit is contained in:
Petr Lautrbach 2019-03-11 10:56:01 +01:00
parent 813ea3403a
commit b04ead8bfb
1 changed files with 7 additions and 6 deletions

View File

@ -101,10 +101,11 @@ needed for developing SELinux applications.
%autosetup -p 1 -n libselinux-%{version}-rc2
%build
export LDFLAGS="%{?__global_ldflags}"
export DISABLE_RPM="y"
export USE_PCRE2="y"
%set_build_flags
# To support building the Python wrapper against multiple Python runtimes
# Define a function, for how to perform a "build" of the python wrapper against
# a specific runtime:
@ -114,18 +115,18 @@ BuildPythonWrapper() {
# Perform the build from the upstream Makefile:
make \
PYTHON=$BinaryName \
LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" %{?_smp_mflags} \
LIBDIR="%{_libdir}" %{?_smp_mflags} \
pywrap
}
make clean
make LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" %{?_smp_mflags} swigify
make LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" %{?_smp_mflags} all
make LIBDIR="%{_libdir}" %{?_smp_mflags} swigify
make LIBDIR="%{_libdir}" %{?_smp_mflags} all
BuildPythonWrapper %{__python2}
BuildPythonWrapper %{__python3}
make RUBYINC="%{ruby_inc}" SHLIBDIR="%{_libdir}" LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" CFLAGS="-g %{optflags}" %{?_smp_mflags} rubywrap
make RUBYINC="%{ruby_inc}" SHLIBDIR="%{_libdir}" LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" %{?_smp_mflags} rubywrap
%install
InstallPythonWrapper() {
@ -133,7 +134,7 @@ InstallPythonWrapper() {
make \
PYTHON=$BinaryName \
LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" %{?_smp_mflags} \
LIBDIR="%{_libdir}" %{?_smp_mflags} \
LIBSEPOLA="%{_libdir}/libsepol.a" \
pywrap