# Maintainer (Arch): Laurent Carlier <lordheavym@gmail.com>
# Contributor (Arch): Andrea Scarpino <andrea@archlinux.org>
# Contributor (Arch): mightyjaym <jmambrosino@gmail.com>
# Contributor (Arch): moostik <mooostik_at_gmail.com>
# Maintainer (Hyperbola): André Silva <emulatorman@hyperbola.info>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

pkgname=audex
pkgver=0.79+91+g9bb62f3
pkgrel=2
pkgrel+=.parabola1
pkgdesc="A CDDA extraction tool with a ftp upload function for KDE"
pkgdesc+=", without nonfree faac recommendation"
arch=('x86_64')
arch+=('i686' 'armv7h')
url="https://userbase.kde.org/Audex"
license=('GPL')
replaces=("${pkgname}-libre" "${pkgname}-parabola")
conflicts=("${pkgname}-libre" "${pkgname}-parabola")
depends=('libkcddb' 'hicolor-icon-theme' 'kcmutils' 'qt5-script')
makedepends=('extra-cmake-modules' 'git')
optdepends=('vorbis-tools: OGG encoder'
	'flac: FLAC encoder'
	'lame: MP3 encoder')
_commit=9bb62f34878ede3104802709c154b7b244925970  # master
source=("git://git.kde.org/audex.git#commit=$_commit")
md5sums=('SKIP')

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

build() {
  cd audex

  mkdir build
  cd build

  cmake ../
  make
}

package() {
  cd audex/build

  make DESTDIR="${pkgdir}" install
}
