1SUMMARY = "PLDM Stack"
2DESCRIPTION = "Implementation of the PLDM specifications"
3PR = "r1"
4PV = "1.0+git${SRCPV}"
5
6inherit meson pkgconfig
7inherit systemd
8
9require pldm.inc
10
11DEPENDS += "function2"
12DEPENDS += "systemd"
13DEPENDS += "sdeventplus"
14DEPENDS += "phosphor-dbus-interfaces"
15DEPENDS += "nlohmann-json"
16DEPENDS += "cli11"
17
18S = "${WORKDIR}/git"
19
20SYSTEMD_SERVICE:${PN} += "pldmd.service"
21SYSTEMD_SERVICE:${PN} += "pldmSoftPowerOff.service"
22
23EXTRA_OEMESON = " \
24        -Dtests=disabled \
25        -Doem-ibm=disabled \
26        "
27
28# Install pldmSoftPowerOff.service in correct targets
29pkg_postinst:${PN} () {
30
31    mkdir -p $D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires
32    LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/pldmSoftPowerOff.service"
33    TARGET="../pldmSoftPowerOff.service"
34    ln -s $TARGET $LINK
35
36    mkdir -p $D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires
37    LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/pldmSoftPowerOff.service"
38    TARGET="../pldmSoftPowerOff.service"
39    ln -s $TARGET $LINK
40}
41
42pkg_prerm:${PN} () {
43
44    LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.requires/pldmSoftPowerOff.service"
45    rm $LINK
46
47    LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.requires/pldmSoftPowerOff.service"
48    rm $LINK
49}
50