# Maintainer: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com>
# Contributor: Corrado Primier <bardo@aur.archlinux.org>
# Contributor: William Rea <sillywilly@gmail.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>

pkgname=paprefs
pkgver=1.1
pkgrel=2
pkgdesc="Configuration dialog for PulseAudio"
url="https://freedesktop.org/software/pulseaudio/paprefs/"
license=(GPL2)
arch=(x86_64)
depends=(gtkmm3 libsigc++ pulseaudio)
makedepends=(meson lynx tidy git)
_commit=f63c50b177cf275cc79fc5245e8a8b601b21bd1f  # tags/v1.1^0
source=("git+https://gitlab.freedesktop.org/pulseaudio/paprefs.git#commit=$_commit")
sha512sums=('SKIP')

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

prepare() {
  cd $pkgname
}

build() {
  arch-meson $pkgname build -D lynx=true
  ninja -C build
}

package() {
  DESTDIR="$pkgdir" meson install -C build
  install -Dt "$pkgdir/usr/share/doc/$pkgname" -m644 build/doc/README
}
