Chau Ly | 802d2d9 | 2022-11-16 04:14:09 +0000 | [diff] [blame] | 1 | FILESEXTRAPATHS:append := "${THISDIR}/${PN}:" |
| 2 | FILESEXTRAPATHS:append := "${THISDIR}/${PN}/${MACHINE}:" |
| 3 | |
| 4 | RDEPENDS:${PN} += "bash" |
| 5 | |
| 6 | PACKAGECONFIG:append = " json" |
| 7 | |
| 8 | SRC_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 | |
| 19 | do_configure:prepend() { |
| 20 | mkdir -p ${S}/control/config_files/${MACHINE} |
| 21 | cp ${WORKDIR}/events.json ${S}/control/config_files/${MACHINE}/events.json |
| 22 | cp ${WORKDIR}/fans.json ${S}/control/config_files/${MACHINE}/fans.json |
| 23 | cp ${WORKDIR}/groups.json ${S}/control/config_files/${MACHINE}/groups.json |
| 24 | cp ${WORKDIR}/zones.json ${S}/control/config_files/${MACHINE}/zones.json |
| 25 | |
| 26 | mkdir -p ${S}/monitor/config_files/${MACHINE} |
| 27 | cp ${WORKDIR}/monitor.json ${S}/monitor/config_files/${MACHINE}/config.json |
| 28 | |
| 29 | mkdir -p ${S}/presence/config_files/${MACHINE} |
| 30 | cp ${WORKDIR}/presence.json ${S}/presence/config_files/${MACHINE}/config.json |
| 31 | } |
| 32 | |
| 33 | do_install:append() { |
| 34 | install -d ${D}${bindir} |
| 35 | install -m 0755 ${WORKDIR}/ampere_set_fan_max_speed.sh ${D}${bindir}/ampere_set_fan_max_speed.sh |
| 36 | install -d ${D}${systemd_system_unitdir} |
| 37 | install -m 0644 ${WORKDIR}/phosphor-fan-monitor@.service ${D}${systemd_system_unitdir} |
| 38 | install -m 0644 ${WORKDIR}/phosphor-fan-control@.service ${D}${systemd_system_unitdir} |
| 39 | } |
| 40 | |
| 41 | |