From 248470867e292e5f6e15ec6ec53ee89241cce9a6 Mon Sep 17 00:00:00 2001 From: Sergey Zhemoytel Date: Tue, 14 May 2024 15:27:56 +0000 Subject: [PATCH] 1.7.0 --- dtc.spec | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/dtc.spec b/dtc.spec index c140596..92035ad 100644 --- a/dtc.spec +++ b/dtc.spec @@ -9,7 +9,7 @@ Version: 1.7.0 Release: 1 License: GPLv2+ Group: Development/Other -Url: http://devicetree.org/Device_Tree_Compiler +URL: http://devicetree.org/Device_Tree_Compiler Source0: https://www.kernel.org/pub/software/utils/dtc/%{name}-%{version}.tar.xz BuildRequires: bison BuildRequires: flex @@ -19,6 +19,7 @@ BuildRequires: python3-pip BuildRequires: python3-setuptools BuildRequires: python3-setuptools_scm BuildRequires: python3-wheel +BuildRequires: python38-devel %description The Device Tree Compiler generates flattened Open Firmware style device trees @@ -59,7 +60,7 @@ Obsoletes: %{_lib}fdt1-devel < 1.7.0 This package provides development files for libfdt %files -n %{devname} -%license GPL +%doc GPL %{_libdir}/libfdt.so %{_includedir}/*.h @@ -97,7 +98,7 @@ This package provides python3 bindings for %{name}. %prep %setup -q -%autopatch -p1 +#autopatch -p1 sed -i 's@--prefix=$(PREFIX)@--prefix=$(PREFIX) --root=/@' pylibfdt/Makefile.pylibfdt @@ -111,8 +112,9 @@ echo '#define DTC_VERSION "DTC %{version}"' > version_gen.h %set_build_flags export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} + sed -i \ - -e '/^CFLAGS =/s:=:+= %{optflags}:' \ + -e '/^CFLAGS =/s:=:+= %{optflags}:' \ -e '/^CPPFLAGS =/s:=:+=:' \ -e '/^WARNINGS =/s:=:+=:' \ -e "/^PREFIX =/s:=.*:= %{_prefix}:" \ @@ -121,10 +123,18 @@ sed -i \ # no-macro-redefined is a workaround for flex bug # https://github.com/westes/flex/issues/155 + +export PYTHONPATH=%{python38_sitelib} +export PYTHON3=/usr/libexec/python3.8 +export PYTHON=/usr/libexec/python3.8 + + %make_build \ - CC=%{__cc} \ + NO_PYTHON=1 \ + CC=%{__cc} \ LDFLAGS="%{optflags}" \ - WARNINGS+=-Wno-macro-redefined + WARNINGS+=-Wno-macro-redefined \ + PYTHON=/usr/libexec/python3.8 %install export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}