2018-07-07 22:31:19 +02:00

40 lines
1.1 KiB
Plaintext

# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=py-ldap3
_pkgname=ldap3
pkgver=2.5
pkgrel=0
pkgdesc="A strictly RFC 4510 conforming LDAP V3 pure Python client"
url="https://github.com/cannatag/ldap3"
arch="noarch"
license="LGPL-3.0"
depends="py-asn1"
makedepends="python2-dev python3-dev py-setuptools"
subpackages="py2-$_pkgname:_subpackage py3-$_pkgname:_subpackage"
source="$pkgname-$pkgver.tar.gz::https://github.com/cannatag/$_pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"
options="!check" # tests need running LDAP server
build() {
cd "$builddir"
python2 setup.py build
python3 setup.py build
}
package() {
mkdir -p "$pkgdir"
}
_subpackage() {
local pyver="${subpkgname:2:1}"
local python="python$pyver"
pkgdesc="$pkgdesc (for $python)"
depends="$python ${depends//py-/py$pyver-}"
install_if="$pkgname=$pkgver-r$pkgrel $python"
cd "$builddir"
$python setup.py install --prefix=/usr --root="$subpkgdir"
}
sha512sums="c5ac00af528ff88ce0b56c6d9186d0c0561394e5262cf712d060c1c4217337e8d6c569d2caa1f748d76e0fffc90a9db2cc1135a317d045621fadba1f0de0c362 py-ldap3-2.5.tar.gz"