3 %bcond_without python # Python module
4 %bcond_without verbose # verbose build (V=1)
6 Summary: The Device Tree Compiler
7 Summary(pl.UTF-8): Kompilator drzewiastej struktury urządzeń
11 License: GPL v2+ (dtc), GPL v2+ or BSD (fdt library)
13 Source0: https://www.kernel.org/pub/software/utils/dtc/%{name}-%{version}.tar.xz
14 # Source0-md5: 1e7f54238d991b81c54fb5aabf71ff23
15 Patch0: %{name}-python.patch
16 URL: http://www.devicetree.org/Device_Tree_Compiler
19 BuildRequires: tar >= 1:1.22
22 BuildRequires: python-devel >= 2
23 BuildRequires: swig-python
25 Requires: libfdt = %{version}-%{release}
26 Obsoletes: dtc-doc < 1.3.0-2
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 %{?debug:%define with_verbose 1}
32 The Device Tree Compiler, dtc, takes as input a device-tree in a given
33 format and outputs a device-tree in another format. Typically, the
34 input format is "dts", a human readable source format, and creates a
35 "dtb", or binary format as output.
37 %description -l pl.UTF-8
38 Kompilator drzewiastej struktury urządzeń, dtc, przyjmuje na wejściu
39 dane w jednym formacie by na wyjściu wyprodukować strukturę danych w
40 innym. Najczęściej format wejściowy to "dts", intuicyjny i łatwy w
41 odczycie (tzw. human readable), natomiast wyjściowy to "dtb" lub
42 inaczej format binarny.
45 Summary: Device tree library
46 Summary(pl.UTF-8): Biblioteka drzewiastej struktury urządzeń
47 License: GPL v2+ or BSD
49 Obsoletes: dtc-doc < 1.3.0-2
50 # does not require base. see README.license
52 %description -n libfdt
55 %description -n libfdt -l pl.UTF-8
56 Biblioteka drzewiastej struktury urządzeń.
58 %package -n libfdt-devel
59 Summary: Header files for fdt library
60 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki fdt
61 License: GPL v2+ or BSD
62 Group: Development/Libraries
63 Requires: libfdt = %{version}-%{release}
65 Obsoletes: dtc-doc < 1.3.0-2
67 %description -n libfdt-devel
68 Header files for fdt library.
70 %description -n libfdt-devel -l pl.UTF-8
71 Pliki nagłówkowe biblioteki fdt.
73 %package -n libfdt-static
74 Summary: Static fdt library
75 Summary(pl.UTF-8): Statyczna biblioteka fdt
76 License: GPL v2+ or BSD
77 Group: Development/Libraries
78 Requires: libfdt-devel = %{version}-%{release}
81 %description -n libfdt-static
84 %description -n libfdt-static -l pl.UTF-8
85 Statyczna biblioteka fdt.
87 %package -n python-libfdt
88 Summary: Python binding for fdt library
89 Summary(pl.UTF-8): Wiązanie Pythona do biblioteki fdt
90 License: GPL v2+ or BSD
91 Group: Libraries/Python
93 %description -n python-libfdt
94 Python binding for fdt library.
96 %description -n python-libfdt -l pl.UTF-8
97 Wiązanie Pythona do biblioteki fdt.
105 %{?with_verbose:V=1} \
107 CFLAGS="%{rpmcflags} -fPIC" \
108 %{!?with_python:NO_PYTHON=1}
111 rm -rf $RPM_BUILD_ROOT
113 %{__make} -j1 install \
114 DESTDIR=$RPM_BUILD_ROOT \
115 %{?with_verbose:V=1} \
118 %{!?with_python:NO_PYTHON=1} \
119 SETUP_PREFIX=%{_prefix}
126 rm -rf $RPM_BUILD_ROOT
128 %post -n libfdt -p /sbin/ldconfig
129 %postun -n libfdt -p /sbin/ldconfig
132 %defattr(644,root,root,755)
133 %doc README README.license
134 %attr(755,root,root) %{_bindir}/convert-dtsv0
135 %attr(755,root,root) %{_bindir}/dtc
136 %attr(755,root,root) %{_bindir}/dtdiff
137 %attr(755,root,root) %{_bindir}/fdtdump
138 %attr(755,root,root) %{_bindir}/fdtget
139 %attr(755,root,root) %{_bindir}/fdtoverlay
140 %attr(755,root,root) %{_bindir}/fdtput
143 %defattr(644,root,root,755)
144 %attr(755,root,root) %{_libdir}/libfdt-%{version}.so
145 %attr(755,root,root) %ghost %{_libdir}/libfdt.so.1
147 %files -n libfdt-devel
148 %defattr(644,root,root,755)
149 %doc TODO Documentation/manual.txt
150 %attr(755,root,root) %{_libdir}/libfdt.so
152 %{_includedir}/libfdt.h
153 %{_includedir}/libfdt_env.h
155 %files -n libfdt-static
156 %defattr(644,root,root,755)
160 %files -n python-libfdt
161 %defattr(644,root,root,755)
162 %attr(755,root,root) %{py_sitedir}/_libfdt.so
163 %{py_sitedir}/libfdt.py[co]
164 %{py_sitedir}/libfdt-%{version}-py*.egg-info