File linhpsdr.spec of Package linhpsdr

#
# spec file for package linhpsdr
#
# 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/
#


Name:           linhpsdr
Version:        0.0.0+git.20200715
Release:        0
Summary:        An HPSDR application
License:        GPL-3.0-only
Group:          Productivity/Hamradio/Other
URL:            https://github.com/g0orx/linhpsdr
#Git-Clone:     https://github.com/g0orx/linhpsdr.git
Source:         %{name}-%{version}.tar.xz
#Patch0:         linhpsdr-obey-cflags.patch
# HACK: blocking compiler warnings should be fixed upstream
#BuildRequires:  -post-build-checks
BuildRequires:  ImageMagick
BuildRequires:  git-core
BuildRequires:  hicolor-icon-theme
BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
BuildRequires:  wdsp-devel
BuildRequires:  libsoundio-devel
BuildRequires:  pkgconfig(SoapySDR)
BuildRequires:  pkgconfig(fftw3)
BuildRequires:  pkgconfig(gtk+-3.0)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(alsa)
Recommends:     hamlib >= 3.2
Recommends:     wsjtx

%description
linHPSDR is a client/server SDR program.
The major features of the software are:
 * Uses WDSP ported to Linux for the DSP library
 * Supports both Protocol 1 and Protocol 2
 * Supports up to 7 receivers depending on the radio
 * Supports 1 transmitter
 * Uses PortAudio for local audio input/output at the computer
 * CAT interface over TCP/IP for each receiver
 * Easy interface to WSJT-X without using a sound card or cables
 * Can be interfaced to other applications using rigctl built
   with Hamlib 3.2.

%prep
%setup -q
#%%patch0 -p1
# enable support for SOAPYSDR
#sed -i 's|#SOAPYSDR_INCLUDE=SOAPYSDR|SOAPYSDR_INCLUDE=SOAPYSDR|g' Makefile

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

%install
install -D -m 0755 linhpsdr %{buildroot}/%{_bindir}/linhpsdr
install -d %{buildroot}/%{_datadir}/linhpsdr
install -m 0644 *.png %{buildroot}/%{_datadir}/linhpsdr
install -m 0644 hpsdr_icon.png %{buildroot}/%{_datadir}/linhpsdr/

# Install icons and desktop file
for size in 256 128 96 64 48 32 16; do
    mkdir -p %{buildroot}%{_datadir}/icons/hicolor/$size"x$size/apps"
    convert -strip hpsdr_icon.png -resize "$size"x"$size" %{buildroot}%{_datadir}/icons/hicolor/$size"x$size/apps/%{name}.png"
done
%suse_update_desktop_file -c %{name} "linHPSDR" %{name} %{name} %{name} "Network;HamRadio"

%files
%license LICENSE
%doc README.md
%doc documentation/*.pdf
%{_bindir}/linhpsdr
%{_datadir}/linhpsdr
%{_datadir}/applications/%{name}.desktop
%{_datadir}/icons/hicolor/*/apps/%{name}.png

%changelog
openSUSE Build Service is sponsored by