File mingw64-libxtrx.spec of Package mingw64-libxtrx

#
# spec file for package mingw64-libxtrx
#
# Copyright (c) 2019, 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 sover   0
%define libname libxtrx%{sover}
%define realname  libxtrx
Name:           mingw64-%{realname}
Version:        0.0.0+git.20181227
Release:        0
Summary:        High level XTRX API
License:        LGPL-2.1-only
Group:          Development/Libraries/C and C++
URL:            http://xtrx.io
#Git-Clone:     https://github.com/xtrx-sdr/libxtrx.git
Source:         %{realname}-%{version}.tar.xz
Patch0:         libxtrx-fix-include.patch
BuildRequires:  cmake
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-filesystem
BuildRequires:  mingw64-libxtrxdsp-devel
BuildRequires:  mingw64-libxtrxll-devel
BuildRequires:  mingw64-liblms7002m-devel
%{_mingw64_package_header_debug}
%{_mingw64_debug_package}

%description
High level XTRX API.

%package -n  mingw64-%{libname}
Summary:        High level XTRX API
Group:          System/Libraries

%description -n mingw64-%{libname}
High level XTRX API.

%package -n mingw64-%{realname}-devel
Summary:        Development files for libxtrx
Group:          Development/Libraries/C and C++
Requires:       mingw64-%{libname} = %{version}

%description -n mingw64-%{realname}-devel
High level XTRX API.

This subpackage contains libraries and header files for developing
applications that want to make use of libxtrx.

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

%build
%{_mingw64_cmake} \
    -DFORCE_ARCH=x86_64 \
    -DENABLE_SOAPY=OFF
%{_mingw64_make} %{?_smp_mflags}

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}

%files -n mingw64-%{libname}
%{_mingw64_libdir}/libxtrx.dll
## tools
%dir %{_mingw64_libdir}/xtrx
%{_mingw64_libdir}/xtrx/test_xtrx.exe

%files -n mingw64-%{realname}-devel
%doc LICENSE README.md
%{_mingw64_includedir}/xtrx_api.h
%{_mingw64_libdir}/libxtrx.dll.a
%{_mingw64_libdir}/pkgconfig/libxtrx.pc

%changelog
openSUSE Build Service is sponsored by