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
This commit is contained in:
parent
3344cb6db4
commit
84c0dcb7a6
@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Mar 25 08:53:42 UTC 2020 - Martin Pluskal <mpluskal@suse.com>
|
||||||
|
|
||||||
|
- Cleanup spec file - drop obsolete conditionals and use modern
|
||||||
|
macros
|
||||||
|
- Run tests
|
||||||
|
- Dont build static libraries
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Tue Jun 12 17:35:10 UTC 2018 - msuchanek@suse.com
|
Tue Jun 12 17:35:10 UTC 2018 - msuchanek@suse.com
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package libftdi1
|
# spec file for package libftdi1
|
||||||
#
|
#
|
||||||
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
# Copyright (c) 2020 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -12,7 +12,7 @@
|
|||||||
# license that conforms to the Open Source Definition (Version 1.9)
|
# license that conforms to the Open Source Definition (Version 1.9)
|
||||||
# published by the Open Source Initiative.
|
# published by the Open Source Initiative.
|
||||||
|
|
||||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
@ -24,26 +24,21 @@ Release: 0
|
|||||||
Summary: Library to program and control the FTDI USB controller
|
Summary: Library to program and control the FTDI USB controller
|
||||||
License: LGPL-2.1-or-later AND GPL-2.0-with-classpath-exception
|
License: LGPL-2.1-or-later AND GPL-2.0-with-classpath-exception
|
||||||
Group: Hardware/Other
|
Group: Hardware/Other
|
||||||
URL: http://www.intra2net.com/en/developer/libftdi
|
URL: https://www.intra2net.com/en/developer/libftdi
|
||||||
Source: http://www.intra2net.com/en/developer/libftdi/download/libftdi1-%{version}.tar.bz2
|
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
|
# PATCH-FIX-UPSTREAM libftdi-cmake.patch -- CMake: move options to a dedicated file
|
||||||
Patch1: libftdi-cmake.patch
|
Patch1: libftdi-cmake.patch
|
||||||
BuildRequires: cmake >= 2.8
|
BuildRequires: cmake >= 2.8
|
||||||
BuildRequires: doxygen
|
BuildRequires: doxygen
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
BuildRequires: libconfuse-devel
|
|
||||||
BuildRequires: libusb-1_0-devel
|
|
||||||
BuildRequires: pkgconfig
|
|
||||||
BuildRequires: swig
|
|
||||||
%if 0%{?suse_version} >= 1500
|
|
||||||
BuildRequires: libboost_headers-devel
|
BuildRequires: libboost_headers-devel
|
||||||
BuildRequires: python3-devel
|
BuildRequires: libboost_test-devel
|
||||||
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: python3-xml
|
BuildRequires: python3-xml
|
||||||
%else
|
BuildRequires: swig
|
||||||
BuildRequires: boost-devel
|
BuildRequires: pkgconfig(libconfuse)
|
||||||
BuildRequires: python-devel
|
BuildRequires: pkgconfig(libusb-1.0)
|
||||||
BuildRequires: python-xml
|
BuildRequires: pkgconfig(python3)
|
||||||
%endif
|
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Library to program and control the FTDI USB controller.
|
Library to program and control the FTDI USB controller.
|
||||||
@ -57,7 +52,6 @@ Group: System/Libraries
|
|||||||
Library to program and control the FTDI USB controller.
|
Library to program and control the FTDI USB controller.
|
||||||
This library is used by many programs accessing FTDI USB-to-RS232 converters.
|
This library is used by many programs accessing FTDI USB-to-RS232 converters.
|
||||||
|
|
||||||
%if 0%{?suse_version} >= 1500
|
|
||||||
%package -n python3-%{name}
|
%package -n python3-%{name}
|
||||||
Summary: Python 3 binding for libftdi1
|
Summary: Python 3 binding for libftdi1
|
||||||
Group: Development/Languages/Python
|
Group: Development/Languages/Python
|
||||||
@ -67,25 +61,12 @@ Library to program and control the FTDI USB controller.
|
|||||||
This library is used by many programs accessing FTDI USB-to-RS232 converters.
|
This library is used by many programs accessing FTDI USB-to-RS232 converters.
|
||||||
|
|
||||||
This package provides the python binding for libftdi.
|
This package provides the python binding for libftdi.
|
||||||
%else
|
|
||||||
%package -n python2-%{name}
|
|
||||||
Summary: Python 2 binding for libftdi1
|
|
||||||
Group: Development/Languages/Python
|
|
||||||
Provides: binding-python = %{version}
|
|
||||||
Obsoletes: binding-python < %{version}
|
|
||||||
|
|
||||||
%description -n python2-%{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.
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Header files and static libraries for libftdi
|
Summary: Header files and static libraries for libftdi
|
||||||
Group: Development/Libraries/C and C++
|
Group: Development/Libraries/C and C++
|
||||||
Requires: %{libname} = %{version}
|
Requires: %{libname} = %{version}
|
||||||
Requires: libusb-1_0-devel
|
Requires: pkgconfig(libusb-1.0)
|
||||||
|
|
||||||
%description devel
|
%description devel
|
||||||
Header files and static libraries for libftdi.
|
Header files and static libraries for libftdi.
|
||||||
@ -93,25 +74,27 @@ This library is used by many programs accessing FTDI USB-to-RS232 converters.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%if 0%{?suse_version} >= 01500
|
|
||||||
%patch1 -p1
|
%patch1 -p1
|
||||||
%endif
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%cmake \
|
%cmake \
|
||||||
-DDOCUMENTATION=ON \
|
-DDOCUMENTATION=ON \
|
||||||
-DFTDI_EEPROM=ON \
|
-DFTDI_EEPROM=ON \
|
||||||
-DPYTHON_BINDINGS=ON
|
-DPYTHON_BINDINGS=ON \
|
||||||
%make_jobs
|
-DBUILD_TESTS=ON \
|
||||||
|
-DSTATICLIBS=OFF \
|
||||||
|
-Wno-dev
|
||||||
|
%cmake_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%cmake_install
|
%cmake_install
|
||||||
rm -rf %{buildroot}%{_datadir}
|
rm -rf %{buildroot}%{_datadir}
|
||||||
mkdir -p %{buildroot}%{_mandir}/man3
|
mkdir -p %{buildroot}%{_mandir}/man3
|
||||||
cd build
|
install -pm 0644 build/doc/man/man3/[^_]*.3 \
|
||||||
cp -p doc/man/man3/[^_]*.3 %{buildroot}%{_mandir}/man3
|
%{buildroot}%{_mandir}/man3
|
||||||
find %{buildroot} -type f -name "*.a" -delete -print
|
|
||||||
find %{buildroot} -type f -name "*.la" -delete -print
|
%check
|
||||||
|
make -C build check
|
||||||
|
|
||||||
%post -n %{libname} -p /sbin/ldconfig
|
%post -n %{libname} -p /sbin/ldconfig
|
||||||
%postun -n %{libname} -p /sbin/ldconfig
|
%postun -n %{libname} -p /sbin/ldconfig
|
||||||
@ -121,17 +104,10 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
|||||||
%doc AUTHORS README
|
%doc AUTHORS README
|
||||||
%{_libdir}/libftdi*.so.*
|
%{_libdir}/libftdi*.so.*
|
||||||
|
|
||||||
%if 0%{?suse_version} >= 1500
|
|
||||||
%files -n python3-%{name}
|
%files -n python3-%{name}
|
||||||
%doc python/examples/*.py
|
%doc python/examples/*.py
|
||||||
%{python3_sitearch}/_ftdi1.so
|
%{python3_sitearch}/_ftdi1.so
|
||||||
%{python3_sitearch}/ftdi1.py
|
%{python3_sitearch}/ftdi1.py
|
||||||
%else
|
|
||||||
%files -n python2-%{name}
|
|
||||||
%doc python/examples/*.py
|
|
||||||
%{python_sitearch}/_ftdi1.so
|
|
||||||
%{python_sitearch}/ftdi1.py
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%doc ftdi_eeprom/example.conf
|
%doc ftdi_eeprom/example.conf
|
||||||
|
Loading…
x
Reference in New Issue
Block a user