File csdr.spec of Package csdr

#
# spec file for package csdr
#
# Copyright (c) 2017, Martin Hauke <mardnh@gmx.de>
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 https://bugs.opensuse.org/
#


%define sover 0_15
%define libname libcsdr%{sover}

Name:           csdr
Version:        0.15
Release:        0
Summary:        A Simple DSP library and command-line tool for SDR
License:        BSD-2-Clause OR GPL-2.0-only
Group:          Productivity/Hamradio/Other
URL:            https://github.com/simonyiszk/csdr
Source:         https://github.com/simonyiszk/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0:         0001-make-the-library-file-name-match-the-soname.patch
Patch1:         csdr-fix-makefile.diff
Patch2:         0002-Attempting-to-fix-nmux-crash-40.patch
Patch3:         fix-wrong-return-type.patch
#Git-Clone:     https://github.com/simonyiszk/csdr.git
# Resolve before submission to Factory
BuildRequires:  -post-build-checks
BuildRequires:  gcc-c++
BuildRequires:  pkgconfig
BuildRequires:  python2-base
BuildRequires:  pkgconfig(fftw3)

%description
libcsdr is a set of simple DSP routines for Software Defined Radio.
It is mostly useful for AM/FM/SSB demodulation and spectrum display.

%package devel
Summary:        Development files for libcsdr
Group:          Development/Libraries/Other
Requires:       %{libname} = %{version}

%description devel
Libraries and header files for developing applications that want to
make use of libcsdr.

%package -n %{libname}
Summary:        A Simple DSP library
Group:          System/Libraries

%description -n %{libname}
libcsdr is a set of simple DSP routines for Software Defined Radio.
It is mostly useful for AM/FM/SSB demodulation and spectrum display.

%prep
%autosetup -p1

%build
export CFLAGS='%{optflags}'
%make_build

%install
%make_install
# FIXME: should be fixed upstream
%if %{__isa_bits} == 64
mv %{buildroot}%{_prefix}/lib/ %{buildroot}/%{_libdir}
%endif

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

%check

%files
%doc README.md
%{_bindir}/csdr
%{_bindir}/csdr-fm
%{_bindir}/nmux

%files -n %{libname}
%doc README.md
%{_libdir}/libcsdr.so.*

#%%files devel
#%%defattr(-,root,root)
#%%doc README.md
#%%{_libdir}/libcsdr.so

%changelog
openSUSE Build Service is sponsored by