1SUMMARY = "Bletchley SLED Present Service"
2DESCRIPTION = "OpenBMC Quanta Detect Present Daemon."
3PR = "r1"
4LICENSE = "Apache-2.0"
5LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
6
7inherit obmc-phosphor-systemd
8
9DEPENDS += "systemd"
10RDEPENDS:${PN} += " bash phosphor-gpio-monitor-presence"
11
12SRC_URI = " file://detect-sled-present \
13            file://detect-sled-present@.service \
14            file://bletchley-sled-insertion@.target \
15            file://bletchley-sled-removal@.target \
16          "
17
18do_install() {
19    install -d ${D}${bindir}
20    install -m 0755 ${WORKDIR}/detect-sled-present ${D}${bindir}/
21
22    install -d ${D}${systemd_system_unitdir}
23    install -m 0644 ${WORKDIR}/detect-sled-present@.service ${D}${systemd_system_unitdir}
24    install -m 0644 ${WORKDIR}/bletchley-sled-insertion@.target ${D}${systemd_system_unitdir}
25    install -m 0644 ${WORKDIR}/bletchley-sled-removal@.target ${D}${systemd_system_unitdir}
26}
27
28TGT = "${SYSTEMD_DEFAULT_TARGET}"
29
30SLED_PRESENT_INSTFMT="../detect-sled-present@.service:${TGT}.wants/detect-sled-present@{0}.service"
31SYSTEMD_SERVICE:${PN} += "detect-sled-present@.service"
32SYSTEMD_LINK:${PN} += "${@compose_list(d, 'SLED_PRESENT_INSTFMT', 'OBMC_HOST_INSTANCES')}"
33
34SLED_INSERT_INSTFMT="../bletchley-sled-insertion@.target:${TGT}.wants/bletchley-sled-insertion@{0}.target"
35SYSTEMD_SERVICE:${PN} += "bletchley-sled-insertion@.target"
36SYSTEMD_LINK:${PN} += "${@compose_list(d, 'SLED_INSERT_INSTFMT', 'OBMC_HOST_INSTANCES')}"
37
38SLED_REMOVE_INSTFMT="bletchley-sled-removal@.target:bletchley-sled-removal@{0}.target"
39SYSTEMD_SERVICE:${PN} += "bletchley-sled-removal@.target"
40SYSTEMD_LINK:${PN} += "${@compose_list(d, 'SLED_REMOVE_INSTFMT', 'OBMC_HOST_INSTANCES')}"
41