# $Id$
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Patryk Kowalczyk < patryk at kowalczyk dot ws>

# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
#  - drop qemu, libcacard deps
#  - --disable-smartcard in configure
#  - add v5 arch to configure
#  - patch to remove x86 assembly breakpoint

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

prepare() {
  cd "$srcdir/$pkgname-$pkgver"
  sed -i 's/|armv6|/|armv5tel|armv6|/' configure
  patch -p1 -i ../alarm.patch
}

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

package() {
  cd "$srcdir/$pkgname-$pkgver"
  make DESTDIR="$pkgdir/" install
}
md5sums=('1256286214fe402703c0a01bd3a85319'
         'fb88aba84f39baa118fcd9da82b10b78')