# Maintainer: David Runge <dave@sleepmap.de>
# Contributor: Ainola
# Contributor: rtfreedman

_name=CsoundQt
pkgname=csoundqt
pkgver=0.9.6
pkgrel=1
pkgdesc="Csound frontend with highlighting editor, autocomplete, interactive widgets and integrated help"
arch=('x86_64')
url="https://csoundqt.github.io/"
license=('CCPL' 'FDL' 'GPL' 'LGPL2.1')
groups=('pro-audio')
depends=('csound' 'csound-doc' 'desktop-file-utils' 'hicolor-icon-theme' 'qt5-declarative' 'rtmidi')
makedepends=('shared-mime-info')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${pkgname}/${pkgname}/archive/${pkgver}.tar.gz")
sha512sums=('d5f37753e51a501eb150362fcb17f35c091704fe516f944212c267e852b6563bde738235f3dc1ec82f45586bf4203f8d93a7e52487c56b90acbf398da4fc4138')

prepare() {
  mv -v "${_name}-${pkgver}" "${pkgname}-${pkgver}"
}

build() {
  cd "${pkgname}-${pkgver}"
  qmake-qt5 qcs.pro \
    SHARE_DIR="${pkgdir}/usr/share" \
    INSTALL_DIR="${pkgdir}/usr" \
    CONFIG+=rtmidi
  make
}

package() {
  cd "${pkgname}-${pkgver}"
  make DESTDIR="${pkgdir}" install
  # docs
  install -t "${pkgdir}/usr/share/doc/${pkgname}/" \
    -vDm644 {ChangeLog,README.md}
}

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