3 %bcond_without python # Python module (any)
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
6 %bcond_without verbose # verbose build (V=1)
10 %undefine with_python3
12 Summary: The Device Tree Compiler
13 Summary(pl.UTF-8): Kompilator drzewiastej struktury urządzeń
17 License: GPL v2+ (dtc), GPL v2+ or BSD (fdt library)
19 Source0: https://www.kernel.org/pub/software/utils/dtc/%{name}-%{version}.tar.xz
20 # Source0-md5: 709888bac3aad657e6020d0e491fc0ba
21 Patch0: %{name}-python.patch
22 URL: https://www.devicetree.org/
25 BuildRequires: pkgconfig
26 BuildRequires: tar >= 1:1.22
28 BuildRequires: yaml-devel
31 BuildRequires: python-devel >= 2
34 BuildRequires: python3-devel >= 1:3.2
36 BuildRequires: swig-python >= 2.0.10
38 Requires: libfdt = %{version}-%{release}
39 Obsoletes: dtc-doc < 1.3.0-2
40 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 %define abi_ver %{version}
44 %{?debug:%define with_verbose 1}
47 The Device Tree Compiler, dtc, takes as input a device-tree in a given
48 format and outputs a device-tree in another format. Typically, the
49 input format is "dts", a human readable source format, and creates a
50 "dtb", or binary format as output.
52 %description -l pl.UTF-8
53 Kompilator drzewiastej struktury urządzeń, dtc, przyjmuje na wejściu
54 dane w jednym formacie by na wyjściu wyprodukować strukturę danych w
55 innym. Najczęściej format wejściowy to "dts", intuicyjny i łatwy w
56 odczycie (tzw. human readable), natomiast wyjściowy to "dtb" lub
57 inaczej format binarny.
60 Summary: Device tree library
61 Summary(pl.UTF-8): Biblioteka drzewiastej struktury urządzeń
62 License: GPL v2+ or BSD
64 Obsoletes: dtc-doc < 1.3.0-2
65 # does not require base. see README.license
67 %description -n libfdt
70 %description -n libfdt -l pl.UTF-8
71 Biblioteka drzewiastej struktury urządzeń.
73 %package -n libfdt-devel
74 Summary: Header files for fdt library
75 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki fdt
76 License: GPL v2+ or BSD
77 Group: Development/Libraries
78 Requires: libfdt = %{version}-%{release}
80 Obsoletes: dtc-doc < 1.3.0-2
82 %description -n libfdt-devel
83 Header files for fdt library.
85 %description -n libfdt-devel -l pl.UTF-8
86 Pliki nagłówkowe biblioteki fdt.
88 %package -n libfdt-static
89 Summary: Static fdt library
90 Summary(pl.UTF-8): Statyczna biblioteka fdt
91 License: GPL v2+ or BSD
92 Group: Development/Libraries
93 Requires: libfdt-devel = %{version}-%{release}
96 %description -n libfdt-static
99 %description -n libfdt-static -l pl.UTF-8
100 Statyczna biblioteka fdt.
102 %package -n python-libfdt
103 Summary: Python 2 binding for fdt library
104 Summary(pl.UTF-8): Wiązanie Pythona 2 do biblioteki fdt
105 License: GPL v2+ or BSD
106 Group: Libraries/Python
108 %description -n python-libfdt
109 Python 2 binding for fdt library.
111 %description -n python-libfdt -l pl.UTF-8
112 Wiązanie Pythona 2 do biblioteki fdt.
114 %package -n python3-libfdt
115 Summary: Python 3 binding for fdt library
116 Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki fdt
117 License: GPL v2+ or BSD
118 Group: Libraries/Python
120 %description -n python3-libfdt
121 Python 3 binding for fdt library.
123 %description -n python3-libfdt -l pl.UTF-8
124 Wiązanie Pythona 3 do biblioteki fdt.
132 %{?with_verbose:V=1} \
134 CFLAGS="%{rpmcflags} -fPIC" \
139 ln -sf ../version_gen.h .
151 rm -rf $RPM_BUILD_ROOT
153 %{__make} -j1 install \
154 DESTDIR=$RPM_BUILD_ROOT \
155 %{?with_verbose:V=1} \
159 SETUP_PREFIX=%{_prefix}
175 rm -rf $RPM_BUILD_ROOT
177 %post -n libfdt -p /sbin/ldconfig
178 %postun -n libfdt -p /sbin/ldconfig
181 %defattr(644,root,root,755)
182 %doc README README.license
183 %attr(755,root,root) %{_bindir}/convert-dtsv0
184 %attr(755,root,root) %{_bindir}/dtc
185 %attr(755,root,root) %{_bindir}/dtdiff
186 %attr(755,root,root) %{_bindir}/fdtdump
187 %attr(755,root,root) %{_bindir}/fdtget
188 %attr(755,root,root) %{_bindir}/fdtoverlay
189 %attr(755,root,root) %{_bindir}/fdtput
192 %defattr(644,root,root,755)
193 %attr(755,root,root) %{_libdir}/libfdt-%{abi_ver}.so
194 %attr(755,root,root) %ghost %{_libdir}/libfdt.so.1
196 %files -n libfdt-devel
197 %defattr(644,root,root,755)
198 %doc TODO Documentation/manual.txt
199 %attr(755,root,root) %{_libdir}/libfdt.so
201 %{_includedir}/libfdt.h
202 %{_includedir}/libfdt_env.h
204 %files -n libfdt-static
205 %defattr(644,root,root,755)
209 %files -n python-libfdt
210 %defattr(644,root,root,755)
211 %attr(755,root,root) %{py_sitedir}/_libfdt.so
212 %{py_sitedir}/libfdt.py[co]
213 %{py_sitedir}/libfdt-%{abi_ver}*.egg-info
217 %files -n python3-libfdt
218 %defattr(644,root,root,755)
219 %attr(755,root,root) %{py3_sitedir}/_libfdt.cpython-*.so
220 %{py3_sitedir}/libfdt.py
221 %{py3_sitedir}/__pycache__/libfdt.cpython-*.py[co]
222 %{py3_sitedir}/libfdt-%{abi_ver}*.egg-info