File libsdr.spec of Package libsdr

#
# spec file for package libsdr
#
# 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_1_0
%define libname libsdr%{sover}
Name:           libsdr
Version:        0.1.0
Release:        0
Summary:        A simple software defined radio (SDR) library
License:        GPL-2.0-or-later
Group:          Development/Libraries/C and C++
URL:            https://hmatuschek.github.io/libsdr
#Git-Clone:     https://github.com/hmatuschek/libsdr.git
Source:         https://github.com/hmatuschek/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0:         0001-Fix-usage-of-find_package_handle_standard_args-in-Fi.patch
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  fftw3-devel
BuildRequires:  rtl-sdr-devel
BuildRequires:  portaudio-devel

%description
A simple C++ library allowing to assemble software defined radio (SDR)
applications easily. The library is a collection of (mostly) template
classes implementing a wide varity of procssing nodes. By connecting
these processing nodes, a stream-processing chain is constructed which
turns raw input data into something meaningful.

%package -n %{libname}
Summary:        A simple software defined radio (SDR) library
Group:          System/Libraries

%description -n %{libname}
A simple C++ library allowing to assemble software defined radio (SDR)
applications easily. The library is a collection of (mostly) template
classes implementing a wide varity of procssing nodes. By connecting
these processing nodes, a stream-processing chain is constructed which
turns raw input data into something meaningful.

%package devel
Summary:        Development files for libsdr
Group:          Development/Libraries/C and C++
Requires:       %{libname} = %{version}
Requires:       pkgconfig(fftw3)
Requires:       pkgconfig(librtlsdr)
Requires:       pkgconfig(portaudio-2.0)

%description devel
A simple C++ library allowing to assemble software defined radio (SDR)
applications easily. The library is a collection of (mostly) template
classes implementing a wide varity of procssing nodes. By connecting
these processing nodes, a stream-processing chain is constructed which
turns raw input data into something meaningful.

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

%prep
%autosetup -p1

%build
%cmake \
    -DSDR_WITH_FFTW=ON \
    -DSDR_WITH_PORTAUDIO=ON \
    -DSDR_WITH_RTLSDR=ON
%cmake_build

%install
%cmake_install

%check

%post   -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig

%files -n %{libname}
%license LICENSE
%doc README.md
%{_libdir}/libsdr.so.%{version}*

%files devel
%{_includedir}/libsdr
%{_libdir}/libsdr.so

%changelog
openSUSE Build Service is sponsored by