# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Ionut Biru <ibiru@archlinux.org>
# Contributor: Daniel Balieiro <daniel@balieiro.com>
# Contributor: Rodrigo L. M. Flores <mail@rodrigoflores.org>

pkgname=telepathy-gabble
pkgver=0.18.4
pkgrel=4
pkgdesc="A Jabber/XMPP connection manager for Telepathy"
arch=(x86_64 powerpc64le powerpc)
url="https://telepathy.freedesktop.org"
groups=(telepathy)
license=(LGPL2.1)
depends=(telepathy-glib libsoup libnice)
makedepends=(libxslt python gnome-common)
source=(https://telepathy.freedesktop.org/releases/telepathy-gabble/telepathy-gabble-$pkgver.tar.gz{,.asc}
        telepathy-gabble-0.18.4-python3.patch)
install=telepathy-gabble.install
sha256sums=('115c91572c72d4a40f0b25b606167b4f2f09441dc7bf1036ccbb1450f1a4969c'
            'SKIP'
            '2873cdb3b65deab1418acd25fc5ec4bf120f52dcceda129ae7ac315026ea2749')
validpgpkeys=(38FDAD7D73CE1AE7A16200291F3845DD1432A9FB) # Georgios Kiagiadakis <gkiagia@tolabaki.gr>

prepare() {
  cd $pkgname-$pkgver
  # port to python3, patch taken from Fedora
  patch -Np1 -i ../telepathy-gabble-0.18.4-python3.patch
}

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr \
    --libexecdir=/usr/lib/telepathy \
    --disable-Werror --enable-gtk-doc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

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