# $Id: PKGBUILD 72621 2012-06-17 15:31:27Z bgyorgy $
# Maintainer: Balló György <ballogyor+arch at gmail dot com>

_pkgname=ubuntuone-storage-protocol
pkgname=python2-ubuntuone-storageprotocol
pkgver=3.0.2
pkgrel=2
pkgdesc="Library for the Ubuntu One storage protocol, which is written using google protocol buffers, and some wrapper libraries in python"
arch=('any')
url="https://launchpad.net/ubuntuone-storage-protocol"
license=('AGPL')
depends=('python2-oauth' 'python2-pyopenssl' 'protobuf-python' 'twisted')
makedepends=('python2-distribute')
source=(http://launchpad.net/$_pkgname/stable-3-0/$pkgver/+download/$_pkgname-$pkgver.tar.gz)
md5sums=('cd159936ca73b8e6766299c165cdae59')

build() {
  cd "$srcdir/$_pkgname-$pkgver"

  python2 setup.py build
}

package() {
  cd "$srcdir/$_pkgname-$pkgver"

  python2 setup.py install --root=$pkgdir/ --optimize=1

  # Remove conflicting cert file
  rm "$pkgdir/etc/ssl/certs/ValiCert_Class_2_VA.pem"
}
