[packages/dtc] - updated to 1.7.1; python2 module removed (1.7.0 moved to python-libfdt.spec)
qboosh
qboosh at pld-linux.org
Sun Sep 15 17:05:51 CEST 2024
commit 9134d119008f22890bfff16186070ceb18ed8236
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Sep 15 17:08:40 2024 +0200
- updated to 1.7.1; python2 module removed (1.7.0 moved to python-libfdt.spec)
dtc.spec | 59 ++++++++---------------------------------------------------
python2.patch | 11 -----------
2 files changed, 8 insertions(+), 62 deletions(-)
---
diff --git a/dtc.spec b/dtc.spec
index 85b7750..4bb15be 100644
--- a/dtc.spec
+++ b/dtc.spec
@@ -1,25 +1,22 @@
#
# Conditional build:
%bcond_without python # Python module (any)
-%bcond_without python2 # CPython 2.x module
%bcond_without python3 # CPython 3.x module
%bcond_without verbose # verbose build (V=1)
%if %{without python}
-%undefine with_python2
%undefine with_python3
%endif
Summary: The Device Tree Compiler
Summary(pl.UTF-8): Kompilator drzewiastej struktury urządzeń
Name: dtc
-Version: 1.7.0
+Version: 1.7.1
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: 228576aceed3aa89f54283aa0f1eb820
+# Source0-md5: 8dc1c58c84ca19f825f6939801b44c52
Patch0: %{name}-python.patch
-Patch1: python2.patch
URL: https://www.devicetree.org/
BuildRequires: bison
BuildRequires: flex
@@ -28,25 +25,16 @@ BuildRequires: rpmbuild(macros) >= 1.714
BuildRequires: tar >= 1:1.22
BuildRequires: xz
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-devel >= 1:3.8
BuildRequires: python3-setuptools
BuildRequires: python3-setuptools_scm
-%endif
BuildRequires: swig-python >= 2.0.10
%endif
Requires: libfdt = %{version}-%{release}
Obsoletes: dtc-doc < 1.3.0-2
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-%define abi_ver %{version}
-
%{?debug:%define with_verbose 1}
%description
@@ -105,18 +93,6 @@ Static fdt library.
%description -n libfdt-static -l pl.UTF-8
Statyczna biblioteka fdt.
-%package -n python-libfdt
-Summary: Python 2 binding for fdt library
-Summary(pl.UTF-8): Wiązanie Pythona 2 do biblioteki fdt
-License: GPL v2+ or BSD
-Group: Libraries/Python
-
-%description -n python-libfdt
-Python 2 binding for fdt library.
-
-%description -n python-libfdt -l pl.UTF-8
-Wiązanie Pythona 2 do biblioteki fdt.
-
%package -n python3-libfdt
Summary: Python 3 binding for fdt library
Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki fdt
@@ -132,7 +108,6 @@ Wiązanie Pythona 3 do biblioteki fdt.
%prep
%setup -q
%patch0 -p1
-%patch1 -p1
%build
%{__make} -j1 \
@@ -141,15 +116,11 @@ Wiązanie Pythona 3 do biblioteki fdt.
CFLAGS="%{rpmcflags} -fPIC" \
NO_PYTHON=1
-%if %{with python}
-export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
-%if %{with python2}
-%py_build
-%endif
%if %{with python3}
+export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
+
%py3_build
%endif
-%endif
%install
rm -rf $RPM_BUILD_ROOT
@@ -162,17 +133,11 @@ rm -rf $RPM_BUILD_ROOT
NO_PYTHON=1 \
SETUP_PREFIX=%{_prefix}
-%if %{with python}
+%if %{with python3}
export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
-%if %{with python2}
-%py_install
-%py_postclean
-%endif
-%if %{with python3}
%py3_install
%endif
-%endif
%clean
rm -rf $RPM_BUILD_ROOT
@@ -193,7 +158,7 @@ rm -rf $RPM_BUILD_ROOT
%files -n libfdt
%defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libfdt-%{abi_ver}.so
+%attr(755,root,root) %{_libdir}/libfdt.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libfdt.so.1
%files -n libfdt-devel
@@ -208,19 +173,11 @@ rm -rf $RPM_BUILD_ROOT
%defattr(644,root,root,755)
%{_libdir}/libfdt.a
-%if %{with python2}
-%files -n python-libfdt
-%defattr(644,root,root,755)
-%attr(755,root,root) %{py_sitedir}/_libfdt.so
-%{py_sitedir}/libfdt.py[co]
-%{py_sitedir}/libfdt-%{abi_ver}*.egg-info
-%endif
-
%if %{with python3}
%files -n python3-libfdt
%defattr(644,root,root,755)
%attr(755,root,root) %{py3_sitedir}/_libfdt.cpython-*.so
%{py3_sitedir}/libfdt.py
%{py3_sitedir}/__pycache__/libfdt.cpython-*.py[co]
-%{py3_sitedir}/libfdt-%{abi_ver}*.egg-info
+%{py3_sitedir}/libfdt-%{version}-py*.egg-info
%endif
diff --git a/python2.patch b/python2.patch
deleted file mode 100644
index e0a52aa..0000000
--- a/python2.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- 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/9134d119008f22890bfff16186070ceb18ed8236
More information about the pld-cvs-commit
mailing list