# Maintainer: Laurent Carlier <lordheavym@gmail.com>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Nick B <Shirakawasuna at gmail _dot_com>

pkgname=kaudiocreator
pkgver=3.92.0+306+gbd233f8
pkgrel=1
pkgdesc="A program for ripping and encoding Audio-CDs, encoding files from disk"
arch=('x86_64')
url="https://www.kde.org/applications/multimedia/kaudiocreator/"
license=('GPL')
depends=('audiocd-kio' 'taglib' 'libdiscid' 'kcmutils' 'knotifyconfig' 'kdelibs4support' 'hicolor-icon-theme')
makedepends=('extra-cmake-modules' 'git' 'kdesignerplugin' 'kdoctools')
_commit=bd233f8b59012d0792ef639d3ae0a1dd9f30cbfe  # master
source=("git://git.kde.org/kaudiocreator.git#commit=$_commit")
md5sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed -e 's/-/+/g' -e 's/v//'
}

build() {
  mkdir build
  cd build

  cmake ../${pkgname} \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_TESTING=OFF
  make
}

package() {
  cd build

  make DESTDIR=${pkgdir} install
}
