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