]> git.pld-linux.org Git - packages/dtc.git/blob - dtc.spec
- non-parallel install as well
[packages/dtc.git] / dtc.spec
1 #
2 # Conditional build:
3 %bcond_without  python          # Python module
4 %bcond_without  verbose         # verbose build (V=1)
5
6 Summary:        The Device Tree Compiler
7 Summary(pl.UTF-8):      Kompilator drzewiastej struktury urządzeń
8 Name:           dtc
9 Version:        1.5.0
10 Release:        1
11 License:        GPL v2+ (dtc), GPL v2+ or BSD (fdt library)
12 Group:          Libraries
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
17 BuildRequires:  bison
18 BuildRequires:  flex
19 BuildRequires:  tar >= 1:1.22
20 BuildRequires:  xz
21 %if %{with python}
22 BuildRequires:  python-devel >= 2
23 BuildRequires:  swig-python
24 %endif
25 Requires:       libfdt = %{version}-%{release}
26 Obsoletes:      dtc-doc < 1.3.0-2
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
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
44 %package -n libfdt
45 Summary:        Device tree library
46 Summary(pl.UTF-8):      Biblioteka drzewiastej struktury urządzeń
47 License:        GPL v2+ or BSD
48 Group:          Libraries
49 Obsoletes:      dtc-doc < 1.3.0-2
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
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}
64 Obsoletes:      dtc-devel
65 Obsoletes:      dtc-doc < 1.3.0-2
66
67 %description -n libfdt-devel
68 Header files for fdt library.
69
70 %description -n libfdt-devel -l pl.UTF-8
71 Pliki nagłówkowe biblioteki fdt.
72
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}
79 Obsoletes:      dtc-static
80
81 %description -n libfdt-static
82 Static fdt library.
83
84 %description -n libfdt-static -l pl.UTF-8
85 Statyczna biblioteka fdt.
86
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
99 %prep
100 %setup -q
101 %patch0 -p1
102
103 %build
104 %{__make} -j1 \
105         %{?with_verbose:V=1} \
106         CC="%{__cc}" \
107         CFLAGS="%{rpmcflags} -fPIC" \
108         %{!?with_python:NO_PYTHON=1}
109
110 %install
111 rm -rf $RPM_BUILD_ROOT
112
113 %{__make} -j1 install \
114         DESTDIR=$RPM_BUILD_ROOT \
115         %{?with_verbose:V=1} \
116         PREFIX=%{_prefix} \
117         LIBDIR=%{_libdir} \
118         %{!?with_python:NO_PYTHON=1} \
119         SETUP_PREFIX=%{_prefix}
120
121 %if %{with python}
122 %py_postclean
123 %endif
124
125 %clean
126 rm -rf $RPM_BUILD_ROOT
127
128 %post   -n libfdt -p /sbin/ldconfig
129 %postun -n libfdt -p /sbin/ldconfig
130
131 %files
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
141
142 %files -n libfdt
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
146
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
151 %{_includedir}/fdt.h
152 %{_includedir}/libfdt.h
153 %{_includedir}/libfdt_env.h
154
155 %files -n libfdt-static
156 %defattr(644,root,root,755)
157 %{_libdir}/libfdt.a
158
159 %if %{with python}
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
165 %endif
This page took 0.209582 seconds and 3 git commands to generate.