aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-ldap3/APKBUILD
blob: 3ec2ca72e484afeb3f27339b89ccf82bfc75685a (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
30
31
32
33
34
35
36
37
38
39
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=py-ldap3
_pkgname=ldap3
pkgver=2.5.1
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/$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="15b49efee10ae34d7a0a4ca156bbed1bec1e86cfd918b1e6853bee0fd3cb2c82246b04328964079c1681a9a8a2fd212208250007a68b10abbd4f11c84a140a11  py-ldap3-2.5.1.tar.gz"