libftdi1/libftdi1.spec
Tomáš Chvátal 84c0dcb7a6 Accepting request 788110 from home:pluskalm:branches:hardware
- Cleanup spec file - drop obsolete conditionals and use modern
  macros
- Run tests
- Dont build static libraries

OBS-URL: https://build.opensuse.org/request/show/788110
OBS-URL: https://build.opensuse.org/package/show/hardware/libftdi1?expand=0&rev=28
2020-03-25 12:56:20 +00:00

123 lines
3.5 KiB
RPMSpec

#
# spec file for package libftdi1
#
# Copyright (c) 2020 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define sover -2
%define libname %{name}%{sover}
Name: libftdi1
Version: 1.4
Release: 0
Summary: Library to program and control the FTDI USB controller
License: LGPL-2.1-or-later AND GPL-2.0-with-classpath-exception
Group: Hardware/Other
URL: https://www.intra2net.com/en/developer/libftdi
Source: http://www.intra2net.com/en/developer/libftdi/download/libftdi1-%{version}.tar.bz2
# PATCH-FIX-UPSTREAM libftdi-cmake.patch -- CMake: move options to a dedicated file
Patch1: libftdi-cmake.patch
BuildRequires: cmake >= 2.8
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: libboost_headers-devel
BuildRequires: libboost_test-devel
BuildRequires: pkgconfig
BuildRequires: python3-xml
BuildRequires: swig
BuildRequires: pkgconfig(libconfuse)
BuildRequires: pkgconfig(libusb-1.0)
BuildRequires: pkgconfig(python3)
%description
Library to program and control the FTDI USB controller.
This library is used by many programs accessing FTDI USB-to-RS232 converters.
%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.
%package -n python3-%{name}
Summary: Python 3 binding for libftdi1
Group: Development/Languages/Python
%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.
%package devel
Summary: Header files and static libraries for libftdi
Group: Development/Libraries/C and C++
Requires: %{libname} = %{version}
Requires: pkgconfig(libusb-1.0)
%description devel
Header files and static libraries for libftdi.
This library is used by many programs accessing FTDI USB-to-RS232 converters.
%prep
%setup -q
%patch1 -p1
%build
%cmake \
-DDOCUMENTATION=ON \
-DFTDI_EEPROM=ON \
-DPYTHON_BINDINGS=ON \
-DBUILD_TESTS=ON \
-DSTATICLIBS=OFF \
-Wno-dev
%cmake_build
%install
%cmake_install
rm -rf %{buildroot}%{_datadir}
mkdir -p %{buildroot}%{_mandir}/man3
install -pm 0644 build/doc/man/man3/[^_]*.3 \
%{buildroot}%{_mandir}/man3
%check
make -C build check
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%files -n %{libname}
%license COPYING* LICENSE
%doc AUTHORS README
%{_libdir}/libftdi*.so.*
%files -n python3-%{name}
%doc python/examples/*.py
%{python3_sitearch}/_ftdi1.so
%{python3_sitearch}/ftdi1.py
%files devel
%doc ftdi_eeprom/example.conf
%{_bindir}/libftdi*-config
%{_bindir}/ftdi_eeprom
%{_includedir}/%{name}
%{_libdir}/libftdi*.so
%{_libdir}/pkgconfig/libftdi*.pc
%{_libdir}/cmake/%{name}
%{_mandir}/man3/*%{ext_man}
%changelog