blob: bcf1bed23458f7458905e6e657ed9e41206d4b4a [file] [log] [blame]
Deepak Kodihalli7a113ee2019-10-14 01:23:27 -05001SUMMARY = "PLDM Stack"
2DESCRIPTION = "Implementation of the PLDM specifications"
3PR = "r1"
4PV = "1.0+git${SRCPV}"
5
6inherit meson pkgconfig
Deepak Kodihallia7482012020-06-22 05:25:35 -05007inherit systemd
Deepak Kodihalli7a113ee2019-10-14 01:23:27 -05008
9require pldm.inc
10
Tom Josephf6785aa2021-06-15 07:12:34 -070011DEPENDS += "function2"
Deepak Kodihalli7a113ee2019-10-14 01:23:27 -050012DEPENDS += "systemd"
Matt Spinlere2375b52020-01-20 14:09:47 -060013DEPENDS += "sdeventplus"
Deepak Kodihalli7a113ee2019-10-14 01:23:27 -050014DEPENDS += "phosphor-dbus-interfaces"
15DEPENDS += "nlohmann-json"
Deepak Kodihalli7a113ee2019-10-14 01:23:27 -050016DEPENDS += "cli11"
17
18S = "${WORKDIR}/git"
19
Patrick Williams12fc9392021-08-06 09:16:53 -050020SYSTEMD_SERVICE:${PN} += "pldmd.service"
21SYSTEMD_SERVICE:${PN} += "pldmSoftPowerOff.service"
Deepak Kodihallia7482012020-06-22 05:25:35 -050022
Deepak Kodihalli7a113ee2019-10-14 01:23:27 -050023EXTRA_OEMESON = " \
24 -Dtests=disabled \
25 -Doem-ibm=disabled \
26 "
Andrew Geissler0c3d0e22020-10-28 16:43:35 -050027
28# Install pldmSoftPowerOff.service in correct targets
Patrick Williams12fc9392021-08-06 09:16:53 -050029pkg_postinst:${PN} () {
Andrew Geissler0c3d0e22020-10-28 16:43:35 -050030
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
Patrick Williams12fc9392021-08-06 09:16:53 -050042pkg_prerm:${PN} () {
Andrew Geissler0c3d0e22020-10-28 16:43:35 -050043
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}