void-packages/srcpkgs/i2c-tools/template

53 lines
1.3 KiB
Bash

# Template file for 'i2c-tools'
pkgname=i2c-tools
version=4.4
revision=1
build_style=gnu-makefile
build_helper=python3
make_install_args="sbindir=/usr/bin"
hostmakedepends="python3 python3-build python3-installer python3-wheel"
makedepends="python3-devel"
depends="perl"
short_desc="Heterogeneous set of I2C tools"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="GPL-2.0-or-later"
homepage="https://i2c.wiki.kernel.org/index.php/I2C_Tools"
distfiles="https://mirrors.edge.kernel.org/pub/software/utils/i2c-tools/i2c-tools-${version}.tar.xz"
checksum=8b15f0a880ab87280c40cfd7235cfff28134bf14d5646c07518b1ff6642a2473
system_groups="i2c"
post_build() {
(
cd py-smbus
python -m build --no-isolation --wheel .
)
}
post_install() {
vinstall "${FILESDIR}/45-i2c-tools.rules" 644 usr/lib/udev/rules.d
(
cd py-smbus
python -m installer --destdir="$DESTDIR" dist/*.whl
)
}
i2c-tools-devel_package() {
short_desc+=" - development files"
depends="${sourcepkg}>=${version}_${revision}"
pkg_install() {
vmove usr/include
vmove usr/share/man/man3
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}
python3-smbus_package() {
short_desc+="Python 3 bindings for libi2c from i2c-tools"
depends="${sourcepkg}>=${version}_${revision}"
lib32disabled=yes
pkg_install() {
vmove "usr/lib/python3.*"
}
}