File QrssPiG.spec of Package QrssPiG

#
# spec file for package QrssPiG
#
# Copyright (c) 2017-2022, 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:           QrssPiG
Version:        0.8.0
Release:        0
Summary:        QRSS grabber
License:        GPL-3.0-only
Group:          Productivity/Hamradio/Other
URL:            https://gitlab.com/hb9fxx/qrsspig
#Git-Clone:     https://gitlab.com/hb9fxx/qrsspig.git
Source:         https://gitlab.com/hb9fxx/qrsspig/-/archive/v%{version}/qrsspig-v%{version}.tar.gz
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  gr-osmosdr-devel
BuildRequires:  libliquid-devel
BuildRequires:  libsndfile-devel
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(LimeSuite)
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(fftw3)
BuildRequires:  pkgconfig(gdlib)
BuildRequires:  pkgconfig(libairspy)
BuildRequires:  pkgconfig(libairspyhf)
BuildRequires:  pkgconfig(libcurl)
BuildRequires:  pkgconfig(libhackrf)
BuildRequires:  pkgconfig(librtlsdr)
BuildRequires:  pkgconfig(libssh)
BuildRequires:  pkgconfig(yaml-cpp)
%if 0%{?suse_version} > 1325
BuildRequires:  libboost_filesystem-devel
BuildRequires:  libboost_program_options-devel
BuildRequires:  libboost_system-devel
%else
BuildRequires:  boost-devel
%endif

%description
QrssPiG is short for QRSS (Raspberry)Pi Grabber.

Functionality
 * Headless standalone daemon
 * Able to process I/Q stream from an rtl-sdr, HackRF or other sdr devices
 * Optionally control the sdr device
 * Optionally process audio from stream or audio input
 * Generate pretty horizontal or vertical waterfall graphs
 * Upload them via scp or ftp, or just save locally,
   or any combination of uploads and local saves

%prep
%setup -q -n qrsspig-v%{version}

%build
%cmake \
    -DCMAKE_SHARED_LINKER_FLAGS="" \
    -DWITH_INPUT_AIRSPY=OFF \
    -DWITH_INPUT_AIRSPYHF=OFF \
    -DWITH_INPUT_ALSA=ON \
    -DWITH_INPUT_GROSMOSDR=OFF \
    -DWITH_INPUT_HACKRF=ON \
    -DWITH_INPUT_LIMESDR=OFF \
    -DWITH_INPUT_PULSEAUDIO=ON \
    -DWITH_INPUT_RTLSDR=ON \
    -DWITH_INPUT_SDRPLAY=OFF \
    -DWITH_UPLOADER_FTP=ON \
    -DWITH_UPLOADER_SCP=ON
%make_jobs

%install
%cmake_install
install -Dm0644 systemd/qrsspig.service %{buildroot}%{_unitdir}/qrsspig.service
install -Dm0660 etc/qrsspig.yaml %{buildroot}%{_sysconfdir}/qrsspig/qrsspig.yaml

%pre
%service_add_pre qrsspig.service

%post
%service_add_post qrsspig.service

%preun
%service_del_preun qrsspig.service

%postun
%service_del_postun qrsspig.service

%files
%license LICENSE
%doc ChangeLog README.md
%doc qrsspig.yaml.template
%{_bindir}/qrsspig
%dir %{_sysconfdir}/qrsspig
%config(noreplace) %{_sysconfdir}/qrsspig/qrsspig.yaml
%{_includedir}/QGInputDevice.h
%{_includedir}/QGOutput.h
%{_includedir}/QGUploader.h
%{_prefix}/lib/qrsspig/
%{_unitdir}/qrsspig.service

%changelog
openSUSE Build Service is sponsored by