# Maintainer: David Runge <dave@sleepmap.de>
# Contributor: Ray Rashif <schiv@archlinux.org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: damir <damir@archlinux.org>
# Contributor: Robert Emil Berge <robert@rebi.no>

pkgname=rosegarden
pkgver=19.06
pkgrel=1
pkgdesc="MIDI/audio sequencer and notation editor"
arch=('x86_64')
url="https://www.rosegardenmusic.com/"
license=('GPL2')
groups=('pro-audio')
depends=('desktop-file-utils' 'fftw' 'jack' 'liblrdf' 'liblo' 'lirc'
'hicolor-icon-theme' 'qt5-base')
makedepends=('cmake' 'dssi' 'imake' 'ladspa' 'qt5-tools')
optdepends=('cups: Printing support'
            'dssi-plugins: DSSI plugin support'
            'evince: Print preview support'
            'ladspa-plugins: LADSPA plugin support'
            'lilypond: Notation display support'
            'mupdf: Print preview support'
            'okular: Print preview support'
            'timidity++: Softsynth support'
            'flac: FLAC support'
            'wavpack: Lossless audio codec support')
source=("https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.bz2")
sha512sums=('13eddd4ec88662f3275d83bf40471ca0a34d43b3c9c9f07cf46b891c74f087ec7fe0d4b8ffe8204f2f3a30829352f4d952bb035a5bd09a7b6bdeb41ff5d1e8d8')

prepare() {
  cd "${pkgname}-${pkgver}"
  mkdir -p build
}

build() {
  cd "${pkgname}-${pkgver}/build"
  cmake -DCMAKE_INSTALL_PREFIX=/usr \
        ..
  make
}

check() {
  cd "${pkgname}-${pkgver}/build"
  make test
}

package() {
  cd "${pkgname}-${pkgver}/build"
  make DESTDIR="$pkgdir" install
  install -t "${pkgdir}/usr/share/doc/${pkgname}" \
    -vDm 644 ../{AUTHORS,README}
}

# vim:set ts=2 sw=2 et:
