]> git.pld-linux.org Git - packages/libftdi1.git/blob - libftdi1.spec
- updated to 1.3
[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.3
10 Release:        1
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:  156cdf40cece9f8a3ce1582db59a502a
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 %if %{with python2}
149 install -d build-py2
150 cd build-py2
151 %cmake .. \
152         -DEXAMPLES=OFF \
153         -DPYTHON_EXECUTABLE=%{__python}
154 %{__make}
155 cd ..
156 %endif
157
158 %if %{with python3}
159 install -d build-py3
160 cd build-py3
161 %cmake .. \
162         -DEXAMPLES=OFF \
163         -DPYTHON_EXECUTABLE=%{__python3}
164 %{__make}
165 cd ..
166 %endif
167
168 %install
169 rm -rf $RPM_BUILD_ROOT
170
171 %if %{with python3}
172 %{__make} -C build-py3 install \
173         DESTDIR="$RPM_BUILD_ROOT"
174 %py3_comp $RPM_BUILD_ROOT%{py3_sitedir}
175 %py3_ocomp $RPM_BUILD_ROOT%{py3_sitedir}
176 %endif
177
178 %if %{with python2}
179 %{__make} -C build-py2 install \
180         DESTDIR="$RPM_BUILD_ROOT"
181 %py_comp $RPM_BUILD_ROOT%{py_sitedir}
182 %py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
183 %py_postclean
184 %endif
185
186 %clean
187 rm -rf $RPM_BUILD_ROOT
188
189 %post   -p /sbin/ldconfig
190 %postun -p /sbin/ldconfig
191
192 %post   c++ -p /sbin/ldconfig
193 %postun c++ -p /sbin/ldconfig
194
195 %files
196 %defattr(644,root,root,755)
197 %doc AUTHORS ChangeLog LICENSE README %{?with_python2:build-py2}%{!?with_python2:build-py3}/doc/html
198 %attr(755,root,root) %{_libdir}/libftdi1.so.*.*.*
199 %attr(755,root,root) %ghost %{_libdir}/libftdi1.so.2
200
201 %files devel
202 %defattr(644,root,root,755)
203 %attr(755,root,root) %{_bindir}/ftdi_eeprom
204 %attr(755,root,root) %{_bindir}/libftdi1-config
205 %attr(755,root,root) %{_libdir}/libftdi1.so
206 %dir %{_includedir}/libftdi1
207 %{_includedir}/libftdi1/ftdi.h
208 %{_pkgconfigdir}/libftdi1.pc
209 %dir %{_libdir}/cmake/libftdi1
210 %{_libdir}/cmake/libftdi1/*.cmake
211 %dir %{_datadir}/libftdi
212 %dir %{_datadir}/libftdi/examples
213 %{_datadir}/libftdi/examples/*.py
214
215 %files static
216 %defattr(644,root,root,755)
217 %{_libdir}/libftdi1.a
218
219 %files c++
220 %defattr(644,root,root,755)
221 %attr(755,root,root) %{_libdir}/libftdipp1.so.*.*.*
222 %attr(755,root,root) %ghost %{_libdir}/libftdipp1.so.2
223
224 %files c++-devel
225 %defattr(644,root,root,755)
226 %attr(755,root,root) %{_libdir}/libftdipp1.so
227 %{_includedir}/libftdi1/ftdi.hpp
228 %{_pkgconfigdir}/libftdipp1.pc
229
230 %files c++-static
231 %defattr(644,root,root,755)
232 %{_libdir}/libftdipp1.a
233
234 %if %{with python2}
235 %files -n python-libftdi1
236 %defattr(644,root,root,755)
237 %attr(755,root,root) %{py_sitedir}/_ftdi1.so
238 %{py_sitedir}/ftdi1.py[co]
239 %endif
240
241 %if %{with python3}
242 %files -n python3-libftdi1
243 %defattr(644,root,root,755)
244 %attr(755,root,root) %{py3_sitedir}/_ftdi1.so
245 %{py3_sitedir}/ftdi1.py
246 %{py3_sitedir}/__pycache__/ftdi1.cpython-*.py[co]
247 %endif
This page took 0.091817 seconds and 4 git commands to generate.