# Contributor: Pierre-Gildas MILLON # Maintainer: Olivier Mauras pkgname=py-pygit2 _pkgname=pygit2 pkgver=0.24.1 pkgrel=3 pkgdesc="Python bindings for libgit2" url="https://github.com/libgit2/pygit2" arch="noarch" license="GPLv2" subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3" depends="" makedepends="python2-dev python3-dev py-setuptools py2-cffi py3-cffi py2-six py3-six libgit2-dev libssh2-dev libressl-dev" source="$pkgname-$pkgver.tar.gz::https://github.com/libgit2/$_pkgname/archive/v${pkgver}.tar.gz" builddir="$srcdir/$_pkgname-$pkgver" build() { cd "$builddir" python2 setup.py build || return 1 python3 setup.py build || return 1 } package() { mkdir -p "$pkgdir" } _py2() { replaces="$pkgname" depends="py2-cffi py2-six" _py python2 } _py3() { depends="py3-cffi py3-six" _py python3 } _py() { local python=$1 arch="all" pkgdesc="$pkgdesc - $python" depends="$depends $python libgit2" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" || return 1 } md5sums="d9915e3f8a7da65af3ea70f5bc02967d py-pygit2-0.24.1.tar.gz" sha256sums="e62bd35c39b4dec64a8a35ab688e98352603c21a6b254473763868a45110fb47 py-pygit2-0.24.1.tar.gz" sha512sums="a6ac980d20f9342cefbb3646cef0b99b75037813d11e64797a62c8df5f0cc2d4a8397c266caf25f49d9c2e2cb47b0087e38e64527ef59385ddb00023cb04ab0f py-pygit2-0.24.1.tar.gz"