# Maintainer (Arch): Vlad M. <vlad@archlinux.net>
# Contributor (Arch): HÃ¥vard Pettersson <mail@haavard.me>
# Contributor (Arch): Madotsuki <madotsuki at cock dot li>
# Maintainer: Omar Vega Ramos <ovruni@gnu.org.pe>

_pkgname=utox
pkgname=utox-git
pkgver=0.5.0.r11.gc1455ba
pkgrel=1
pkgdesc='Lightweight Tox client'
arch=('i686' 'x86_64' 'armv7h')
url='https://github.com/GrayHatter/uTox'
license=('GPL3')
depends=('desktop-file-utils'
         'fontconfig'
         'libfilteraudio-git'
         'hicolor-icon-theme'
         'libdbus'
         'libxext'
         'libxrender'
         'openal'
         'toxcore'
         'v4l-utils')
makedepends=('git')
optdepends=('gtk3: GTK file picker')
provides=("$_pkgname")
conflicts=("$_pkgname")
source=("$pkgname::git+https://github.com/GrayHatter/uTox")
md5sums=('SKIP')
install="$pkgname.install"

pkgver() {
  cd "$pkgname"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  cd "$pkgname"
  make
}

package() {
  cd "$pkgname"
  make PREFIX=/usr DESTDIR="$pkgdir" install
}