From e54cce1fc69eea577ddf3022c6f0637c11c22e54 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Fri, 5 Jan 2024 21:59:45 +0100 Subject: [PATCH] package created using the webbuild interface [release 1.7.0-1mamba;Sat Aug 26 2023] --- README.md | 2 + dtc-1.7.0-python-scm.patch | 18 +++++++ dtc.spec | 105 +++++++++++++++++++++++++++++++++++++ 3 files changed, 125 insertions(+) create mode 100644 dtc-1.7.0-python-scm.patch create mode 100644 dtc.spec diff --git a/README.md b/README.md index 68e22d5..29eaab6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,4 @@ # dtc +The source tree contains the Device Tree Compiler (dtc) toolchain for working with device tree source and binary files and also libfdt, a utility library for reading and manipulating the binary format. + diff --git a/dtc-1.7.0-python-scm.patch b/dtc-1.7.0-python-scm.patch new file mode 100644 index 0000000..407bf05 --- /dev/null +++ b/dtc-1.7.0-python-scm.patch @@ -0,0 +1,18 @@ +diff --git a/setup.py b/setup.py +index e82a832..da01efd 100755 +--- a/setup.py ++++ b/setup.py +@@ -49,11 +49,8 @@ class build_py(_build_py): + + setup( + name='libfdt', +- use_scm_version={ +- "root": srcdir, +- }, + cmdclass = {'build_py' : build_py}, +- setup_requires = ['setuptools_scm'], ++ version="@VERSION@", + author='Simon Glass', + author_email='sjg@chromium.org', + description='Python binding for libfdt', + diff --git a/dtc.spec b/dtc.spec new file mode 100644 index 0000000..f9658ec --- /dev/null +++ b/dtc.spec @@ -0,0 +1,105 @@ +Name: dtc +Version: 1.7.0 +Release: 1mamba +Summary: Device Tree Compiler +Group: System/Kernel and Hardware +Vendor: openmamba +Distribution: openmamba +Packager: Silvan Calarco +URL: https://github.com/dgibson/dtc +Source: https://github.com/dgibson/dtc.git/v%{version}/dtc-%{version}.tar.bz2 +Patch0: dtc-1.7.0-python-scm.patch +License: BSD, GPL +## AUTOBUILDREQ-BEGIN +BuildRequires: glibc-devel +BuildRequires: libpython3-devel +BuildRequires: libyaml-devel +## AUTOBUILDREQ-END +BuildRequires: meson +Requires: libfdt = %{?epoch:%epoch:}%{version}-%{release} + +%description +The source tree contains the Device Tree Compiler (dtc) toolchain for working with device tree source and binary files and also libfdt, a utility library for reading and manipulating the binary format. + +%package -n libfdt +Group: System/Libraries +Summary: Shared libraries for %{name} + +%description -n libfdt +This package contains shared libraries for %{name}. + +%package -n libfdt-devel +Group: Development/Libraries +Summary: Development files for %{name} +Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} +Requires: libfdt = %{?epoch:%epoch:}%{version}-%{release} +Requires: pkg-config + +%description -n libfdt-devel +This package contains libraries and header files for developing applications that use %{name}. + +%package -n python-libfdt +Group: System/Libraries/Python +Summary: Python bindings to libfdt + +%description -n python-libfdt +This package contains shared libraries for %{name}. + + +%debug_package + +%prep +%setup -q +%patch 0 -p1 -b .python-scm +sed -i "s/@VERSION@/%{version}/" setup.py + +%build +%meson +%meson_build + +%install +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" +%meson_install + +%clean +[ "%{buildroot}" != / ] && rm -rf "%{buildroot}" + +%post -n libfdt -p /sbin/ldconfig +%postun -n libfdt -p /sbin/ldconfig + +%files +%defattr(-,root,root) +%{_bindir}/convert-dtsv0 +%{_bindir}/dtc +%{_bindir}/dtdiff +%{_bindir}/fdtdump +%{_bindir}/fdtget +%{_bindir}/fdtoverlay +%{_bindir}/fdtput + +%files -n python-libfdt +%defattr(-,root,root) +%{python3_sitearch}/__pycache__/libfdt.cpython-*.pyc +%{python3_sitearch}/_libfdt.cpython-*.so +%dir %{python3_sitearch}/libfdt-%{version}-py*.egg-info +%{python3_sitearch}/libfdt-%{version}-py*.egg-info/* +%{python3_sitearch}/libfdt.py + +%files -n libfdt +%defattr(-,root,root) +%{_libdir}/libfdt.so.* +%doc GPL BSD-2-Clause + +%files -n libfdt-devel +%defattr(-,root,root) +%{_includedir}/fdt.h +%{_includedir}/libfdt.h +%{_includedir}/libfdt_env.h +%{_libdir}/libfdt.a +%{_libdir}/libfdt.so +%{_libdir}/pkgconfig/libfdt.pc +%doc README.license README.md TODO + +%changelog +* Sat Aug 26 2023 Silvan Calarco 1.7.0-1mamba +- package created using the webbuild interface