]> git.pld-linux.org Git - packages/dtc.git/blame - dtc.spec
up to 1.7.0
[packages/dtc.git] / dtc.spec
CommitLineData
f18f0eaf 1#
6861f1fc 2# Conditional build:
cd1c3a73
JB
3%bcond_without python # Python module (any)
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6861f1fc 6%bcond_without verbose # verbose build (V=1)
cff8604d 7
cd1c3a73
JB
8%if %{without python}
9%undefine with_python2
10%undefine with_python3
11%endif
6861f1fc 12Summary: The Device Tree Compiler
cff8604d 13Summary(pl.UTF-8): Kompilator drzewiastej struktury urządzeń
6861f1fc 14Name: dtc
20819d95
JP
15Version: 1.7.0
16Release: 1
fffeac36 17License: GPL v2+ (dtc), GPL v2+ or BSD (fdt library)
6861f1fc 18Group: Libraries
cc076a48 19Source0: https://www.kernel.org/pub/software/utils/dtc/%{name}-%{version}.tar.xz
20819d95 20# Source0-md5: 228576aceed3aa89f54283aa0f1eb820
2b797ed5 21Patch0: %{name}-python.patch
20819d95 22Patch1: python2.patch
3c2ba202 23URL: https://www.devicetree.org/
4ecc89ea 24BuildRequires: bison
25BuildRequires: flex
f8302009 26BuildRequires: pkgconfig
cc076a48
JB
27BuildRequires: tar >= 1:1.22
28BuildRequires: xz
f8302009 29BuildRequires: yaml-devel
2b797ed5 30%if %{with python}
cd1c3a73 31%if %{with python2}
2b797ed5 32BuildRequires: python-devel >= 2
20819d95
JP
33BuildRequires: python-setuptools
34BuildRequires: python-setuptools_scm
cd1c3a73
JB
35%endif
36%if %{with python3}
37BuildRequires: python3-devel >= 1:3.2
20819d95
JP
38BuildRequires: python3-setuptools
39BuildRequires: python3-setuptools_scm
cd1c3a73
JB
40%endif
41BuildRequires: swig-python >= 2.0.10
2b797ed5 42%endif
fad8e447 43Requires: libfdt = %{version}-%{release}
cff8604d 44Obsoletes: dtc-doc < 1.3.0-2
6861f1fc
ER
45BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
3c2ba202
JB
47%define abi_ver %{version}
48
6861f1fc
ER
49%{?debug:%define with_verbose 1}
50
51%description
52The Device Tree Compiler, dtc, takes as input a device-tree in a given
53format and outputs a device-tree in another format. Typically, the
54input format is "dts", a human readable source format, and creates a
55"dtb", or binary format as output.
56
b14054e0 57%description -l pl.UTF-8
58Kompilator drzewiastej struktury urządzeń, dtc, przyjmuje na wejściu
59dane w jednym formacie by na wyjściu wyprodukować strukturę danych w
60innym. Najczęściej format wejściowy to "dts", intuicyjny i łatwy w
61odczycie (tzw. human readable), natomiast wyjściowy to "dtb" lub
62inaczej format binarny.
63
fad8e447
JR
64%package -n libfdt
65Summary: Device tree library
66Summary(pl.UTF-8): Biblioteka drzewiastej struktury urządzeń
fffeac36 67License: GPL v2+ or BSD
fad8e447 68Group: Libraries
cff8604d 69Obsoletes: dtc-doc < 1.3.0-2
fad8e447
JR
70# does not require base. see README.license
71
72%description -n libfdt
73Device tree library.
74
75%description -n libfdt -l pl.UTF-8
76Biblioteka drzewiastej struktury urządzeń.
77
78%package -n libfdt-devel
6861f1fc
ER
79Summary: Header files for fdt library
80Summary(pl.UTF-8): Pliki nagłówkowe biblioteki fdt
fffeac36 81License: GPL v2+ or BSD
6861f1fc 82Group: Development/Libraries
fad8e447
JR
83Requires: libfdt = %{version}-%{release}
84Obsoletes: dtc-devel
cff8604d 85Obsoletes: dtc-doc < 1.3.0-2
6861f1fc 86
fad8e447 87%description -n libfdt-devel
6861f1fc
ER
88Header files for fdt library.
89
fad8e447 90%description -n libfdt-devel -l pl.UTF-8
6861f1fc
ER
91Pliki nagłówkowe biblioteki fdt.
92
fad8e447 93%package -n libfdt-static
6861f1fc
ER
94Summary: Static fdt library
95Summary(pl.UTF-8): Statyczna biblioteka fdt
fffeac36 96License: GPL v2+ or BSD
6861f1fc 97Group: Development/Libraries
fad8e447
JR
98Requires: libfdt-devel = %{version}-%{release}
99Obsoletes: dtc-static
6861f1fc 100
fad8e447 101%description -n libfdt-static
6861f1fc
ER
102Static fdt library.
103
fad8e447 104%description -n libfdt-static -l pl.UTF-8
6861f1fc
ER
105Statyczna biblioteka fdt.
106
2b797ed5 107%package -n python-libfdt
cd1c3a73
JB
108Summary: Python 2 binding for fdt library
109Summary(pl.UTF-8): Wiązanie Pythona 2 do biblioteki fdt
2b797ed5
JB
110License: GPL v2+ or BSD
111Group: Libraries/Python
112
113%description -n python-libfdt
cd1c3a73 114Python 2 binding for fdt library.
2b797ed5
JB
115
116%description -n python-libfdt -l pl.UTF-8
cd1c3a73
JB
117Wiązanie Pythona 2 do biblioteki fdt.
118
119%package -n python3-libfdt
120Summary: Python 3 binding for fdt library
121Summary(pl.UTF-8): Wiązanie Pythona 3 do biblioteki fdt
122License: GPL v2+ or BSD
123Group: Libraries/Python
124
125%description -n python3-libfdt
126Python 3 binding for fdt library.
127
128%description -n python3-libfdt -l pl.UTF-8
129Wiązanie Pythona 3 do biblioteki fdt.
2b797ed5 130
6861f1fc 131%prep
cc076a48 132%setup -q
2b797ed5 133%patch0 -p1
20819d95 134%patch1 -p1
6861f1fc
ER
135
136%build
6a971399 137%{__make} -j1 \
6861f1fc
ER
138 %{?with_verbose:V=1} \
139 CC="%{__cc}" \
2b797ed5 140 CFLAGS="%{rpmcflags} -fPIC" \
cd1c3a73
JB
141 NO_PYTHON=1
142
143%if %{with python}
20819d95 144export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
cd1c3a73
JB
145%if %{with python2}
146%py_build
147%endif
148%if %{with python3}
149%py3_build
150%endif
151%endif
6861f1fc
ER
152
153%install
154rm -rf $RPM_BUILD_ROOT
6a971399 155
b16cce73 156%{__make} -j1 install \
cff8604d 157 DESTDIR=$RPM_BUILD_ROOT \
6861f1fc
ER
158 %{?with_verbose:V=1} \
159 PREFIX=%{_prefix} \
2b797ed5 160 LIBDIR=%{_libdir} \
cd1c3a73 161 NO_PYTHON=1 \
2b797ed5
JB
162 SETUP_PREFIX=%{_prefix}
163
164%if %{with python}
20819d95 165export SETUPTOOLS_SCM_PRETEND_VERSION=%{version}
cd1c3a73
JB
166%if %{with python2}
167%py_install
168
2b797ed5
JB
169%py_postclean
170%endif
cd1c3a73
JB
171%if %{with python3}
172%py3_install
173%endif
174%endif
6861f1fc
ER
175
176%clean
177rm -rf $RPM_BUILD_ROOT
178
f18f0eaf 179%post -n libfdt -p /sbin/ldconfig
cff8604d 180%postun -n libfdt -p /sbin/ldconfig
fad8e447 181
6861f1fc
ER
182%files
183%defattr(644,root,root,755)
20819d95 184%doc README.license README.md
fad8e447 185%attr(755,root,root) %{_bindir}/convert-dtsv0
6861f1fc 186%attr(755,root,root) %{_bindir}/dtc
fad8e447 187%attr(755,root,root) %{_bindir}/dtdiff
cc076a48
JB
188%attr(755,root,root) %{_bindir}/fdtdump
189%attr(755,root,root) %{_bindir}/fdtget
2b797ed5 190%attr(755,root,root) %{_bindir}/fdtoverlay
cc076a48 191%attr(755,root,root) %{_bindir}/fdtput
fad8e447
JR
192
193%files -n libfdt
194%defattr(644,root,root,755)
3c2ba202 195%attr(755,root,root) %{_libdir}/libfdt-%{abi_ver}.so
fad8e447 196%attr(755,root,root) %ghost %{_libdir}/libfdt.so.1
6861f1fc 197
fad8e447 198%files -n libfdt-devel
6861f1fc 199%defattr(644,root,root,755)
cff8604d 200%doc TODO Documentation/manual.txt
fad8e447 201%attr(755,root,root) %{_libdir}/libfdt.so
6861f1fc
ER
202%{_includedir}/fdt.h
203%{_includedir}/libfdt.h
cc076a48 204%{_includedir}/libfdt_env.h
6861f1fc 205
fad8e447 206%files -n libfdt-static
6861f1fc
ER
207%defattr(644,root,root,755)
208%{_libdir}/libfdt.a
2b797ed5 209
cd1c3a73 210%if %{with python2}
2b797ed5
JB
211%files -n python-libfdt
212%defattr(644,root,root,755)
213%attr(755,root,root) %{py_sitedir}/_libfdt.so
668ea320 214%{py_sitedir}/libfdt.py[co]
8e4d820d 215%{py_sitedir}/libfdt-%{abi_ver}*.egg-info
cd1c3a73
JB
216%endif
217
218%if %{with python3}
219%files -n python3-libfdt
220%defattr(644,root,root,755)
221%attr(755,root,root) %{py3_sitedir}/_libfdt.cpython-*.so
222%{py3_sitedir}/libfdt.py
223%{py3_sitedir}/__pycache__/libfdt.cpython-*.py[co]
8e4d820d 224%{py3_sitedir}/libfdt-%{abi_ver}*.egg-info
2b797ed5 225%endif
This page took 0.131951 seconds and 4 git commands to generate.