summaryrefslogtreecommitdiffstats
path: root/python-otr/PKGBUILD
blob: 2aaf0ea810df63282efe24e8594180aeb525ede2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Contributor: Andre Klitzing <aklitzing () online () de>

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
}