# Contributor: Andre Klitzing pkgname=python-otr pkgver=0.2.1.1 pkgrel=1 pkgdesc="Simple python bindings for OTR" arch=('i686' 'x86_64') url="http://python-otr.pentabarf.de" license=('GPL') depends=('libotr>=3.2.0' 'python') makedepends=('swig') conflicts=('pyotr') replaces=('pyotr') source=(http://$pkgname.pentabarf.de/releases/$pkgname-$pkgver.tar.gz) md5sums=('e753e6516d611d0c37a3fc785fb29b21') build() { cd $srcdir/$pkgname-$pkgver # Great python3 rebuild for file in $(find . -name '*.py' -print); do sed -i 's_^#!.*/usr/bin/python_#!/usr/bin/python2_' "${file}" sed -i 's_^#!.*/usr/bin/env.*python_#!/usr/bin/env python2_' "${file}" done python2 setup.py build || return 1 python2 setup.py install --prefix=/usr --root=$pkgdir || return 1 }