]> git.pld-linux.org Git - packages/libftdi1.git/blob - libftdi1.spec
- rebuild with python 3.8
[packages/libftdi1.git] / libftdi1.spec
1 #
2 # Conditional build:
3 %bcond_without  python2         # Python 2 module
4 %bcond_without  python3         # Python 3 module
5
6 Summary:        Library to talk to FTDI's chips including the popular bitbang mode
7 Summary(pl.UTF-8):      Biblioteka do komunikacji z układami FTDI włącznie z trybem bitbang
8 Name:           libftdi1
9 Version:        1.4
10 Release:        4
11 License:        LGPL v2
12 Group:          Libraries
13 #Source0Download: https://www.intra2net.com/en/developer/libftdi/download.php
14 Source0:        https://www.intra2net.com/en/developer/libftdi/download/%{name}-%{version}.tar.bz2
15 # Source0-md5:  0c09fb2bb19a57c839fa6845c6c780a2
16 Patch0:         %{name}-python.patch
17 URL:            https://www.intra2net.com/en/developer/libftdi/
18 BuildRequires:  boost-devel >= 1.33
19 BuildRequires:  cmake >= 2.6
20 BuildRequires:  doxygen
21 BuildRequires:  libconfuse-devel
22 BuildRequires:  libstdc++-devel
23 BuildRequires:  libusb-devel >= 1.0.0
24 BuildRequires:  pkgconfig
25 %{?with_python2:BuildRequires:  python-devel >= 1:2.6}
26 %{?with_python3:BuildRequires:  python3-devel >= 1:3.3}
27 BuildRequires:  rpmbuild(macros) >= 1.605
28 BuildRequires:  swig-python
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 libftdi1 is a library (using libusb) to talk to FTDI's UART/FIFO chips
33 including the popular bitbang mode. The following chips are supported:
34 - FT4232H / FT2232H
35 - FT232R / FT245R
36 - FT2232L / FT2232D / FT2232C
37 - FT232BM / FT245BM (and the BL/BQ variants)
38 - FT8U232AM / FT8U245AM
39
40 %description -l pl.UTF-8
41 libftdi1 to korzystająca z libusb biblioteka, służąca do komunikacji z
42 układami FTDI typu UART/FIFO, włącznie z popularnym trybem bitbang.
43 Obsługiwane są układy:
44 - FT4232H / FT2232H
45 - FT232R / FT245R
46 - FT2232L / FT2232D / FT2232C
47 - FT232BM / FT245BM (wraz z wariantami BL/BQ)
48 - FT8U232AM / FT8U245AM
49
50 %package devel
51 Summary:        Header files for libftdi1 library
52 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libftdi1
53 License:        LGPL v2
54 Group:          Development/Libraries
55 Requires:       %{name} = %{version}-%{release}
56 Requires:       libusb-devel >= 1.0.0
57
58 %description devel
59 Header files for libftdi1 library.
60
61 %description devel -l pl.UTF-8
62 Pliki nagłówkowe biblioteki libftdi1.
63
64 %package static
65 Summary:        Static libftdi1 library
66 Summary(pl.UTF-8):      Statyczna biblioteka libftdi1
67 License:        LGPL v2
68 Group:          Development/Libraries
69 Requires:       %{name}-devel = %{version}-%{release}
70
71 %description static
72 Static libftdi1 library.
73
74 %description static -l pl.UTF-8
75 Statyczna biblioteka libftdi1.
76
77 %package c++
78 Summary:        C++ wrapper for libftdi1
79 Summary(pl.UTF-8):      Interfejs C++ do libftdi1
80 License:        GPL v2 with linking exception
81 Group:          Libraries
82 Requires:       %{name} = %{version}-%{release}
83
84 %description c++
85 libftdipp1 - C++ wrapper for libftdi1.
86
87 %description c++ -l pl.UTF-8
88 libftdipp1 - intefejs C++ do libftdi1.
89
90 %package c++-devel
91 Summary:        Header file for libftdipp1 library
92 Summary(pl.UTF-8):      Plik nagłówkowy biblioteki libftdipp1
93 License:        GPL v2 with linking exception
94 Group:          Development/Libraries
95 Requires:       %{name}-c++ = %{version}-%{release}
96 Requires:       %{name}-devel = %{version}-%{release}
97 Requires:       boost-devel >= 1.33
98 Requires:       libstdc++-devel
99
100 %description c++-devel
101 Header file for libftdipp1 library.
102
103 %description c++-devel -l pl.UTF-8
104 Plik nagłówkowy biblioteki libftdipp1.
105
106 %package c++-static
107 Summary:        Static libftdipp1 library
108 Summary(pl.UTF-8):      Statyczna biblioteka libftdipp1
109 License:        GPL v2 with linking exception
110 Group:          Development/Libraries
111 Requires:       %{name}-c++-devel = %{version}-%{release}
112
113 %description c++-static
114 Static libftdipp1 library.
115
116 %description c++-static -l pl.UTF-8
117 Statyczna biblioteka libftdipp1.
118
119 %package -n python-libftdi1
120 Summary:        Python 2 binding for libftdi1
121 Summary(pl.UTF-8):      Wiązanie Pythona 2 do libftdi1
122 Group:          Libraries/Python
123 Requires:       %{name} = %{version}-%{release}
124
125 %description -n python-libftdi1
126 Python 2 binding for libftdi1.
127
128 %description -n python-libftdi1 -l pl.UTF-8
129 Wiązanie Pythona 2 do libftdi1.
130
131 %package -n python3-libftdi1
132 Summary:        Python 3 binding for libftdi1
133 Summary(pl.UTF-8):      Wiązanie Pythona 3 do libftdi1
134 Group:          Libraries/Python
135 Requires:       %{name} = %{version}-%{release}
136
137 %description -n python3-libftdi1
138 Python 3 binding for libftdi1.
139
140 %description -n python3-libftdi1 -l pl.UTF-8
141 Wiązanie Pythona 3 do libftdi1.
142
143 %prep
144 %setup -q
145 %patch0 -p1
146
147 %build
148 install -d build-doc
149 cd build-doc
150 %cmake .. \
151         -DDOCUMENTATION:BOOL=ON \
152         -DEXAMPLES:BOOL=OFF \
153         -DPYTHON_BINDINGS:BOOL=OFF
154 %{__make} docs
155 cd ..
156
157 %if %{with python2}
158 install -d build-py2
159 cd build-py2
160 %cmake .. \
161         -DDOCUMENTATION:BOOL=OFF \
162         -DEXAMPLES:BOOL=OFF \
163         -DPYTHON_EXECUTABLE=%{__python}
164 %{__make}
165 cd ..
166 %endif
167
168 %if %{with python3}
169 install -d build-py3
170 cd build-py3
171 %cmake .. \
172         -DDOCUMENTATION:BOOL=OFF \
173         -DEXAMPLES:BOOL=OFF \
174         -DPYTHON_EXECUTABLE=%{__python3}
175 %{__make}
176 cd ..
177 %endif
178
179 %install
180 rm -rf $RPM_BUILD_ROOT
181
182 %if %{with python3}
183 %{__make} -C build-py3 install \
184         DESTDIR="$RPM_BUILD_ROOT"
185 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
186 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
187 %endif
188
189 %if %{with python2}
190 %{__make} -C build-py2 install \
191         DESTDIR="$RPM_BUILD_ROOT"
192 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
193 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
194 %py_postclean
195 %endif
196
197 %clean
198 rm -rf $RPM_BUILD_ROOT
199
200 %post   -p /sbin/ldconfig
201 %postun -p /sbin/ldconfig
202
203 %post   c++ -p /sbin/ldconfig
204 %postun c++ -p /sbin/ldconfig
205
206 %files
207 %defattr(644,root,root,755)
208 %doc AUTHORS ChangeLog LICENSE README build-doc/doc/html
209 %attr(755,root,root) %{_libdir}/libftdi1.so.*.*.*
210 %attr(755,root,root) %ghost %{_libdir}/libftdi1.so.2
211
212 %files devel
213 %defattr(644,root,root,755)
214 %attr(755,root,root) %{_bindir}/ftdi_eeprom
215 %attr(755,root,root) %{_bindir}/libftdi1-config
216 %attr(755,root,root) %{_libdir}/libftdi1.so
217 %dir %{_includedir}/libftdi1
218 %{_includedir}/libftdi1/ftdi.h
219 %{_pkgconfigdir}/libftdi1.pc
220 %dir %{_libdir}/cmake/libftdi1
221 %{_libdir}/cmake/libftdi1/*.cmake
222 %dir %{_datadir}/libftdi
223 %dir %{_datadir}/libftdi/examples
224 %{_datadir}/libftdi/examples/*.py
225
226 %files static
227 %defattr(644,root,root,755)
228 %{_libdir}/libftdi1.a
229
230 %files c++
231 %defattr(644,root,root,755)
232 %attr(755,root,root) %{_libdir}/libftdipp1.so.*.*.*
233 %attr(755,root,root) %ghost %{_libdir}/libftdipp1.so.3
234
235 %files c++-devel
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{_libdir}/libftdipp1.so
238 %{_includedir}/libftdi1/ftdi.hpp
239 %{_pkgconfigdir}/libftdipp1.pc
240
241 %files c++-static
242 %defattr(644,root,root,755)
243 %{_libdir}/libftdipp1.a
244
245 %if %{with python2}
246 %files -n python-libftdi1
247 %defattr(644,root,root,755)
248 %attr(755,root,root) %{py_sitedir}/_ftdi1.so
249 %{py_sitedir}/ftdi1.py[co]
250 %endif
251
252 %if %{with python3}
253 %files -n python3-libftdi1
254 %defattr(644,root,root,755)
255 %attr(755,root,root) %{py3_sitedir}/_ftdi1.so
256 %{py3_sitedir}/ftdi1.py
257 %{py3_sitedir}/__pycache__/ftdi1.cpython-*.py[co]
258 %endif
This page took 0.093186 seconds and 4 git commands to generate.