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

pkgname=pavucontrol
pkgver=5.0
pkgrel=1
epoch=1
pkgdesc="PulseAudio Volume Control"
url="https://freedesktop.org/software/pulseaudio/pavucontrol/"
arch=(x86_64)
license=(GPL)
depends=(libcanberra-pulse gtkmm3 libsigc++ json-glib)
makedepends=(intltool lynx git)
optdepends=("pulseaudio: Audio backend")
_commit=14e7cc0a215a708d845adf5eab715ec598814bb4  # tags/v5.0^0
source=("git+https://gitlab.freedesktop.org/pulseaudio/pavucontrol.git#commit=$_commit")
sha256sums=('SKIP')

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

prepare() {
  cd pavucontrol
  NOCONFIGURE=1 ./bootstrap.sh
}

build() {
  cd pavucontrol
  ./configure --prefix=/usr --enable-gtk3
  make
}

package() {
  cd pavucontrol
  make DESTDIR="$pkgdir" install
}
