blob: 8d375a1f7c9d93fa883ef1b19869e4e0ae95d6b5 [file] [log] [blame]
Deepak Kodihalli7a113ee2019-10-14 01:23:27 -05001SUMMARY = "PLDM Stack"
2DESCRIPTION = "Implementation of the PLDM specifications"
Tom Josephf6785aa2021-06-15 07:12:34 -07003DEPENDS += "function2"
Deepak Kodihalli7a113ee2019-10-14 01:23:27 -05004DEPENDS += "systemd"
Matt Spinlere2375b52020-01-20 14:09:47 -06005DEPENDS += "sdeventplus"
Deepak Kodihalli7a113ee2019-10-14 01:23:27 -05006DEPENDS += "phosphor-dbus-interfaces"
7DEPENDS += "nlohmann-json"
Deepak Kodihalli7a113ee2019-10-14 01:23:27 -05008DEPENDS += "cli11"
Manojkiran Edac5934752022-09-27 13:59:35 -05009DEPENDS += "libpldm"
Ed Tanous9936f862022-09-19 09:13:20 -070010PV = "1.0+git${SRCPV}"
11PR = "r1"
Deepak Kodihalli7a113ee2019-10-14 01:23:27 -050012
13S = "${WORKDIR}/git"
Patrick Williams12fc9392021-08-06 09:16:53 -050014SYSTEMD_SERVICE:${PN} += "pldmd.service"
15SYSTEMD_SERVICE:${PN} += "pldmSoftPowerOff.service"
Deepak Kodihallia7482012020-06-22 05:25:35 -050016
Ed Tanous9936f862022-09-19 09:13:20 -070017inherit meson pkgconfig
18inherit systemd
19
Deepak Kodihalli7a113ee2019-10-14 01:23:27 -050020EXTRA_OEMESON = " \
21 -Dtests=disabled \
22 -Doem-ibm=disabled \
Manojkiran Edac5934752022-09-27 13:59:35 -050023 -Dlibpldm-only=disabled \
Deepak Kodihalli7a113ee2019-10-14 01:23:27 -050024 "
Andrew Geissler0c3d0e22020-10-28 16:43:35 -050025
Ed Tanous9936f862022-09-19 09:13:20 -070026pkg_prerm:${PN} () {
27 LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.wants/pldmSoftPowerOff.service"
28 rm $LINK
29 LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.wants/pldmSoftPowerOff.service"
30 rm $LINK
31}
Andrew Geissler0c3d0e22020-10-28 16:43:35 -050032# Install pldmSoftPowerOff.service in correct targets
Patrick Williams12fc9392021-08-06 09:16:53 -050033pkg_postinst:${PN} () {
Manojkiran Eda842eb7f2021-09-15 18:47:42 +053034 mkdir -p $D$systemd_system_unitdir/obmc-host-shutdown@0.target.wants
35 LINK="$D$systemd_system_unitdir/obmc-host-shutdown@0.target.wants/pldmSoftPowerOff.service"
Andrew Geissler0c3d0e22020-10-28 16:43:35 -050036 TARGET="../pldmSoftPowerOff.service"
37 ln -s $TARGET $LINK
Manojkiran Eda842eb7f2021-09-15 18:47:42 +053038 mkdir -p $D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.wants
39 LINK="$D$systemd_system_unitdir/obmc-host-warm-reboot@0.target.wants/pldmSoftPowerOff.service"
Andrew Geissler0c3d0e22020-10-28 16:43:35 -050040 TARGET="../pldmSoftPowerOff.service"
41 ln -s $TARGET $LINK
42}
43
Ed Tanous9936f862022-09-19 09:13:20 -070044require pldm.inc