1SUMMARY = "Set of i2c tools for linux"
2HOMEPAGE = "https://i2c.wiki.kernel.org/index.php/I2C_Tools"
3DESCRIPTION = "The i2c-tools package contains a heterogeneous set of I2C tools for Linux: a bus probing tool, a chip dumper, register-level SMBus access helpers, EEPROM decoding scripts, EEPROM programming tools, and a python module for SMBus access. All versions of Linux are supported, as long as I2C support is included in the kernel."
4SECTION = "base"
5LICENSE = "GPL-2.0-or-later"
6LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
7
8SRC_URI = "${KERNELORG_MIRROR}/software/utils/i2c-tools/${BP}.tar.gz \
9"
10
11SRC_URI[sha256sum] = "04d1e3b0cd88df8fb96e7709f374dd0b3561191b4c0363eaf873a074b8b7cb22"
12
13inherit update-alternatives
14
15EXTRA_OEMAKE = "bindir=${bindir} sbindir=${sbindir} \
16                incdir=${includedir} libdir=${libdir} \
17                mandir=${mandir} \
18                EXTRA=eeprog"
19
20do_install() {
21    oe_runmake 'DESTDIR=${D}' install
22}
23
24PACKAGES =+ "${PN}-misc"
25FILES:${PN}-misc = "${sbindir}/i2c-stub-from-dump \
26                        ${bindir}/ddcmon \
27                        ${bindir}/decode-edid \
28                        ${bindir}/decode-dimms \
29                        ${bindir}/decode-vaio \
30                       "
31RDEPENDS:${PN}-misc = "${PN} perl perl-module-posix \
32                       perl-module-constant perl-module-file-basename \
33                       perl-module-fcntl perl-module-strict perl-module-vars \
34		       perl-module-carp \
35                      "
36
37ALTERNATIVE_PRIORITY = "100"
38ALTERNATIVE:${PN} = "i2cdetect i2cdump i2cget i2cset i2ctransfer"
39ALTERNATIVE_LINK_NAME[i2cdetect] = "${sbindir}/i2cdetect"
40ALTERNATIVE_LINK_NAME[i2cdump] = "${sbindir}/i2cdump"
41ALTERNATIVE_LINK_NAME[i2cget] = "${sbindir}/i2cget"
42ALTERNATIVE_LINK_NAME[i2cset] = "${sbindir}/i2cset"
43ALTERNATIVE_LINK_NAME[i2ctransfer] = "${sbindir}/i2ctransfer"
44