desktop/python-paramiko/PKGBUILD
AlmAck 08a66c4024 python3 rebuild for 3.5
new pkg added to fullfill checkdepends
new order file python3.order
2016-03-16 22:36:13 +01:00

49 lines
1.6 KiB
Bash

pkgbase=python-paramiko
pkgname=('python3-paramiko' 'python2-paramiko')
pkgver=1.16.0
pkgrel=2
pkgdesc="Python module that implements the SSH2 protocol"
url="https://github.com/paramiko/paramiko/"
license=('LGPL')
arch=('any')
makedepends=('python3-ecdsa' 'python2-ecdsa' 'python3-crypto' 'python2-crypto')
source=("http://pypi.python.org/packages/source/p/paramiko/paramiko-$pkgver.tar.gz")
sha256sums=('3297ebd3cd072f573772f7c7426939a443c62c458d54bb632ff30fd6ecf96892')
prepare() {
cp -a paramiko-$pkgver{,-py2}
find paramiko-$pkgver-py2 -name '*.py' -print0 | xargs -0 \
sed -i -e 's,^#!/usr/bin/env python$,#!/usr/bin/env python2,' \
-e 's,^#!/usr/bin/python$,#!/usr/bin/python2,'
}
#check() {
# cd "$srcdir/paramiko-$pkgver"
# LANG=en_US.UTF-8 python3 test.py
# cd "$srcdir/paramiko-$pkgver-py2"
# LANG=en_US.UTF-8 python2 test.py
#}
package_python3-paramiko() {
depends=('python3-crypto' 'python3-ecdsa')
cd "$srcdir/paramiko-$pkgver"
python3 setup.py install --root="$pkgdir" --optimize=1
install -Dm644 README "$pkgdir/usr/share/doc/$pkgname/README"
install -dm755 "$pkgdir/usr/share/doc/$pkgname/demos"
install -m644 demos/* "$pkgdir/usr/share/doc/$pkgname/demos"
chmod 755 "$pkgdir/usr/share/doc/$pkgname/demos/"*.py
}
package_python2-paramiko() {
depends=('python2-crypto' 'python2-ecdsa')
cd "$srcdir/paramiko-$pkgver-py2"
python2 setup.py install --root="$pkgdir" --optimize=1
install -Dm644 README "$pkgdir/usr/share/doc/$pkgname/README"
install -dm755 "$pkgdir/usr/share/doc/$pkgname/demos"
install -m644 demos/* "$pkgdir/usr/share/doc/$pkgname/demos"
chmod 755 "$pkgdir/usr/share/doc/$pkgname/demos/"*.py
}