summaryrefslogtreecommitdiffstats
path: root/recipes-core/udev/demo-i2c-udev-conf_1.0.bb
blob: 7707df60ad278f9c3d5ff5b2bee6fdae95cd1a63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
SUMMARY = "USB attached I2C demo hardware udev configuration"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"

SRC_URI = "file://hvac-conf-in-rewrite.sh \
           file://rtc-i2c-attach.sh \
           file://hvac-conf-in-rewrite@.service \
           file://rtc-i2c-attach@.service \
           file://99-agl-led-rtc.rules \
           file://agl-service-hvac-leds.conf.in \
"

do_compile[noexec] = "1"

do_install() {
    install -d ${D}${sysconfdir}/xdg/AGL
    install -m 0644 ${WORKDIR}/agl-service-hvac-leds.conf.in ${D}${sysconfdir}/xdg/AGL

    install -d ${D}${sbindir}
    install -m 0755 ${WORKDIR}/hvac-conf-in-rewrite.sh ${D}${sbindir}
    install -m 0755 ${WORKDIR}/rtc-i2c-attach.sh ${D}${sbindir}

    if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
        install -d ${D}${systemd_system_unitdir}
        install -m 0644 ${WORKDIR}/hvac-conf-in-rewrite@.service ${D}${systemd_system_unitdir}
        install -m 0644 ${WORKDIR}/rtc-i2c-attach@.service ${D}${systemd_system_unitdir}

        install -d ${D}${sysconfdir}/udev/rules.d
        install -m 0644 ${WORKDIR}/99-agl-led-rtc.rules ${D}${sysconfdir}/udev/rules.d/
    fi
}

FILES:${PN} += "${systemd_unitdir}"

RDEPENDS:${PN} += "bash"