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