From dcb08bdec81434fb33303d30b2fbb497ce40dec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Wed, 9 Dec 2020 15:39:26 +0100 Subject: [PATCH] Respect CC/CPP environment variables Stop the makefile from setting those, and use the make macros as well as %set_build_flags to get the right values from the buildroot. https://docs.fedoraproject.org/en-US/packaging-guidelines/#_parallel_make --- ladspa.spec | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ladspa.spec b/ladspa.spec index 4fdbbd7..0ef8f7c 100644 --- a/ladspa.spec +++ b/ladspa.spec @@ -42,14 +42,19 @@ perl -pi -e 's/^(CFLAGS.*)-O3(.*)/$1\$\(RPM_OPT_FLAGS\)$2 -DPLUGINDIR=\$\(PLUGIN # avoid X.org dependency perl -pi -e 's/-mkdirhier/-mkdir -p/' src/makefile +# Respect our CC and CPP choices +perl -pi -e 's/CC(.*)=(.*)cc//' src/makefile +perl -pi -e 's/CPP(.*)=(.*)c\+\+//' src/makefile + # fix links to the header file in the docs cd doc perl -pi -e "s!HREF=\"ladspa.h.txt\"!href=\"file:///usr/include/ladspa.h\"!" *.html %build +%set_build_flags cd src -PLUGINDIR=\\\"%{_libdir}/ladspa\\\" make targets %{?_smp_mflags} LD="ld --build-id" +PLUGINDIR=\\\"%{_libdir}/ladspa\\\" %{__make} targets %{?_smp_mflags} LD="ld --build-id" #make test #make check @@ -59,7 +64,7 @@ PLUGINDIR=\\\"%{_libdir}/ladspa\\\" make targets %{?_smp_mflags} LD="ld --build- rm -rf $RPM_BUILD_ROOT cd src -make install \ +%make_install \ INSTALL_PLUGINS_DIR=$RPM_BUILD_ROOT%{_libdir}/ladspa \ INSTALL_INCLUDE_DIR=$RPM_BUILD_ROOT%{_includedir} \ INSTALL_BINARY_DIR=$RPM_BUILD_ROOT%{_bindir}