# $Id: PKGBUILD 106498 2014-03-05 07:19:42Z fyan $
# Maintainer: Felix Yan <felixonmars@gmail.com>

pkgname=pidgin-lwqq
pkgver=0.2d.20140304
#_gitver="tag=$pkgver"
_gitver='commit=c1850142a1cf8ce88fc30cec68d3f568613d923d'
pkgrel=1
pkgdesc="A pidgin plugin based on lwqq, a excellent safe useful library for webqq protocol"
arch=('i686' 'x86_64')
url="https://github.com/xiehuc/pidgin-lwqq"
license=('GPL3')
depends=('libpurple' 'curl' 'hicolor-icon-theme' 'gtk-update-icon-cache' 'libev' 'js')
optdepends=('pidgin: Multi-protocol instant messaging client'
            'telepathy-haze: Empathy plugin support')
makedepends=('git' 'cmake')
install=$pkgname.install
options=(debug)
source=("git://github.com/xiehuc/pidgin-lwqq.git#$_gitver"
        "git://github.com/xiehuc/lwqq.git")

prepare() {
  cd $pkgname
  git submodule init
  git config submodule."liblwqq".url "$srcdir/lwqq"
  git submodule update
}

build() {
  cd $pkgname
  
  cmake -DCMAKE_INSTALL_PREFIX=/usr .
  make
}

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

sha512sums=('SKIP'
            'SKIP')
