aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2019-09-09 10:47:54 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2019-09-09 10:47:54 +0000
commitf34f5f1e018f7d088dde93ae7900025c45cabcc2 (patch)
treea1e23714e71fa990d614e57bf78aff6b03c21f83
parentb4f25fe2ab4797860d2ccddfb3ca2f461cb2d343 (diff)
downloadaports-f34f5f1e018f7d088dde93ae7900025c45cabcc2.tar.bz2
aports-f34f5f1e018f7d088dde93ae7900025c45cabcc2.tar.xz
community/i2c-tools: moved from testing, smbus now uses python3
-rw-r--r--community/i2c-tools/APKBUILD (renamed from testing/i2c-tools/APKBUILD)21
1 files changed, 11 insertions, 10 deletions
diff --git a/testing/i2c-tools/APKBUILD b/community/i2c-tools/APKBUILD
index bd7360ae11..accffba1c1 100644
--- a/testing/i2c-tools/APKBUILD
+++ b/community/i2c-tools/APKBUILD
@@ -2,44 +2,45 @@
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=i2c-tools
pkgver=4.1
-pkgrel=0
+pkgrel=1
pkgdesc="Tools for monitoring I2C devices"
url="http://www.lm-sensors.org/wiki/I2CTools"
arch="all"
license="GPL-2.0"
-makedepends="linux-headers py-setuptools python2-dev"
-subpackages="$pkgname-dev $pkgname-doc py-smbus:py"
+options="!check" #no test/check provided by upstream
+makedepends="linux-headers python3-dev"
+subpackages="$pkgname-dev $pkgname-doc py3-smbus:py"
source="https://fossies.org/linux/misc/$pkgname-$pkgver.tar.gz"
builddir="$srcdir"/$pkgname-$pkgver
prepare() {
- cd "$builddir"
+ default_prepare
sed -i "s|^DESTDIR.*|DESTDIR = \"$pkgdir\"|" Makefile
sed -i "s|^prefix.*|prefix = /usr|" Makefile
sed -i "s|^PREFIX.*|PREFIX = /usr|" Makefile
}
build() {
- cd "$builddir"
make
cd "$builddir"/py-smbus
- CFLAGS="$CFLAGS -I${builddir}/include" python2 setup.py build
+ CFLAGS="$CFLAGS -I${builddir}/include" python3 setup.py build
}
py() {
pkgdesc="$pkgname python bindings"
- mkdir -p "$subpkgdir/usr/lib/python2.7/site-packages"
- mv "$pkgdir"/usr/lib/python2.7/* $subpkgdir/usr/lib/python2.7
+ provides="py-smbus=$pkgver-r$pkgrel"
+ replaces="py-smbus"
+ install -d "$subpkgdir"/usr/lib
+ mv "$pkgdir"/usr/lib/python3* "$subpkgdir"/usr/lib
}
package() {
- cd "$builddir"
make install
cd "$builddir"/py-smbus
- python2 setup.py install --prefix=/usr --root="$pkgdir"
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
}
sha512sums="e0dc3e8d9372658ee132332d695b9ad8537cddb63362e1b860b66d07516f33f50d3b67fbaf9769ba4affc1e20513522bfbd92f327c5c060b62be99c527609df6 i2c-tools-4.1.tar.gz"