1SUMMARY = "Phosphor post code manager"
2DESCRIPTION = "Phosphor post Code Manager monitors post code posted on dbus \
3interface /xyz/openbmc_project/state/boot/raw by snoopd daemon and save them \
4in a file under /var/lib for history."
5LICENSE = "Apache-2.0"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=86d3f3a95c324c9479bd8986968f4327"
7SRCREV = "2d74ceb6260801c0e820c68be8cef035de5d3d7d"
8PV = "1.0+git${SRCPV}"
9
10SRC_URI = "git://github.com/openbmc/phosphor-post-code-manager.git;branch=master;protocol=https"
11
12S = "${WORKDIR}/git"
13
14inherit meson pkgconfig systemd
15
16DEPENDS += " \
17    sdbusplus \
18    phosphor-dbus-interfaces \
19    phosphor-logging \
20    libcereal \
21    "
22FILES:${PN}  += "${systemd_system_unitdir}/xyz.openbmc_project.State.Boot.PostCode@.service"
23FILES:${PN}  += "${systemd_system_unitdir}/xyz.openbmc_project.State.Boot.PostCode.service"
24
25pkg_postinst:${PN}:append() {
26    mkdir -p $D$systemd_system_unitdir/multi-user.target.wants
27    for i in ${OBMC_HOST_INSTANCES};
28    do
29        LINK="$D$systemd_system_unitdir/multi-user.target.wants/xyz.openbmc_project.State.Boot.PostCode@${i}.service"
30        TARGET="..//xyz.openbmc_project.State.Boot.PostCode@.service"
31        ln -s $TARGET $LINK
32    done
33}
34
35pkg_prerm:${PN}:append() {
36    for i in ${OBMC_HOST_INSTANCES};
37    do
38        LINK="$D$systemd_system_unitdir/multi-user.target.wants/xyz.openbmc_project.State.Boot.PostCode@${i}.service"
39        rm $LINK
40    done
41}
42
43