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