aboutsummaryrefslogtreecommitdiffstats
path: root/community/py-pyldap/APKBUILD
blob: f0ad9225bb1ee7bf6eed6d829df56aa5593605a1 (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
40
41
42
43
44
45
46
47
48
49
50
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=py-pyldap
_pkgname=${pkgname#py-}
pkgver=2.4.28
_vermajor=${pkgver%%.*}
_verminor=${pkgver#*.}; _verminor=${_verminor%%.*}
pkgrel=1
pkgdesc="Python modules for implementing LDAP clients"
url="https://github.com/pyldap/pyldap"
arch="all"
license="PSF"
depends="libldap>=$_vermajor.$_verminor"
makedepends="python2-dev python3-dev openldap-dev>=$_vermajor.$_verminor"
subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3"
source="https://github.com/$_pkgname/$_pkgname/archive/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$_pkgname-$pkgver"

build() {
	cd "$builddir"

	python2 setup.py build || return 1
	python3 setup.py build
}

package() {
	mkdir -p "$pkgdir"
}

_py2() {
	replaces="$pkgname"
	_py python2
}

_py3() {
	_py python3
}

_py() {
	local python="$1"
	pkgdesc="$pkgdesc (for $python)"
	install_if="$pkgname=$pkgver-r$pkgrel $python"

	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
}

md5sums="6d9a5f735d43e108c3e1511cbc1099cf  pyldap-2.4.28.tar.gz"
sha256sums="a2e57dc31d055279c8e33bf83a9a3a6fac1a583bf353bf3ddcc1d4f100322be4  pyldap-2.4.28.tar.gz"
sha512sums="3d949965d58ecd68ca4a26e971868b917bf001093cd5fed49784475334ec0edb52917e6e74f0756ea1742f8d499319fa47a215a10c0bc7fc8979545dd33113d8  pyldap-2.4.28.tar.gz"