Add udev rules and scripts for demo platform configuration
[AGL/meta-agl-demo.git] / recipes-core / udev / demo-i2c-udev-conf_1.0.bb
1 SUMMARY = "USB attached I2C demo hardware udev configuration"
2 LICENSE = "MIT"
3 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4
5 SRC_URI = "file://hvac-json-in-rewrite.sh \
6            file://rtc-i2c-attach.sh \
7            file://hvac-json-in-rewrite@.service \
8            file://rtc-i2c-attach@.service \
9            file://99-agl-led-rtc.rules \
10            file://hvac.json.in \
11 "
12
13 do_compile[noexec] = "1"
14
15 do_install() {
16     install -d ${D}${sysconfdir}
17     install -m 0644 ${WORKDIR}/hvac.json.in ${D}${sysconfdir}
18
19     install -d ${D}${sbindir}
20     install -m 0755 ${WORKDIR}/hvac-json-in-rewrite.sh ${D}${sbindir}
21     install -m 0755 ${WORKDIR}/rtc-i2c-attach.sh ${D}${sbindir}
22
23     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
24         install -d ${D}${systemd_system_unitdir}
25         install -m 0644 ${WORKDIR}/hvac-json-in-rewrite@.service ${D}${systemd_system_unitdir}
26         install -m 0644 ${WORKDIR}/rtc-i2c-attach@.service ${D}${systemd_system_unitdir}
27
28         install -d ${D}${sysconfdir}/udev/rules.d
29         install -m 0644 ${WORKDIR}/99-agl-led-rtc.rules ${D}${sysconfdir}/udev/rules.d/
30     fi
31 }
32
33 FILES_${PN} += "${systemd_unitdir}"
34
35 RDEPENDS_${PN} += "bash"