blob: fcf7e00177a429df257e976f9de96b5ce0a9d7d3 [file] [log] [blame]
Chau Ly802d2d92022-11-16 04:14:09 +00001FILESEXTRAPATHS:append := "${THISDIR}/${PN}:"
2FILESEXTRAPATHS:append := "${THISDIR}/${PN}/${MACHINE}:"
3
Chau Ly563fe792023-03-27 11:20:20 +00004RDEPENDS:${PN}-monitor += "bash"
Chau Ly802d2d92022-11-16 04:14:09 +00005
6PACKAGECONFIG:append = " json"
7
8SRC_URI:append = " file://events.json \
9 file://fans.json \
10 file://groups.json \
11 file://zones.json \
12 file://monitor.json \
13 file://presence.json \
14 file://phosphor-fan-control@.service \
15 file://phosphor-fan-monitor@.service \
16 file://ampere_set_fan_max_speed.sh \
17 "
18
Chau Ly563fe792023-03-27 11:20:20 +000019FILES:${PN}-monitor += " \
20 ${bindir}/ampere_set_fan_max_speed.sh \
21 "
22
Chau Ly802d2d92022-11-16 04:14:09 +000023do_configure:prepend() {
24 mkdir -p ${S}/control/config_files/${MACHINE}
25 cp ${WORKDIR}/events.json ${S}/control/config_files/${MACHINE}/events.json
26 cp ${WORKDIR}/fans.json ${S}/control/config_files/${MACHINE}/fans.json
27 cp ${WORKDIR}/groups.json ${S}/control/config_files/${MACHINE}/groups.json
28 cp ${WORKDIR}/zones.json ${S}/control/config_files/${MACHINE}/zones.json
29
30 mkdir -p ${S}/monitor/config_files/${MACHINE}
31 cp ${WORKDIR}/monitor.json ${S}/monitor/config_files/${MACHINE}/config.json
32
33 mkdir -p ${S}/presence/config_files/${MACHINE}
34 cp ${WORKDIR}/presence.json ${S}/presence/config_files/${MACHINE}/config.json
35}
36
37do_install:append() {
38 install -d ${D}${bindir}
39 install -m 0755 ${WORKDIR}/ampere_set_fan_max_speed.sh ${D}${bindir}/ampere_set_fan_max_speed.sh
40 install -d ${D}${systemd_system_unitdir}
41 install -m 0644 ${WORKDIR}/phosphor-fan-monitor@.service ${D}${systemd_system_unitdir}
42 install -m 0644 ${WORKDIR}/phosphor-fan-control@.service ${D}${systemd_system_unitdir}
43}
44
45