# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
# Git version to support Python 3, not needed when 0.6.3 or 0.7.0 is released
pkgname=telepathy-farstream
pkgver=0.6.2_git20190919
pkgrel=0
_commit="c7299b4ef37726155a7fcb7ebbdb9786c1e9e81e"
pkgdesc="Telepathy GLib-based client library that uses Farstream to handle Call channels"
arch="all"
url="https://telepathy.freedesktop.org/components/telepathy-farstream/"
license="LGPL-2.1-or-later"
depends="telepathy-glib farstream"
depends_dev="dbus-glib-dev telepathy-glib-dev gobject-introspection-dev"
makedepends="$depends_dev autoconf automake gtk-doc python3 farstream-dev"
source="$pkgname-$_commit.tar.gz::https://github.com/TelepathyIM/telepathy-farstream/archive/$_commit.tar.gz"
#source="https://github.com/TelepathyIM/telepathy-farstream/archive/telepathy-farstream-$pkgver.tar.gz"
subpackages="$pkgname-dev $pkgname-doc"
builddir="$srcdir/$pkgname-$_commit"

prepare() {
	default_prepare

	NOCONFIGURE=1 ./autogen.sh
}

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--libexecdir=/usr/lib/telepathy \
		--disable-static \
		--enable-gtk-doc \
		--disable-Werror # Should be enabled again in next release

	make
}

check() {
	make check
}

package() {
	DESTDIR="$pkgdir" make install
}
sha512sums="7387832d8d9afbcc87774ee16025842940b4fab979e492e1301734a37777120241d4b06dd2f6ee6743e68783967de73129dcd3fb41ff3d1be0aa1c6c0c44eb3a  telepathy-farstream-c7299b4ef37726155a7fcb7ebbdb9786c1e9e81e.tar.gz"
