2011-02-02 02:08:03 +01:00
|
|
|
#
|
|
|
|
# spec file for package libftdi1
|
|
|
|
#
|
2018-04-08 08:43:23 +02:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-02-02 02:08:03 +01:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2017-07-12 14:19:13 +02:00
|
|
|
%define sover -2
|
|
|
|
%define libname %{name}%{sover}
|
2011-02-02 02:08:03 +01:00
|
|
|
Name: libftdi1
|
2017-11-16 12:23:13 +01:00
|
|
|
Version: 1.4
|
2013-01-03 01:13:10 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Library to program and control the FTDI USB controller
|
2017-11-16 12:23:13 +01:00
|
|
|
License: LGPL-2.1+ AND GPL-2.0-with-classpath-exception
|
2011-02-02 02:08:03 +01:00
|
|
|
Group: Hardware/Other
|
|
|
|
Url: http://www.intra2net.com/en/developer/libftdi
|
2014-10-01 16:01:22 +02:00
|
|
|
Source: http://www.intra2net.com/en/developer/libftdi/download/libftdi1-%{version}.tar.bz2
|
2018-04-08 08:43:23 +02:00
|
|
|
# PATCH-FIX-UPSTREAM libftdi-cmake.patch -- CMake: move options to a dedicated file
|
|
|
|
Patch1: libftdi-cmake.patch
|
2014-10-01 16:01:22 +02:00
|
|
|
BuildRequires: cmake >= 2.8
|
2013-01-03 01:13:10 +01:00
|
|
|
BuildRequires: doxygen
|
2014-10-01 16:01:22 +02:00
|
|
|
BuildRequires: gcc-c++
|
2016-06-14 07:31:49 +02:00
|
|
|
BuildRequires: libconfuse-devel
|
2014-10-01 16:01:22 +02:00
|
|
|
BuildRequires: libusb-1_0-devel
|
2013-01-03 01:13:10 +01:00
|
|
|
BuildRequires: pkgconfig
|
2017-11-16 12:23:13 +01:00
|
|
|
BuildRequires: swig
|
|
|
|
%if 0%{?suse_version} > 1325
|
|
|
|
BuildRequires: libboost_headers-devel
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-xml
|
|
|
|
%else
|
|
|
|
BuildRequires: boost-devel
|
2016-06-14 07:31:49 +02:00
|
|
|
BuildRequires: python-devel
|
|
|
|
BuildRequires: python-xml
|
2017-11-16 12:23:13 +01:00
|
|
|
%endif
|
2010-12-21 17:30:29 +01:00
|
|
|
|
2016-06-14 07:31:49 +02:00
|
|
|
%description
|
|
|
|
Library to program and control the FTDI USB controller.
|
|
|
|
This library is used by many programs accessing FTDI USB-to-RS232 converters.
|
|
|
|
|
2017-07-12 14:19:13 +02:00
|
|
|
%package -n %{libname}
|
|
|
|
Summary: Library to program and control the FTDI USB controller
|
|
|
|
Group: System/Libraries
|
|
|
|
|
|
|
|
%description -n %{libname}
|
|
|
|
Library to program and control the FTDI USB controller.
|
|
|
|
This library is used by many programs accessing FTDI USB-to-RS232 converters.
|
|
|
|
|
2017-11-16 12:23:13 +01:00
|
|
|
%if 0%{?suse_version} > 1325
|
|
|
|
%package -n python3-%{name}
|
|
|
|
Summary: Python 3 binding for libftdi1
|
|
|
|
Group: Development/Languages/Python
|
2017-07-12 14:19:13 +02:00
|
|
|
|
2017-11-16 12:23:13 +01:00
|
|
|
%description -n python3-%{name}
|
|
|
|
Library to program and control the FTDI USB controller.
|
|
|
|
This library is used by many programs accessing FTDI USB-to-RS232 converters.
|
|
|
|
|
|
|
|
This package provides the python binding for libftdi.
|
|
|
|
%else
|
|
|
|
%package -n python2-%{name}
|
|
|
|
Summary: Python 2 binding for libftdi1
|
2016-06-14 07:31:49 +02:00
|
|
|
Group: Development/Languages/Python
|
2017-11-16 12:23:13 +01:00
|
|
|
Provides: binding-python = %{version}
|
|
|
|
Obsoletes: binding-python < %{version}
|
2016-06-14 07:31:49 +02:00
|
|
|
|
2017-11-16 12:23:13 +01:00
|
|
|
%description -n python2-%{name}
|
2016-06-14 07:31:49 +02:00
|
|
|
Library to program and control the FTDI USB controller.
|
|
|
|
This library is used by many programs accessing FTDI USB-to-RS232 converters.
|
|
|
|
|
|
|
|
This package provides the python binding for libftdi.
|
2017-11-16 12:23:13 +01:00
|
|
|
%endif
|
2016-06-14 07:31:49 +02:00
|
|
|
|
2017-07-12 14:19:13 +02:00
|
|
|
%package devel
|
2011-02-02 02:08:03 +01:00
|
|
|
Summary: Header files and static libraries for libftdi
|
|
|
|
Group: Development/Libraries/C and C++
|
2017-07-12 14:19:13 +02:00
|
|
|
Requires: %{libname} = %{version}
|
2014-10-01 16:01:22 +02:00
|
|
|
Requires: libusb-1_0-devel
|
2010-12-21 17:30:29 +01:00
|
|
|
|
2017-07-12 14:19:13 +02:00
|
|
|
%description devel
|
2010-12-21 17:30:29 +01:00
|
|
|
Header files and static libraries for libftdi.
|
|
|
|
This library is used by many programs accessing FTDI USB-to-RS232 converters.
|
|
|
|
|
|
|
|
%prep
|
2014-10-01 16:01:22 +02:00
|
|
|
%setup -q
|
2018-04-08 08:43:23 +02:00
|
|
|
%autopatch -p1
|
2010-12-21 17:30:29 +01:00
|
|
|
|
|
|
|
%build
|
2018-04-08 08:43:23 +02:00
|
|
|
%cmake \
|
|
|
|
-DDOCUMENTATION=ON \
|
|
|
|
-DFTDI_EEPROM=ON \
|
|
|
|
-DPYTHON_BINDINGS=ON
|
2017-11-16 12:23:13 +01:00
|
|
|
%make_jobs
|
2010-12-21 17:30:29 +01:00
|
|
|
|
|
|
|
%install
|
2014-12-27 13:43:15 +01:00
|
|
|
%cmake_install
|
2016-06-14 07:31:49 +02:00
|
|
|
rm -rf %{buildroot}%{_datadir}
|
2013-01-03 01:13:10 +01:00
|
|
|
mkdir -p %{buildroot}%{_mandir}/man3
|
2014-12-27 13:43:15 +01:00
|
|
|
cd build
|
2014-10-01 16:01:22 +02:00
|
|
|
cp -p doc/man/man3/[^_]*.3 %{buildroot}%{_mandir}/man3
|
2016-06-14 07:31:49 +02:00
|
|
|
find %{buildroot} -type f -name "*.a" -delete -print
|
|
|
|
find %{buildroot} -type f -name "*.la" -delete -print
|
2010-12-21 17:30:29 +01:00
|
|
|
|
2017-07-12 14:19:13 +02:00
|
|
|
%post -n %{libname} -p /sbin/ldconfig
|
|
|
|
%postun -n %{libname} -p /sbin/ldconfig
|
2010-12-21 17:30:29 +01:00
|
|
|
|
2017-07-12 14:19:13 +02:00
|
|
|
%files -n %{libname}
|
2013-01-03 01:13:10 +01:00
|
|
|
%doc AUTHORS COPYING* LICENSE README
|
2011-01-21 23:36:03 +01:00
|
|
|
%{_libdir}/libftdi*.so.*
|
2010-12-21 17:30:29 +01:00
|
|
|
|
2017-11-16 12:23:13 +01:00
|
|
|
%if 0%{?suse_version} > 1325
|
|
|
|
%files -n python3-%{name}
|
|
|
|
%doc python/examples/*.py
|
|
|
|
%{python3_sitearch}/_ftdi1.so
|
|
|
|
%{python3_sitearch}/ftdi1.py
|
|
|
|
%else
|
|
|
|
%files -n python2-%{name}
|
2016-06-14 07:31:49 +02:00
|
|
|
%doc python/examples/*.py
|
2017-07-12 14:19:13 +02:00
|
|
|
%{python_sitearch}/_ftdi1.so
|
|
|
|
%{python_sitearch}/ftdi1.py
|
2017-11-16 12:23:13 +01:00
|
|
|
%endif
|
2016-06-14 07:31:49 +02:00
|
|
|
|
2017-07-12 14:19:13 +02:00
|
|
|
%files devel
|
2016-06-14 07:31:49 +02:00
|
|
|
%doc ftdi_eeprom/example.conf
|
2014-10-01 16:01:22 +02:00
|
|
|
%{_bindir}/libftdi*-config
|
2016-06-14 07:31:49 +02:00
|
|
|
%{_bindir}/ftdi_eeprom
|
2014-10-01 16:01:22 +02:00
|
|
|
%{_includedir}/%{name}
|
|
|
|
%{_libdir}/libftdi*.so
|
2017-07-12 14:19:13 +02:00
|
|
|
%{_libdir}/pkgconfig/libftdi*.pc
|
2014-10-01 16:01:22 +02:00
|
|
|
%{_libdir}/cmake/%{name}
|
2017-07-12 14:19:13 +02:00
|
|
|
%{_mandir}/man3/*%{ext_man}
|
2013-01-03 01:13:10 +01:00
|
|
|
|
2011-02-02 02:08:03 +01:00
|
|
|
%changelog
|