# $Id: PKGBUILD 82841 2013-01-24 23:50:32Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Brad Fanella <bradfanella@archlinux.us>
# Contributor: fnord0 <fnord0 AT riseup DOT net>

pkgname=python2-pylorcon
pkgver=2
pkgrel=3
_pyver=2.7
pkgdesc='Wrapper for the LORCON (Loss Of Radio CONnectivity) library'
arch=('any')
url='https://github.com/tom5760/pylorcon2'
license=('GPL2')
depends=("python2>=$pyver" 'lorcon')
replaces=('pylorcon')
source=("pylorcon2.zip::https://github.com/tom5760/pylorcon$pkgver/zipball/master")
sha256sums=('194bf213b67823f657e22c025fce6664c66ac0cb8be7b4a497584c01fa6deaec')

build() {
  cd "$srcdir/tom5760-pylorcon2-aeb74d1/"

  sed -i '0,/on/s//on2/' lorcon.py
}

package() {
  cd "$srcdir/tom5760-pylorcon2-aeb74d1/"

  install -Dm644 lorcon.py \
    "$pkgdir/usr/lib/python2.7/site-packages/PyLorcon2.py"
}

# vim:set ts=2 sw=2 et:
