# $Id: PKGBUILD 66690 2012-02-27 11:59:35Z cbrannon $
# Maintainer: Chris Brannon <chris@the-brannons.com>
# Contributor: Aaron Schaefer <aaron@elasticdog.com>

pkgname=python-flup
pkgver=1.0.2
pkgrel=3
pkgdesc='A collection of Python WSGI modules'
arch=('any')
url='http://trac.saddi.com/flup'
license=('MIT')
depends=('python2')
makedepends=('python2-distribute')
source=("http://www.saddi.com/software/flup/dist/flup-$pkgver.tar.gz"
        'LICENSE')
md5sums=('24dad7edc5ada31dddd49456ee8d5254'
         '2b61db5f66aad3b1748085e146603bd1')

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

  # python2 fix
  for file in flup/server/*.py; do
    sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_' $file
  done

  python2 setup.py install --root="$pkgdir"

  install -D -m644 ../LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
