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

pkgname=pavucontrol
pkgdesc="PulseAudio Volume Control"
pkgver=4.0
pkgrel=1
epoch=1
arch=(x86_64)
url="https://freedesktop.org/software/pulseaudio/pavucontrol/"
license=(GPL)
depends=(libcanberra-pulse gtkmm3 libsigc++)
makedepends=(intltool lynx git)
optdepends=("pulseaudio: Audio backend")
_commit=57cf49f1e8675d58bf215c2fd9ba3b8c01cf254a  # tags/v4.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
}
