# Maintainer: David Runge <dave@sleepmap.de>
# Contributor: Esclapion <esclapion at gmail.com>

pkgname=qastools
pkgver=0.21.0
pkgrel=4
pkgdesc="A collection of desktop applications for the Linux sound system ALSA."
arch=('x86_64')
url="http://xwmw.org/qastools/"
license=('GPL3')
groups=('pro-audio')
depends=('alsa-lib' 'hicolor-icon-theme' 'qt5-svg')
makedepends=('cmake' 'qt5-tools')
replaces=('qastools-qt5')
source=("https://sourceforge.net/projects/${pkgname}/files/${pkgver}/${pkgname}_${pkgver}.tar.bz2")
sha512sums=('f1410129ead6a779a0ef517ce437b2d7c09e8d386fc81edeb1f99718820b6ef7edd562477058a2e935bae703a3c621912b1f7e18416f43d20263fa4f8d4b61dc')

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

build() {
  cd "${pkgname}_${pkgver}/build"
  cmake .. -DUSE_QT5=ON \
    -DCMAKE_INSTALL_PREFIX='/usr' \
    -DCMAKE_BUILD_TYPE=Release
}

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

