aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-06-06 14:25:08 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-06-06 14:25:12 +0000
commit269957ae8c6b0cd7bf622a052dd973fa6abb2d31 (patch)
tree26ae2aefff6f03ab688f6fc85274ff27b034650c /testing
parent99e18591250afff838d360b0aeed05e07d846c71 (diff)
downloadaports-269957ae8c6b0cd7bf622a052dd973fa6abb2d31.tar.bz2
aports-269957ae8c6b0cd7bf622a052dd973fa6abb2d31.tar.xz
testing/i2c-tools: added py-smbus subpackage
Diffstat (limited to 'testing')
-rw-r--r--testing/i2c-tools/APKBUILD40
1 files changed, 24 insertions, 16 deletions
diff --git a/testing/i2c-tools/APKBUILD b/testing/i2c-tools/APKBUILD
index 25c7e7c694..69765a8971 100644
--- a/testing/i2c-tools/APKBUILD
+++ b/testing/i2c-tools/APKBUILD
@@ -1,41 +1,49 @@
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
+# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=i2c-tools
pkgver=3.1.2
-pkgrel=1
+pkgrel=2
pkgdesc="Tools for monitoring I2C devices"
url="http://www.lm-sensors.org/wiki/I2CTools"
arch="all"
license="GPL2"
depends=
-depends_dev=
-makedepends="$depends_dev linux-headers"
+depends_dev=""
+makedepends="$depends_dev linux-headers py-setuptools python-dev"
install=
-subpackages="$pkgname-dev $pkgname-doc"
-source="http://dl.lm-sensors.org/i2c-tools/releases/$pkgname-$pkgver.tar.bz2"
+subpackages="$pkgname-dev $pkgname-doc py-smbus:py"
+source="http://fossies.org/linux/misc/$pkgname-$pkgver.tar.gz"
-
-_builddir="$srcdir"/$pkgname-$pkgver
+builddir="$srcdir"/$pkgname-$pkgver
prepare() {
- cd "$_builddir"
+ cd "$builddir"
sed -i "s|^DESTDIR.*|DESTDIR = \"$pkgdir\"|" Makefile || return 1
sed -i "s|^prefix.*|prefix = /usr|" Makefile || return 1
}
build() {
- cd "$_builddir"
+ cd "$builddir"
make || return 1
+
+ cd "$builddir"/py-smbus
+ CFLAGS="$CFLAGS -I${builddir}/include" python setup.py build || return 1
+}
+
+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
}
package() {
- cd "$_builddir"
+ cd "$builddir"
make install
- # remove the 2 lines below (and this) if there is no init.d script
- # install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
- # install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
+ cd "$builddir"/py-smbus
+ python setup.py install --prefix=/usr --root="$pkgdir" || return 1
}
-md5sums="7104a1043d11a5e2c7b131614eb1b962 i2c-tools-3.1.2.tar.bz2"
-sha256sums="db5e69f2e2a6e3aa2ecdfe6a5f490b149c504468770f58921c8c5b8a7860a441 i2c-tools-3.1.2.tar.bz2"
-sha512sums="d54496939036ace41b73470d515c50c89d89bed4e9cc89cd72b21ca381756131dcfbeb8bd7299e66eaa6f1d63a82da3065edd3407f6c3f23d5f589686488ea40 i2c-tools-3.1.2.tar.bz2"
+md5sums="c060468354d680286e9f75767b57a781 i2c-tools-3.1.2.tar.gz"
+sha256sums="f939a6242c03950cc568d0efdfa3db7a9c29e0e8f5abd01f2908bdd344c054ff i2c-tools-3.1.2.tar.gz"
+sha512sums="ff2d22193339f3e761c3b3c0746e9b69ba9fe9c4707c6642568a83579df64a05ae9847735df59ac8c8093bd4b3bf8385f0ce7e7a46bb34e9e6b964be695298e7 i2c-tools-3.1.2.tar.gz"