File castersoundboard.spec of Package castersoundboard

#
# spec file for package castersoundboard
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2022 Florian "sp1rit" <packaging@sp1rit.anonaddy.me>
#
# 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 upstream CasterSoundboard
Name:           castersoundboard
Version:        0
Release:        0
Summary:        Soundboard for hot-keying and playing back sounds
License:        LGPL-3.0
URL:            https://github.com/covarianttensor/CasterSoundboard/tree/development
Source0:        %{name}-%{version}.tar.xz
BuildRequires:  gcc-c++
BuildRequires:  make
BuildRequires:  pkgconfig(Qt5Core)
BuildRequires:  pkgconfig(Qt5Gui)
BuildRequires:  pkgconfig(Qt5Multimedia)
BuildRequires:  pkgconfig(Qt5Network)
BuildRequires:  pkgconfig(Qt5Qml)
BuildRequires:  pkgconfig(Qt5Quick)
Requires:       gst-plugins-bad
Requires:       gst-plugins-good
Requires:       gst-plugins-ugly
%if 0%{?suse_version}
BuildRequires:  update-desktop-files
%endif

%define triplet %(g++ -dumpmachine)
%if 0%{?fedora_version}
%define qmake5 %qmake_qt5
%endif

%description
A soundboard for hot-keying and playing back sounds. (For podcasting)

%prep
%autosetup -p1

%build
rm -rf %{triplet}
mkdir %{triplet} && pushd %{triplet}
%qmake5 "../%{upstream}/" PREFIX=%{_prefix}
make %{?_smp_mflags}
popd

%install
pushd %{triplet}
make install INSTALL_ROOT="%{buildroot}"
popd
%if 0%{?suse_version}
%suse_update_desktop_file -G Soundboard %{upstream} Audio Player
%endif

%files
%license LICENSE
%doc README.md
%{_bindir}/%{upstream}
%{_datadir}/appdata/%{upstream}.appdata.xml
%{_datadir}/applications/%{upstream}.desktop
%{_datadir}/pixmaps/%{upstream}.png

%changelog
openSUSE Build Service is sponsored by