blob: 4c9cbc983a2d5a6ccfbdf622ba57d19960f8af43 [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
Manojkiran Eda842eb7f2021-09-15 18:47:42 +053031 mkdir -p $D$systemd_system_unitdir/obmc-host-shutdown@0.target.wants
32 LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.wants/pldmSoftPowerOff.service"
Andrew Geissler0c3d0e22020-10-28 16:43:35 -050033 TARGET="../pldmSoftPowerOff.service"
34 ln -s $TARGET $LINK
35
Manojkiran Eda842eb7f2021-09-15 18:47:42 +053036 mkdir -p $D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.wants
37 LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.wants/pldmSoftPowerOff.service"
Andrew Geissler0c3d0e22020-10-28 16:43:35 -050038 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
Manojkiran Eda842eb7f2021-09-15 18:47:42 +053044 LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.wants/pldmSoftPowerOff.service"
Andrew Geissler0c3d0e22020-10-28 16:43:35 -050045 rm $LINK
46
Manojkiran Eda842eb7f2021-09-15 18:47:42 +053047 LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.wants/pldmSoftPowerOff.service"
Andrew Geissler0c3d0e22020-10-28 16:43:35 -050048 rm $LINK
49}