# $Id: PKGBUILD 325223 2018-05-30 20:46:32Z arojas $
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Timm Preetz <timm@preetz.us>
pkgname=telepathy-haze
pkgver=0.8.0
pkgrel=2
pkgdesc="A telepathy-backend to use libpurple (Pidgin) protocols."
arch=(x86_64)
url="http://telepathy.freedesktop.org"
license=(GPL)
depends=(telepathy-glib libpurple)
makedepends=(libxslt python2 python)
install=telepathy-haze.install
groups=(telepathy)
source=(https://telepathy.freedesktop.org/releases/$pkgname/$pkgname-$pkgver.tar.gz{,.asc} telepathy-haze-purple-2.0.12.patch)
sha256sums=('3e76049c05f2cd5900c5c0c1cfebdf7ae79eec987a599f1090946673c5b8f9c9'
            'SKIP'
            '6da40c6b854db1a7031d2e3838bfe0961e66e283f8ea57931ce0e57874d658b8')
validpgpkeys=(DA98F25C0871C49A59EAFF2C4DE8FF2A63C7CC90) # Simon McVittie <smcv@pseudorandom.co.uk>

prepare() {
  cd $pkgname-$pkgver
  patch -p1 -i ../telepathy-haze-purple-2.0.12.patch # Fix build with libpurple 2.0.12
}

build() {
  cd $pkgname-$pkgver
  PYTHON=python2 ./configure --prefix=/usr \
      --libexecdir=/usr/lib/telepathy
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
