File qsstv.spec of Package qsstv

#
# spec file for package qsstv
#
# Copyright (c) 2023 Walter Fey DL8FCL
#
# This file is under MIT license

Name:           qsstv
Version:        9.5.8+git20230505
Release:        0
License:        GPL-3.0
Summary:        Qt-based SSTV and HAMDRM
Url:            https://github.com/ON4QZ/QSSTV
Group:          Productivity/Hamradio/Other
Source:         %{name}-%{version}.tar.xz
Source1:        qsstv.1
Patch0:         qsstv-hamlib-4.6.diff

BuildRequires:  pkgconfig
BuildRequires:  update-desktop-files
%if 0%{?suse_version} > 1500
BuildRequires:  qt6-core-devel
BuildRequires:  qt6-network-devel
BuildRequires:  qt6-svg-devel
BuildRequires:  qt6-xml-devel
%else
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Svg)
BuildRequires:  pkgconfig(Qt5Xml)
%endif
BuildRequires:  pkgconfig(alsa)
BuildRequires:  pkgconfig(fftw3)
BuildRequires:  pkgconfig(hamlib)
BuildRequires:  pkgconfig(libopenjp2)
BuildRequires:  pkgconfig(libpulse)
BuildRequires:  pkgconfig(libv4l2)

%description
QSSTV is a program for receiving and transmitting SSTV and HAMDRM (sometimes
called DSSTV). It is compatible with most of MmSSTV and EasyPal

%prep
%setup -q
%patch0 -p1

%build
cd src
%if 0%{?suse_version} > 1500
qmake6 PREFIX=/usr
%else
qmake-qt5 PREFIX=/usr
%endif
%make_build

%install
cd src
%make_install INSTALL_ROOT=%{buildroot}

# Let suse_update_desktop_file find the qsstv icon
cp icons/%{name}.png %_sourcedir

# Install man page borrowed from Debian
mkdir -p %{buildroot}%{_mandir}/man1
install -pm 0644 %{SOURCE1} %{buildroot}%{_mandir}/man1/

%suse_update_desktop_file -c %{name} Qsstv "Qt-based SSTV and HAMDRM" %{name} %{name} "Network;HamRadio"


%files
%license COPYING
%doc README.md
%{_bindir}/*
%{_datadir}/pixmaps/%{name}.png
%{_datadir}/applications/%{name}.desktop
%{_mandir}/man1/%{name}.1*

%changelog
openSUSE Build Service is sponsored by