]>
Commit | Line | Data |
---|---|---|
f18f0eaf | 1 | # |
6861f1fc | 2 | # Conditional build: |
2b797ed5 | 3 | %bcond_without python # Python module |
6861f1fc | 4 | %bcond_without verbose # verbose build (V=1) |
cff8604d | 5 | |
6861f1fc | 6 | Summary: The Device Tree Compiler |
cff8604d | 7 | Summary(pl.UTF-8): Kompilator drzewiastej struktury urządzeń |
6861f1fc | 8 | Name: dtc |
2b797ed5 | 9 | Version: 1.4.7 |
fffeac36 JB |
10 | Release: 1 |
11 | License: GPL v2+ (dtc), GPL v2+ or BSD (fdt library) | |
6861f1fc | 12 | Group: Libraries |
cc076a48 | 13 | Source0: https://www.kernel.org/pub/software/utils/dtc/%{name}-%{version}.tar.xz |
2b797ed5 JB |
14 | # Source0-md5: cdf3bfae59374fdcd2bbc5ae4f0e835e |
15 | Patch0: %{name}-python.patch | |
cc076a48 | 16 | URL: http://www.devicetree.org/Device_Tree_Compiler |
4ecc89ea | 17 | BuildRequires: bison |
18 | BuildRequires: flex | |
cc076a48 JB |
19 | BuildRequires: tar >= 1:1.22 |
20 | BuildRequires: xz | |
2b797ed5 JB |
21 | %if %{with python} |
22 | BuildRequires: python-devel >= 2 | |
23 | BuildRequires: swig-python | |
24 | %endif | |
fad8e447 | 25 | Requires: libfdt = %{version}-%{release} |
cff8604d | 26 | Obsoletes: dtc-doc < 1.3.0-2 |
6861f1fc ER |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
28 | ||
29 | %{?debug:%define with_verbose 1} | |
30 | ||
31 | %description | |
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. | |
36 | ||
b14054e0 | 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. | |
43 | ||
fad8e447 JR |
44 | %package -n libfdt |
45 | Summary: Device tree library | |
46 | Summary(pl.UTF-8): Biblioteka drzewiastej struktury urządzeń | |
fffeac36 | 47 | License: GPL v2+ or BSD |
fad8e447 | 48 | Group: Libraries |
cff8604d | 49 | Obsoletes: dtc-doc < 1.3.0-2 |
fad8e447 JR |
50 | # does not require base. see README.license |
51 | ||
52 | %description -n libfdt | |
53 | Device tree library. | |
54 | ||
55 | %description -n libfdt -l pl.UTF-8 | |
56 | Biblioteka drzewiastej struktury urządzeń. | |
57 | ||
58 | %package -n libfdt-devel | |
6861f1fc ER |
59 | Summary: Header files for fdt library |
60 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki fdt | |
fffeac36 | 61 | License: GPL v2+ or BSD |
6861f1fc | 62 | Group: Development/Libraries |
fad8e447 JR |
63 | Requires: libfdt = %{version}-%{release} |
64 | Obsoletes: dtc-devel | |
cff8604d | 65 | Obsoletes: dtc-doc < 1.3.0-2 |
6861f1fc | 66 | |
fad8e447 | 67 | %description -n libfdt-devel |
6861f1fc ER |
68 | Header files for fdt library. |
69 | ||
fad8e447 | 70 | %description -n libfdt-devel -l pl.UTF-8 |
6861f1fc ER |
71 | Pliki nagłówkowe biblioteki fdt. |
72 | ||
fad8e447 | 73 | %package -n libfdt-static |
6861f1fc ER |
74 | Summary: Static fdt library |
75 | Summary(pl.UTF-8): Statyczna biblioteka fdt | |
fffeac36 | 76 | License: GPL v2+ or BSD |
6861f1fc | 77 | Group: Development/Libraries |
fad8e447 JR |
78 | Requires: libfdt-devel = %{version}-%{release} |
79 | Obsoletes: dtc-static | |
6861f1fc | 80 | |
fad8e447 | 81 | %description -n libfdt-static |
6861f1fc ER |
82 | Static fdt library. |
83 | ||
fad8e447 | 84 | %description -n libfdt-static -l pl.UTF-8 |
6861f1fc ER |
85 | Statyczna biblioteka fdt. |
86 | ||
2b797ed5 JB |
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 | |
92 | ||
93 | %description -n python-libfdt | |
94 | Python binding for fdt library. | |
95 | ||
96 | %description -n python-libfdt -l pl.UTF-8 | |
97 | Wiązanie Pythona do biblioteki fdt. | |
98 | ||
6861f1fc | 99 | %prep |
cc076a48 | 100 | %setup -q |
2b797ed5 | 101 | %patch0 -p1 |
6861f1fc ER |
102 | |
103 | %build | |
104 | %{__make} \ | |
105 | %{?with_verbose:V=1} \ | |
106 | CC="%{__cc}" \ | |
2b797ed5 JB |
107 | CFLAGS="%{rpmcflags} -fPIC" \ |
108 | %{!?with_python:NO_PYTHON=1} | |
6861f1fc ER |
109 | |
110 | %install | |
111 | rm -rf $RPM_BUILD_ROOT | |
112 | %{__make} install \ | |
cff8604d | 113 | DESTDIR=$RPM_BUILD_ROOT \ |
6861f1fc ER |
114 | %{?with_verbose:V=1} \ |
115 | PREFIX=%{_prefix} \ | |
2b797ed5 JB |
116 | LIBDIR=%{_libdir} \ |
117 | %{!?with_python:NO_PYTHON=1} \ | |
118 | SETUP_PREFIX=%{_prefix} | |
119 | ||
120 | %if %{with python} | |
121 | %py_postclean | |
122 | %endif | |
6861f1fc ER |
123 | |
124 | %clean | |
125 | rm -rf $RPM_BUILD_ROOT | |
126 | ||
f18f0eaf | 127 | %post -n libfdt -p /sbin/ldconfig |
cff8604d | 128 | %postun -n libfdt -p /sbin/ldconfig |
fad8e447 | 129 | |
6861f1fc ER |
130 | %files |
131 | %defattr(644,root,root,755) | |
cc076a48 | 132 | %doc README README.license |
fad8e447 | 133 | %attr(755,root,root) %{_bindir}/convert-dtsv0 |
6861f1fc | 134 | %attr(755,root,root) %{_bindir}/dtc |
fad8e447 | 135 | %attr(755,root,root) %{_bindir}/dtdiff |
cc076a48 JB |
136 | %attr(755,root,root) %{_bindir}/fdtdump |
137 | %attr(755,root,root) %{_bindir}/fdtget | |
2b797ed5 | 138 | %attr(755,root,root) %{_bindir}/fdtoverlay |
cc076a48 | 139 | %attr(755,root,root) %{_bindir}/fdtput |
fad8e447 JR |
140 | |
141 | %files -n libfdt | |
142 | %defattr(644,root,root,755) | |
143 | %attr(755,root,root) %{_libdir}/libfdt-%{version}.so | |
144 | %attr(755,root,root) %ghost %{_libdir}/libfdt.so.1 | |
6861f1fc | 145 | |
fad8e447 | 146 | %files -n libfdt-devel |
6861f1fc | 147 | %defattr(644,root,root,755) |
cff8604d | 148 | %doc TODO Documentation/manual.txt |
fad8e447 | 149 | %attr(755,root,root) %{_libdir}/libfdt.so |
6861f1fc ER |
150 | %{_includedir}/fdt.h |
151 | %{_includedir}/libfdt.h | |
cc076a48 | 152 | %{_includedir}/libfdt_env.h |
6861f1fc | 153 | |
fad8e447 | 154 | %files -n libfdt-static |
6861f1fc ER |
155 | %defattr(644,root,root,755) |
156 | %{_libdir}/libfdt.a | |
2b797ed5 JB |
157 | |
158 | %if %{with python} | |
159 | %files -n python-libfdt | |
160 | %defattr(644,root,root,755) | |
161 | %attr(755,root,root) %{py_sitedir}/_libfdt.so | |
162 | %{py_sitedir}/pylibfdt | |
163 | %{py_sitedir}/libfdt-%{version}-py*.egg-info | |
164 | %endif |