diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-07-18 21:04:37 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-07-18 21:18:41 +0200 |
commit | 0cb416a6176d97b8817fe2c8ae069f01d62dda96 (patch) | |
tree | ec68579065d9fa2dee32f152c5f3b5a0254dad2f /testing/py-pyldap | |
parent | acd5f0ea2171768d920ce726d271a15515b9f26a (diff) | |
download | aports-0cb416a6176d97b8817fe2c8ae069f01d62dda96.tar.bz2 aports-0cb416a6176d97b8817fe2c8ae069f01d62dda96.tar.xz |
testing/py-pyldap: add subpackages for python2 and python3
Diffstat (limited to 'testing/py-pyldap')
-rw-r--r-- | testing/py-pyldap/APKBUILD | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/testing/py-pyldap/APKBUILD b/testing/py-pyldap/APKBUILD index b2030b27e6..48b9356e45 100644 --- a/testing/py-pyldap/APKBUILD +++ b/testing/py-pyldap/APKBUILD @@ -1,29 +1,49 @@ # Contributor: Jakub Jirutka <jakub@jirutka.cz> # Maintainer: Jakub Jirutka <jakub@jirutka.cz> pkgname=py-pyldap -_pkgname=${pkgname/py-/} +_pkgname=${pkgname#py-} pkgver=2.4.25.1 _vermajor=${pkgver%%.*} _verminor=${pkgver#*.}; _verminor=${_verminor%%.*} -pkgrel=0 +pkgrel=1 pkgdesc="Python modules for implementing LDAP clients" url="https://github.com/pyldap/pyldap" -arch="all" +arch="noarch" license="PSF" -depends="python libldap>=$_vermajor.$_verminor" -makedepends="python-dev openldap-dev>=$_vermajor.$_verminor" +depends="libldap>=$_vermajor.$_verminor" +makedepends="python-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" + python 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)" + arch="all" + install_if="$pkgname=$pkgver-r$pkgrel $python" + cd "$builddir" - python setup.py install --prefix=/usr --root="$pkgdir" || return 1 + $python setup.py install --prefix=/usr --root="$subpkgdir" } md5sums="f64a5506ef98c433bb9e72f3fa073db8 pyldap-2.4.25.1.tar.gz" |