diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2016-09-15 06:24:00 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2016-09-15 06:24:00 +0000 |
commit | 9bca557a059449f19ba2b83a3c73ed39a7d8b3e9 (patch) | |
tree | 080f9a59e1a83a57497b874b443fb9a4c722bd01 | |
parent | fafe26db0feaa540b3e13a1e45253e4b6e1a8c50 (diff) | |
download | aports-9bca557a059449f19ba2b83a3c73ed39a7d8b3e9.tar.bz2 aports-9bca557a059449f19ba2b83a3c73ed39a7d8b3e9.tar.xz |
community/py-libcloud: moved from testing, improved APKBUILD
-rw-r--r-- | community/py-libcloud/APKBUILD (renamed from testing/py-libcloud/APKBUILD) | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/testing/py-libcloud/APKBUILD b/community/py-libcloud/APKBUILD index de48178420..b7b2e51e73 100644 --- a/testing/py-libcloud/APKBUILD +++ b/community/py-libcloud/APKBUILD @@ -1,39 +1,37 @@ # Contributor: Francesco Colista <fcolista@alpinelinux.org> # Maintainer: Francesco Colista <fcolista@alpinelinux.org> pkgname=py-libcloud +_pkgname=${pkgname/py-/} pkgver=1.1.0 -pkgrel=0 +pkgrel=1 pkgdesc="Python library for interacting with many of the popular cloud service providers using a unified API." url="http://libcloud.apache.org/" arch="noarch" license="APACHE2" depends="" -makedepends="py-setuptools python-dev python3-dev" +makedepends="py-setuptools python2-dev python3-dev" install="" subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2" source="$pkgname-$pkgver.tar.gz::https://github.com/apache/${pkgname/py-/}/archive/v$pkgver.tar.gz" -builddir="$srcdir/${pkgname/py-/}-$pkgver" + +builddir="$srcdir"/$_pkgname-$pkgver build() { cd "$builddir" - python setup.py build || return 1 + python2 setup.py build || return 1 python3 setup.py build || return 1 } package() { - cd "$builddir" - python setup.py install --root=$pkgdir/ --optimize=1 || return 1 - python3 setup.py install --root=$pkgdir/ --optimize=1 || return 1 + mkdir -p "$pkgdir" } _py() { local python=$1 pkgdesc="$pkgdesc - $python" - install_if="$pkgname=$pkgver-r$pkgrel $python" - local dir=$($python -c 'import sysconfig; print(sysconfig.get_path("stdlib"))') - - mkdir -p "$subpkgdir"${dir} - mv "$pkgdir"${dir}/* "$subpkgdir"${dir} + install_if="$pkgname=$pkgver-r$pkgrel $python" + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" } _py2() { |