From ae73cb77e1761770be88b0178adc80cadec7d139 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Hor=C3=A1k?= Date: Mon, 27 Jun 2022 08:27:59 +0000 Subject: [PATCH] do not let rpmbuild to set compiler flags automagically and modernize the spec file a bit --- dtc.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/dtc.spec b/dtc.spec index 010513f..196e5c7 100644 --- a/dtc.spec +++ b/dtc.spec @@ -1,3 +1,5 @@ +%undefine _auto_set_build_flags + Name: dtc Version: 1.6.1 Release: 4%{?dist} @@ -50,13 +52,12 @@ This package provides python2 bindings for libfdt %prep %autosetup -p1 -sed -i 's/python2/python3/' pylibfdt/setup.py %build -%{make_build} EXTRA_CFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" +%{make_build} EXTRA_CFLAGS="%{build_cflags}" LDFLAGS="%{build_ldflags}" %install -%{make_install} DESTDIR=$RPM_BUILD_ROOT PREFIX=$RPM_BUILD_ROOT/%{_prefix} \ +%{make_install} DESTDIR=%{buildroot} PREFIX=%{buildroot}/%{_prefix} \ LIBDIR=%{_libdir} BINDIR=%{_bindir} INCLUDEDIR=%{_includedir} # we don't want ftdump and it conflicts with freetype-demos, so drop it (rhbz 797805)