# Maintainer: Laurent Carlier <lordheavym@gmail.com>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: mightyjaym <jmambrosino@gmail.com>
# Contributor: moostik <mooostik_at_gmail.com>

pkgname=audex
pkgver=0.79+91+g9bb62f3
pkgrel=1
pkgdesc="A CDDA extraction tool with a ftp upload function for KDE"
arch=('x86_64')
url="http://kde-apps.org/content/show.php?content=77125"
license=('GPL')
depends=('libkcddb' 'hicolor-icon-theme' 'kcmutils')
makedepends=('extra-cmake-modules' 'git')
optdepends=('vorbis-tools: OGG encoder'
	'faac: MP4/M4A/AAC encoder'
	'flac: FLAC encoder'
	'lame: MP3 encoder')
_commit=9bb62f34878ede3104802709c154b7b244925970  # master
source=("git://git.kde.org/audex.git#commit=$_commit")
md5sums=('SKIP')

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

build() {
  cd ${pkgname}

  mkdir build
  cd build

  cmake ../  \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr
  make
}

package() {
  cd ${pkgname}/build

  make DESTDIR=${pkgdir} install
}
