PKGBUILDs/extra/i2c-tools/PKGBUILD
2024-04-27 15:32:22 +00:00

50 lines
1.7 KiB
Bash

# Maintainer: Morten Linderud <foxboron@archlinux.org>
# Contributor: Timothy Redaelli <timothy.redaelli@gmail.com>
# Contributor: DonVla <donvla@users.sourceforge.net>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - !makeflags because concurrency fails
pkgname=i2c-tools
pkgver=4.3
pkgrel=6
pkgdesc="Heterogeneous set of I2C tools for Linux that used to be part of lm-sensors"
arch=('x86_64')
url="https://i2c.wiki.kernel.org/index.php/I2C_Tools"
license=('GPL')
depends=('perl')
makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel')
options=('!makeflags')
optdepends=('read-edid: for decode-edid script'
'python: for smbus module')
source=(
"https://www.kernel.org/pub/software/utils/i2c-tools/$pkgname-$pkgver.tar.xz"
"https://www.kernel.org/pub/software/utils/i2c-tools/$pkgname-$pkgver.tar.sign"
"$pkgname.sysusers"
"45-i2c-tools.rules"
)
sha256sums=('1f899e43603184fac32f34d72498fc737952dbc9c97a8dd9467fadfdf4600cf9'
'SKIP'
'bf5ee4f9876505628c5ce84e84e918c70d66be70b766d62bb138e294608ffbae'
'af9dbdc771023cd04f5b0c638c30356e6a824b32f0c04ea61fe929c71122bccd')
validpgpkeys=(
'7CA69F4460F1BDC41FD2C858A5526B9BB3CD4E6A' # Jean Delvare
)
build() {
cd ${pkgname}-${pkgver}
make EXTRA="eeprog"
cd py-smbus
python -m build -wn
}
package() {
cd ${pkgname}-${pkgver}
make EXTRA="eeprog" PREFIX="${pkgdir}/usr" sbindir="$pkgdir/usr/bin" install
cd py-smbus
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 "${srcdir}/$pkgname.sysusers" "${pkgdir}/usr/lib/sysusers.d/$pkgname.conf"
install -Dm644 "${srcdir}/45-i2c-tools.rules" "${pkgdir}/usr/lib/udev/rules.d/45-i2c-tools.rules"
}
# vim:set ts=2 sw=2 et: