File pianobooster.spec of Package pianobooster
#
# spec file for package pianobooster
#
# Copyright (c) 2023 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2023 Martchus
#
# 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: pianobooster
Version: 1.0.1
Release: 0
Summary: A MIDI file player/game that displays the musical notes and teaches you how to play the piano
License: GPL-3.0+
Group: System/Packages
Url: https://www.pianobooster.org
Source: PianoBooster-%{version}.tar.xz
BuildRequires: cmake >= 3.9
%if 0%{?fedora}
%else
BuildRequires: ninja
%endif
%if 0%{?sle_version} && 0%{?sle_version} < 160000
BuildRequires: gcc9-c++
%else
BuildRequires: gcc-c++
%endif
BuildRequires: cmake(Qt6Core)
BuildRequires: cmake(Qt6Gui)
BuildRequires: cmake(Qt6Widgets)
BuildRequires: cmake(Qt6LinguistTools)
BuildRequires: cmake(Qt6Xml)
BuildRequires: cmake(Qt6OpenGL)
BuildRequires: cmake(Qt6OpenGLWidgets)
BuildRequires: pkgconfig(alsa)
BuildRequires: pkgconfig(ftgl)
BuildRequires: pkgconfig(glu)
BuildRequires: pkgconfig(fluidsynth)
BuildRequires: pkgconfig(jack)
BuildRequires: pkgconfig(rtmidi)
%if 0%{?fedora}
%else
BuildRequires: update-desktop-files
%endif
BuildRequires: qtutilities-qt6-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
PianoBooster is a MIDI file player that displays the musical notes AND teaches
you how to play the piano. The difference between playing along to a CD or a
standard MIDI file is that Piano Booster listens and reacts to what you are
playing on a MIDI piano keyboard. You can play along to any track in the MIDI
file and Piano Booster will follow your playing. Piano Booster makes learning to
sight read fun!
%prep
%setup -q -n PianoBooster-%{version}
%build
%if 0%{?sle_version} && 0%{?sle_version} < 160000
export CC=gcc-9
export CXX=g++-9
%endif
%if 0%{?fedora}
%else
%define __builder ninja
%endif
%cmake \
-DUSE_SYSTEM_FONT=ON \
-DUSE_JACK=ON \
-DCONFIGURATION_PACKAGE_SUFFIX_QTUTILITIES:STRING="-qt6" \
-DQT_PACKAGE_PREFIX:STRING='Qt6' \
-DBUILTIN_TRANSLATIONS:BOOL=ON \
-DWITH_MAN=ON
%if 0%{?fedora} && 0%{?fedora_version} < 33
make %{?_smp_mflags}
%else
%cmake_build
%endif
%install
%if 0%{?fedora} && 0%{?fedora_version} < 33
DESTDIR=%{buildroot} make %{?_smp_mflags} install
%else
%cmake_install
%if 0%{?fedora}
%else
%suse_update_desktop_file -r %{name} Education Music
%endif
%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%{_bindir}/%{name}
%dir %{_datadir}/icons/hicolor
%dir %{_datadir}/icons/hicolor/32x32
%dir %{_datadir}/icons/hicolor/32x32/apps
%{_datadir}/icons/hicolor/32x32/apps/%{name}.png
%dir %{_datadir}/icons/hicolor/48x48
%dir %{_datadir}/icons/hicolor/48x48/apps
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png
%dir %{_datadir}/icons/hicolor/64x64
%dir %{_datadir}/icons/hicolor/64x64/apps
%{_datadir}/icons/hicolor/64x64/apps/%{name}.png
%dir %{_datadir}/icons/hicolor/scalable
%dir %{_datadir}/icons/hicolor/scalable/apps
%{_datadir}/icons/hicolor/scalable/apps/%{name}.svg
%{_datadir}/applications/%{name}.desktop
%dir %{_datadir}/man/man6
%{_datadir}/man/man6/%{name}.6.gz
%dir %{_datadir}/licenses/%{name}
%{_datadir}/licenses/%{name}/license.txt
%dir %{_datadir}/doc/%{name}
%{_datadir}/doc/%{name}/Changelog.txt
%{_datadir}/doc/%{name}/README.md
%{_datadir}/doc/%{name}/faq.md
%dir %{_datadir}/games/%{name}
%dir %{_datadir}/games/%{name}/music
%{_datadir}/games/%{name}/music/BoosterMusicBooks.zip
%changelog