SPEC-3723: restructure meta-agl-demo
[AGL/meta-agl-demo.git] / recipes-core / udev / usb-can-udev-conf_1.0.bb
1 SUMMARY = "USB CAN adapter udev configuration"
2 LICENSE = "MIT"
3 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4
5 SRC_URI = "file://60-usb-can.rules \
6            file://slcand@.service \
7            file://slcand-default \
8 "
9
10 do_compile[noexec] = "1"
11
12 do_install() {
13     if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
14         install -d ${D}${sysconfdir}/udev/rules.d
15         install -m 0644 ${WORKDIR}/60-usb-can.rules ${D}${sysconfdir}/udev/rules.d/
16         install -d ${D}${systemd_system_unitdir}
17         install -m 0644 ${WORKDIR}/slcand@.service ${D}${systemd_system_unitdir}/
18         install -d ${D}${sysconfdir}/default
19         install -m 0644 ${WORKDIR}/slcand-default ${D}${sysconfdir}/default/slcand
20     fi
21 }
22
23 FILES_${PN} += "${systemd_system_unitdir}"
24
25 RDEPENDS_${PN} += "systemd"