# Maintainer: benya
pkgname=aucdtect-linux-git
pkgver=0.1.0.r0.g0000000
pkgrel=1
pkgdesc='Linux Qt clone of auCDtect and auCDtect Task Manager'
arch=('x86_64')
url='ssh://git@git.daemonlord.ru/benya/auCDtect_linux.git'
license=('custom')
depends=('qt6-base' 'ffmpeg')
makedepends=('git' 'cmake' 'ninja')
provides=('aucdtect-linux' 'aucdtect')
conflicts=('aucdtect-linux' 'aucdtect')
source=("${pkgname}::git+ssh://git@git.daemonlord.ru/benya/auCDtect_linux.git")
sha256sums=('SKIP')

pkgver() {
  cd "${srcdir}/${pkgname}"
  git describe --long --tags --always --match 'v*' | sed 's/^v//;s/-/.r/;s/-/./'
}

build() {
  cmake -S "${srcdir}/${pkgname}" -B build -G Ninja \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr
  cmake --build build
}

package() {
  DESTDIR="${pkgdir}" cmake --install build
}
