File PKGBUILD of Package pianobooster-test

# FIXME: libffado was added as dependency, because it requires by jack (and not optionally, but mandatory), but Arch Linux jack's maintainer is stupid to understand it
# TiMidity, Fluidsynth+JACK do not work out of box, but Fluidsynth without JACK works

build_with_cmake="1"

pkgdesc='A MIDI file player that teaches you how to play the piano'
origname='PianoBooster'
pkgname='pianobooster'
pkgver=0.7.1
pkgrel=1
makedepends=('cmake' 'alsa-lib' 'freetype2' 'ftgl' 'mesa' 'glu' 'qt5-base' 'qt5-tools' 'rtmidi' 'jack' 'fluidsynth' 'hicolor-icon-theme')
depends=('ttf-dejavu' 'unzip' 'hicolor-icon-theme' 'alsa-lib' 'freetype2' 'ftgl' 'mesa' 'glu' 'qt5-base' 'rtmidi' 'jack' 'libffado' 'fluidsynth' 'soundfont-fluid' 'libnotify')
optdepends=('qt5-translations')
arch=('x86_64')
groups=('qt5')
url='https://github.com/captnfab/PianoBooster'
license=('GPL3+')
source=("${origname}-${pkgver}.tar.gz")
md5sums=('SKIP')

build () {
    mv -f "${origname}-${pkgver}" "${pkgname}-${pkgver}"
    cd "${pkgname}-${pkgver}"
if [ "$build_with_cmake" = "1" ]
then
    cmake . \
       -DUSE_SYSTEM_FONT=ON \
       -DINSTALL_ALL_LANGS=ON \
       -DUSE_SYSTEM_RTMIDI=ON \
       -DWITH_MAN=ON \
       -DWITH_TIMIDITY=OFF \
       -DWITH_FLUIDSYNTH=ON \
       -DUSE_FLUIDSYNTH=ON \
       -DUSE_TIMIDITY=ON \
       -DCMAKE_INSTALL_PREFIX="${pkgdir}/usr"
else
     qmake-qt5 \
        USE_SYSTEM_FONT=ON \
        INSTALL_ALL_LANGS=ON \
        USE_SYSTEM_RTMIDI=ON \
        WITH_MAN=ON \
        WITH_TIMIDITY=OFF \
        WITH_FLUIDSYNTH=ON \
        USE_FLUIDSYNTH=ON \
        USE_TIMIDITY=ON
    make
fi
}

package () {
    cd "${pkgname}-${pkgver}"
    if [ "$build_with_cmake" = "1" ]
    then
       make install -C build
    else
       make install INSTALL_ROOT=${pkgdir}
    fi
}
openSUSE Build Service is sponsored by