File mingw32-bladeRF.spec of Package mingw32-bladeRF

#
# spec file for package mingw32-bladeRF
#
# 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 bladeRF
Name:           mingw32-%{realname}
Version:        2015.07.git1441732555.d6da0f7
Release:        0
Summary:        Support programs for bladeRF SDR board
License:        GPL-2.0
Group:          Productivity/Hamradio/Other
Url:            https://github.com/Nuand/bladeRF
Source:         %{realname}-%{version}.tar.xz
BuildRequires:  mingw32-cross-binutils
BuildRequires:  mingw32-cross-gcc
BuildRequires:  mingw32-cross-gcc-c++
BuildRequires:  mingw32-cross-pkg-config
BuildRequires:  mingw32-boost-devel
BuildRequires:  mingw32-filesystem
BuildRequires:  mingw32-libusb-1_0-devel
BuildRequires:  mingw32-winpthreads-devel
BuildRequires:  cmake
# for git-version-gen
BuildRequires:  git-core
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:	noarch
%{_mingw32_package_header_debug}
%{_mingw32_debug_package}

%description
Support programs for bladeRF USB 3.0 Superspeed Software Defined Radio

%package -n mingw32-%{realname}%{soname}
Summary:        Library to run bladeRF SDR board
Group:          System/Libraries

%description -n mingw32-%{realname}%{soname}
Library to run bladeRF USB 3.0 Superspeed Software Defined Radio

%package devel
Summary:        Development files for the bladerf library
Group:          Development/Libraries/C and C++
Requires:       libbladeRF%{soname} = %{version}

%description devel
This subpackage contains libraries and header files for developing
applications that want to make use of libbladerf.


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

%build
cd host
%{_mingw32_cmake}
%{_mingw32_make} %{?_smp_mflags}

%install
cd host
%{_mingw32_make} DESTDIR=%{buildroot} install

%files
%defattr(-,root,root)
%{_mingw32_bindir}/bladeRF-cli.exe

%files -n mingw32-%{realname}%{soname}
%defattr(-,root,root)
%{_mingw32_libdir}/libbladeRF.dll

%files devel
%defattr(-,root,root)
%{_mingw32_includedir}/*
%{_mingw32_libdir}/libbladeRF.dll.a
%{_mingw32_libdir}/pkgconfig/libbladeRF.pc

%changelog
openSUSE Build Service is sponsored by