File mingw64-libftdi.spec of Package mingw64-libftdi

#
# spec file for package mingw64-libftdi
#
# Copyright (c) 2015, Martin Hauke <mardnh@gmx.de>
#
# 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/
#

%define soname 1
%define realname  libftdi
Name:           mingw64-%{realname}
Version:        1.2
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:          System Environment/Libraries
Url:            http://www.intra2net.com/de/produkte/opensource/ftdi/
Source:         %{realname}%{soname}-%{version}.tar.bz2
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-boost-devel
BuildRequires:  mingw64-libusb-1_0-devel
BuildRequires:  mingw64-filesystem
BuildRequires:  mingw64-cross-cmake
BuildArch:      noarch
%_mingw64_package_header_debug
%_mingw64_debug_package

%description
A library (using libusb) to talk to FTDI's FT2232C,
FT232BM and FT245BM type chips including the popular bitbang mode.


%package -n mingw64-%{realname}%{soname}
Summary:        Library to program and control the FTDI USB controller
Group:          System/Libraries

%description -n mingw64-%{realname}%{soname}
Library to program and control the FTDI USB controller.
This library is used by many programs accessing FTDI USB-to-RS232 converters.


%package -n mingw64-%{realname}%{soname}-devel
Summary:        Header files and static libraries for libftdi
Group:          Development/Libraries/C and C++
Requires:       mingw64-%{realname}%{soname} = %{version}

%description -n mingw64-%{realname}%{soname}-devel
Header files and static libraries for libftdi.
This library is used by many programs accessing FTDI USB-to-RS232 converters.

%prep
%setup -q -n %{realname}%{soname}-%{version}

%build
%{_mingw64_cmake}
%{_mingw64_cmake_build}

%install
%{_mingw64_cmake_install}
# remove uneeded files
rm %buildroot/%{_mingw64_libdir}/libftdi1.a
rm %buildroot/%{_mingw64_libdir}/libftdipp1.a

%files -n mingw64-%{realname}%{soname}
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING.GPL COPYING.LIB README
%{_mingw64_bindir}/libftdi1-config
%{_mingw64_bindir}/libftdi1.dll
%{_mingw64_bindir}/libftdipp1.dll

%files -n mingw64-%{realname}%{soname}-devel
%defattr(-,root,root)
%dir %{_mingw64_includedir}/libftdi1
%{_mingw64_includedir}/libftdi1/ftdi.h
%{_mingw64_includedir}/libftdi1/ftdi.hpp
%{_mingw64_libdir}/libftdi1.dll.a
%{_mingw64_libdir}/libftdipp1.dll.a
%{_mingw64_libdir}/pkgconfig/libftdi1.pc
%{_mingw64_libdir}/pkgconfig/libftdipp1.pc
%dir %{_mingw64_libdir}/cmake
%dir %{_mingw64_libdir}/cmake/libftdi1
%{_mingw64_libdir}/cmake/libftdi1/*.cmake

%changelog
openSUSE Build Service is sponsored by