[packages/dtc] up to 1.7.0
atler
atler at pld-linux.org
Wed Mar 8 22:44:08 CET 2023
commit 20819d959921a3ebc309ef41e47630536b5cdfeb
Author: Jan Palus <atler at pld-linux.org>
Date: Wed Mar 8 22:39:17 2023 +0100
up to 1.7.0
dtc.spec | 22 ++++++++++++----------
python2.patch | 11 +++++++++++
2 files changed, 23 insertions(+), 10 deletions(-)
---
diff --git a/dtc.spec b/dtc.spec
index deaaf5f..db78c3e 100644
--- a/dtc.spec
+++ b/dtc.spec
@@ -12,13 +12,14 @@
Summary: The Device Tree Compiler
Summary(pl.UTF-8): Kompilator drzewiastej struktury urządzeń
Name: dtc
-Version: 1.6.1
-Release: 3
+Version: 1.7.0
+Release: 1
License: GPL v2+ (dtc), GPL v2+ or BSD (fdt library)
Group: Libraries
Source0: https://www.kernel.org/pub/software/utils/dtc/%{name}-%{version}.tar.xz
-# Source0-md5: 709888bac3aad657e6020d0e491fc0ba
+# Source0-md5: 228576aceed3aa89f54283aa0f1eb820
Patch0: %{name}-python.patch
+Patch1: python2.patch
URL: https://www.devicetree.org/
BuildRequires: bison
BuildRequires: flex
@@ -29,9 +30,13 @@ BuildRequires: yaml-devel
%if %{with python}
%if %{with python2}
BuildRequires: python-devel >= 2
+BuildRequires: python-setuptools
+BuildRequires: python-setuptools_scm
%endif
%if %{with python3}
BuildRequires: python3-devel >= 1:3.2
+BuildRequires: python3-setuptools
+BuildRequires: python3-setuptools_scm
%endif
BuildRequires: swig-python >= 2.0.10
%endif
@@ -126,6 +131,7 @@ Wiązanie Pythona 3 do biblioteki fdt.
%prep
%setup -q
%patch0 -p1
+%patch1 -p1
%build
%{__make} -j1 \
@@ -135,10 +141,7 @@ Wiązanie Pythona 3 do biblioteki fdt.
NO_PYTHON=1
%if %{with python}
-cd pylibfdt
-ln -sf ../version_gen.h .
-ln -sf ../libfdt .
-
+export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%if %{with python2}
%py_build
%endif
@@ -159,8 +162,7 @@ rm -rf $RPM_BUILD_ROOT
SETUP_PREFIX=%{_prefix}
%if %{with python}
-cd pylibfdt
-
+export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
%if %{with python2}
%py_install
@@ -179,7 +181,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc README README.license
+%doc README.license README.md
%attr(755,root,root) %{_bindir}/convert-dtsv0
%attr(755,root,root) %{_bindir}/dtc
%attr(755,root,root) %{_bindir}/dtdiff
diff --git a/python2.patch b/python2.patch
new file mode 100644
index 0000000..e0a52aa
--- /dev/null
+++ b/python2.patch
@@ -0,0 +1,11 @@
+--- dtc-1.7.0/setup.py.orig 2023-02-09 11:01:35.000000000 +0100
++++ dtc-1.7.0/setup.py 2023-03-08 12:58:41.327004674 +0100
+@@ -45,7 +45,7 @@
+ class build_py(_build_py):
+ def run(self):
+ self.run_command("build_ext")
+- return super().run()
++ return _build_py.run(self)
+
+ setup(
+ name='libfdt',
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/dtc.git/commitdiff/c3515ca90b1ae3b1b421fbea93b9cd27d5207245
More information about the pld-cvs-commit
mailing list