]> git.pld-linux.org Git - packages/libftdi1.git/blob - libftdi1.spec
rebuild with python 3.10
[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.5
10 Release:        5
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:  f515d7d69170a9afc8b273e8f1466a80
16 Patch0:         %{name}-cmake.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         -DFTDIPP:BOOL=ON \
164         -DPYTHON_BINDINGS:BOOL=ON \
165         -DPYTHON_EXECUTABLE=%{__python}
166 %{__make}
167 cd ..
168 %endif
169
170 %if %{with python3}
171 install -d build-py3
172 cd build-py3
173 %cmake .. \
174         -DDOCUMENTATION:BOOL=OFF \
175         -DEXAMPLES:BOOL=OFF \
176         -DPYTHON_BINDINGS:BOOL=ON \
177         -DPYTHON_EXECUTABLE=%{__python3}
178 %{__make}
179 cd ..
180 %endif
181
182 %install
183 rm -rf $RPM_BUILD_ROOT
184
185 %if %{with python3}
186 %{__make} -C build-py3 install \
187         DESTDIR="$RPM_BUILD_ROOT"
188 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
189 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
190 %endif
191
192 %if %{with python2}
193 %{__make} -C build-py2 install \
194         DESTDIR="$RPM_BUILD_ROOT"
195 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
196 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
197 %py_postclean
198 %endif
199
200 # packaged as %doc
201 %{__rm} $RPM_BUILD_ROOT%{_docdir}/example.conf
202
203 %clean
204 rm -rf $RPM_BUILD_ROOT
205
206 %post   -p /sbin/ldconfig
207 %postun -p /sbin/ldconfig
208
209 %post   c++ -p /sbin/ldconfig
210 %postun c++ -p /sbin/ldconfig
211
212 %files
213 %defattr(644,root,root,755)
214 %doc AUTHORS ChangeLog LICENSE README build-doc/doc/html ftdi_eeprom/example.conf
215 %attr(755,root,root) %{_libdir}/libftdi1.so.*.*.*
216 %attr(755,root,root) %ghost %{_libdir}/libftdi1.so.2
217
218 %files devel
219 %defattr(644,root,root,755)
220 %attr(755,root,root) %{_bindir}/ftdi_eeprom
221 %attr(755,root,root) %{_bindir}/libftdi1-config
222 %attr(755,root,root) %{_libdir}/libftdi1.so
223 %{_includedir}/libftdi1
224 %{_pkgconfigdir}/libftdi1.pc
225 %dir %{_libdir}/cmake/libftdi1
226 %{_libdir}/cmake/libftdi1/*.cmake
227 %dir %{_datadir}/libftdi
228 %dir %{_datadir}/libftdi/examples
229 %{_datadir}/libftdi/examples/*.py
230
231 %files static
232 %defattr(644,root,root,755)
233 %{_libdir}/libftdi1.a
234
235 %files c++
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{_libdir}/libftdipp1.so.*.*.*
238 %attr(755,root,root) %ghost %{_libdir}/libftdipp1.so.3
239
240 %files c++-devel
241 %defattr(644,root,root,755)
242 %attr(755,root,root) %{_libdir}/libftdipp1.so
243 %{_includedir}/libftdipp1
244 %{_pkgconfigdir}/libftdipp1.pc
245
246 %files c++-static
247 %defattr(644,root,root,755)
248 %{_libdir}/libftdipp1.a
249
250 %if %{with python2}
251 %files -n python-libftdi1
252 %defattr(644,root,root,755)
253 %attr(755,root,root) %{py_sitedir}/_ftdi1.so
254 %{py_sitedir}/ftdi1.py[co]
255 %endif
256
257 %if %{with python3}
258 %files -n python3-libftdi1
259 %defattr(644,root,root,755)
260 %attr(755,root,root) %{py3_sitedir}/_ftdi1.so
261 %{py3_sitedir}/ftdi1.py
262 %{py3_sitedir}/__pycache__/ftdi1.cpython-*.py[co]
263 %endif
This page took 0.098877 seconds and 4 git commands to generate.