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