aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2016-11-09 02:54:55 +0000
committerJakub Jirutka <jakub@jirutka.cz>2016-11-09 20:41:36 +0100
commitfb32ad0e8aee1003d5c6fba27b27bd170346e588 (patch)
tree15c8a0609cc1555612c9f6ec12cc947bdf28e897 /community
parent6c71e9cd1dd8b681f197e60bb0627291baecf00c (diff)
downloadaports-fb32ad0e8aee1003d5c6fba27b27bd170346e588.tar.bz2
aports-fb32ad0e8aee1003d5c6fba27b27bd170346e588.tar.xz
community/py-batinfo: fix and clean-up abuild
Diffstat (limited to 'community')
-rw-r--r--community/py-batinfo/APKBUILD21
1 files changed, 10 insertions, 11 deletions
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() {