# $Id: PKGBUILD 229694 2015-01-24 08:18:14Z fyan $
# Maintainer: Angel Velasquez <angvp@archlinux.org> 
# Contributor: Stéphane Gaudreault <stephane@archlinux.org>

pkgname=serf
pkgver=1.3.8
pkgrel=1
pkgdesc="High-performance asynchronous HTTP client library"
arch=('i686' 'x86_64')
url="http://code.google.com/p/serf/"
license=('Apache')
depends=('apr-util')
makedepends=('scons')
options=('!staticlibs')
source=(http://serf.googlecode.com/svn/src_releases/${pkgname}-${pkgver}.zip
        serf-1.3.x-fix-comment-style.patch
        serf-1.3.x-fix-deflate-buckets-test.patch)
md5sums=('92a9e90bf77d203de659d13adc2d1605'
         'c4aac5a2882c18535d63724ba6ec1148'
         '9d6dcb3679d6309fbb3b1c1db1148df0')

prepare() {
  cd ${pkgname}-${pkgver}
  patch -p1 --binary -i ../serf-1.3.x-fix-comment-style.patch
  patch -p1 --binary -i ../serf-1.3.x-fix-deflate-buckets-test.patch
}

build() {
  cd ${pkgname}-${pkgver}
  scons PREFIX=/usr GSSAPI=/usr/bin/krb5-config
}

check() {
  cd ${pkgname}-${pkgver}
  scons check
}

package() {
  cd ${pkgname}-${pkgver}
  install -d "${pkgdir}/usr"
  scons PREFIX="${pkgdir}/usr" install
}
