]> git.pld-linux.org Git - packages/dtc.git/blobdiff - dtc.spec
- versioned Obsoletes
[packages/dtc.git] / dtc.spec
index 592344afc91273884ec6242a56e8b6185b3f36c1..85b775011ecf66edeea7c01425f9488e2ec2b20b 100644 (file)
--- a/dtc.spec
+++ b/dtc.spec
 Summary:       The Device Tree Compiler
 Summary(pl.UTF-8):     Kompilator drzewiastej struktury urządzeń
 Name:          dtc
-Version:       1.5.1
+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: d5b67727ee6d168fd83023e995565341
+# Source0-md5: 228576aceed3aa89f54283aa0f1eb820
 Patch0:                %{name}-python.patch
-URL:           http://www.devicetree.org/Device_Tree_Compiler
+Patch1:                python2.patch
+URL:           https://www.devicetree.org/
 BuildRequires: bison
 BuildRequires: flex
+BuildRequires: pkgconfig
+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-setuptools
+BuildRequires: python3-setuptools_scm
 %endif
 BuildRequires: swig-python >= 2.0.10
 %endif
@@ -37,6 +45,8 @@ 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
@@ -72,7 +82,7 @@ Summary(pl.UTF-8):    Pliki nagłówkowe biblioteki fdt
 License:       GPL v2+ or BSD
 Group:         Development/Libraries
 Requires:      libfdt = %{version}-%{release}
-Obsoletes:     dtc-devel
+Obsoletes:     dtc-devel < 1.3.0
 Obsoletes:     dtc-doc < 1.3.0-2
 
 %description -n libfdt-devel
@@ -87,7 +97,7 @@ Summary(pl.UTF-8):    Statyczna biblioteka fdt
 License:       GPL v2+ or BSD
 Group:         Development/Libraries
 Requires:      libfdt-devel = %{version}-%{release}
-Obsoletes:     dtc-static
+Obsoletes:     dtc-static < 1.3.0
 
 %description -n libfdt-static
 Static fdt library.
@@ -122,6 +132,7 @@ Wiązanie Pythona 3 do biblioteki fdt.
 %prep
 %setup -q
 %patch0 -p1
+%patch1 -p1
 
 %build
 %{__make} -j1 \
@@ -131,8 +142,7 @@ Wiązanie Pythona 3 do biblioteki fdt.
        NO_PYTHON=1
 
 %if %{with python}
-cd pylibfdt
-
+export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
 %if %{with python2}
 %py_build
 %endif
@@ -153,8 +163,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
 
@@ -173,7 +182,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
@@ -184,7 +193,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files -n libfdt
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libfdt-1.5.0.so
+%attr(755,root,root) %{_libdir}/libfdt-%{abi_ver}.so
 %attr(755,root,root) %ghost %{_libdir}/libfdt.so.1
 
 %files -n libfdt-devel
@@ -204,7 +213,7 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %attr(755,root,root) %{py_sitedir}/_libfdt.so
 %{py_sitedir}/libfdt.py[co]
-%{py_sitedir}/libfdt-1.5.0-py*.egg-info
+%{py_sitedir}/libfdt-%{abi_ver}*.egg-info
 %endif
 
 %if %{with python3}
@@ -213,5 +222,5 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{py3_sitedir}/_libfdt.cpython-*.so
 %{py3_sitedir}/libfdt.py
 %{py3_sitedir}/__pycache__/libfdt.cpython-*.py[co]
-%{py3_sitedir}/libfdt-1.5.0-py*.egg-info
+%{py3_sitedir}/libfdt-%{abi_ver}*.egg-info
 %endif
This page took 0.029928 seconds and 4 git commands to generate.