# $Id: PKGBUILD 199889 2013-11-18 07:36:22Z tpowa $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Patryk Kowalczyk < patryk at kowalczyk dot ws>

pkgname=spice
pkgver=0.12.4
pkgrel=3
pkgdesc="SPICE client and server"
arch=('i686' 'x86_64')
url="http://spice-space.org"
license=('LGPL2.1')
depends=(alsa-lib celt0.5.1 libcacard libjpeg-turbo libsasl libxinerama libxfixes libxrandr pixman)
makedepends=(python2-pyparsing qemu spice-protocol)
source=(http://spice-space.org/download/releases/$pkgname-$pkgver.tar.bz2
        CVE-2013-4282.patch)

prepare() {
  cd "$srcdir/$pkgname-$pkgver"
  patch -Np1 -i ../CVE-2013-4282.patch
}

build() {
  cd "$srcdir/$pkgname-$pkgver"
  PYTHON=python2 ./configure --prefix=/usr --disable-static --enable-smartcard --enable-client
  make
}

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir/" install
}
md5sums=('325b1c42ce24e75de45a75876b73a8bd'
         '24a1648e7c684b4444d7921b5534767e')
