From fb32ad0e8aee1003d5c6fba27b27bd170346e588 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 9 Nov 2016 02:54:55 +0000 Subject: community/py-batinfo: fix and clean-up abuild --- community/py-batinfo/APKBUILD | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'community') diff --git a/community/py-batinfo/APKBUILD b/community/py-batinfo/APKBUILD index 1b6a9f76df..30055d074e 100644 --- a/community/py-batinfo/APKBUILD +++ b/community/py-batinfo/APKBUILD @@ -3,24 +3,21 @@ pkgname=py-batinfo _pkgname=batinfo pkgver=0.3 -pkgrel=0 +pkgrel=1 pkgdesc="A simple Python lib to retreive battery information" url="https://github.com/nicolargo/batinfo" arch="noarch" license="LGPL3+" depends="" -depends_dev="" makedepends="python2-dev py-setuptools python3-dev" -install="" -subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2" +subpackages="py3-${pkgname#py-}:_py3 py2-${pkgname#py-}:_py2" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" - -builddir="$srcdir"/$_pkgname-$pkgver +builddir="$srcdir/$_pkgname-$pkgver" build() { cd "$builddir" python2 setup.py build || return 1 - python3 setup.py build || return 1 + python3 setup.py build || return 1 } package() { @@ -28,16 +25,18 @@ package() { } _py() { - local python=$1 - pkgdesc="$pkgdesc - $python" - install_if="$pkgname=$pkgver-r$pkgrel $python" + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + install_if="$pkgname=$pkgver-r$pkgrel $python" + cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } _py2() { - _py python2 replaces="$pkgname" + _py python2 } _py3() { -- cgit v1.2.3