From 249782de2218ad1e63025158d131859f48ec5409 Mon Sep 17 00:00:00 2001 From: - <-> Date: Tue, 11 Jun 2019 09:13:19 +0300 Subject: [PATCH] add spec file --- ReleaseNotes.txt | 2 +- doc/faq.md | 2 + pianobooster.spec | 112 +++++++++++++++++++++++ tools/fluidsynth/pianobooster-fluidsynth | 2 +- 4 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 pianobooster.spec diff --git a/ReleaseNotes.txt b/ReleaseNotes.txt index c176d16..76bb934 100644 --- a/ReleaseNotes.txt +++ b/ReleaseNotes.txt @@ -6,7 +6,7 @@ v0.7.0: - Use FTGL library to draw fonts in GL context - Translate notes - Fix Qt strings localization -- New options: INSTALL_ALL_LANGS, USE_SYSTEM_FONT, NO_DOCS +- New options: INSTALL_ALL_LANGS, USE_SYSTEM_FONT, NO_DOCS, USE_SYSTEM_RTMIDI - Allow to switch between languages within a session - Add Piano Keyboard widget - Update documentation diff --git a/doc/faq.md b/doc/faq.md index 36727bf..b1c4e9a 100755 --- a/doc/faq.md +++ b/doc/faq.md @@ -50,6 +50,8 @@ of Reverbs, chorus effects, etc. Using 'timidity': [wrapper script and desktop file](https://github.com/captnfab/PianoBooster/tree/master/tools/timidity). +Using 'fluidsynth': [wrapper script and desktop file](https://github.com/captnfab/PianoBooster/tree/master/tools/fluidsynth). + ## How do I hear the sound on Mac? While there are many possible choices General Midi sound generators for the Mac diff --git a/pianobooster.spec b/pianobooster.spec new file mode 100644 index 0000000..491553b --- /dev/null +++ b/pianobooster.spec @@ -0,0 +1,112 @@ +Name: pianobooster +Version: 0.7.0 +Release: %mkrel 1 +Summary: A MIDI file player that teaches you how to play the piano +Group: Sound/Midi +License: GPLv3+ +Url: https://github.com/captnfab/PianoBooster +Source0: %{name}-%{version}.tar.gz + +BuildRequires: cmake +BuildRequires: pkgconfig(alsa) +BuildRequires: pkgconfig(freetype2) +BuildRequires: pkgconfig(ftgl) +BuildRequires: pkgconfig(gl) +BuildRequires: pkgconfig(Qt5Core) +BuildRequires: pkgconfig(Qt5Gui) +BuildRequires: pkgconfig(Qt5Help) +BuildRequires: pkgconfig(Qt5OpenGL) +BuildRequires: pkgconfig(Qt5Widgets) +BuildRequires: pkgconfig(Qt5Xml) +BuildRequires: pkgconfig(rtmidi) + +Requires: fonts-ttf-dejavu +Requires: unzip + +Recommends: %{name}-timidity +#Recommends: %{name}-fluidsynth +Recommends: qttranslations5 + +%description +A MIDI file player/game that displays the musical notes AND teaches you how +to play the piano. + +PianoBooster is a fun way of playing along with a musical accompaniment and +at the same time learning the basics of reading musical notation. +The difference between playing along to a CD or a standard MIDI file +is that PianoBooster listens and reacts to what you are playing on a +MIDI keyboard. + +%files +%doc README.md ReleaseNotes.txt +%license license.txt +%{_bindir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_datadir}/pixmaps/%{name}.png +%{_gamesdatadir}/%{name}/ +%{_mandir}/man6/%{name}.6* + +#---------------------------------------------------------------------------- + +%package timidity +Summary: Wrapper to launch PianoBooster with TiMidity as MIDI sequencer +Group: Sound/Midi + +Requires: %{name} = %{version}-%{release} +Requires: TiMidity++ + +%description timidity +This package contains a wrapper script to launch PianoBooster together with +TiMidity in ALSA server mode. This makes it possible to play the MIDI files +even without a plugged-in MIDI keyboard. + +%files timidity +%{_bindir}/%{name}-timidity +%{_datadir}/applications/%{name}-timidity.desktop + +#---------------------------------------------------------------------------- + +%package fluidsynth +Summary: Wrapper to launch PianoBooster with FluidSynth as MIDI sequencer +Group: Sound/Midi + +Requires: %{name} = %{version}-%{release} +Requires: xterm +Requires: fluidsynth +Requires: fluid-soundfont-gm +Requires: fluid-soundfont-gs + +%description fluidsynth +This package contains a wrapper script to launch PianoBooster together with +FluidSynth in ALSA server mode. This makes it possible to play the MIDI files +even without a plugged-in MIDI keyboard. + +%files fluidsynth +%{_bindir}/%{name}-fluidsynth +%{_datadir}/applications/%{name}-fluidsynth.desktop + +#---------------------------------------------------------------------------- + +%prep +%autosetup -p1 -n %{name}-%{version} + +%build +%cmake -DUSE_SYSTEM_FONT=ON -DNO_DOCS=ON -DINSTALL_ALL_LANGS=1 -DUSE_SYSTEM_RTMIDI=1 +%make_build + +%install +%make_install -C build + +install -D -m644 %{name}.6 %{buildroot}%{_mandir}/man6/%{name}.6 + +# Install a wrapper script to start a TiMidity server together with PianoBooster +install -D -m755 tools/timidity/%{name}-timidity %{buildroot}%{_bindir} + +# Install a TiMidity desktop file for the wrapper script +install -D -m644 tools/timidity/%{name}-timidity.desktop %{buildroot}%{_datadir}/applications/%{name}-timidity.desktop + +# Install a wrapper script to start a FluidSynth server together with PianoBooster +install -D -m755 tools/fluidsynth/%{name}-fluidsynth %{buildroot}%{_bindir} + +# Install a FluidSynth desktop file for the wrapper script +install -D -m644 tools/fluidsynth/%{name}-fluidsynth.desktop %{buildroot}%{_datadir}/applications/%{name}-fluidsynth.desktop diff --git a/tools/fluidsynth/pianobooster-fluidsynth b/tools/fluidsynth/pianobooster-fluidsynth index 079d0ff..b1ff863 100755 --- a/tools/fluidsynth/pianobooster-fluidsynth +++ b/tools/fluidsynth/pianobooster-fluidsynth @@ -1,4 +1,4 @@ -#/bin/sh +#!/bin/sh if [ -f "/usr/share/soundfonts/FluidR3_GM.sf2" ] && [ -f "/usr/share/soundfonts/FluidR3_GS.sf2" ] then