Willy Tu | a38b7cc | 2021-08-10 15:33:55 -0700 | [diff] [blame] | 1 | FILESEXTRAPATHS:prepend:gsj := "${THISDIR}/${PN}:" |
| 2 | SRC_URI:append:gsj = " file://config-8ssd.json" |
| 3 | SRC_URI:append:gsj = " file://config-2ssd.json" |
| 4 | SRC_URI:append:gsj = " file://fan-control.sh" |
| 5 | SRC_URI:append:gsj = " file://fan-default-speed.sh" |
| 6 | SRC_URI:append:gsj = " file://phosphor-pid-control.service" |
| 7 | SRC_URI:append:gsj = " file://fan-reboot-control.service" |
| 8 | SRC_URI:append:gsj = " file://fan-boot-control.service" |
Hank Liou | a9672e5 | 2019-05-24 10:27:08 +0800 | [diff] [blame] | 9 | |
Willy Tu | a38b7cc | 2021-08-10 15:33:55 -0700 | [diff] [blame] | 10 | FILES:${PN}:append:gsj = " ${datadir}/swampd/config-8ssd.json" |
| 11 | FILES:${PN}:append:gsj = " ${datadir}/swampd/config-2ssd.json" |
| 12 | FILES:${PN}:append:gsj = " ${bindir}/fan-control.sh" |
| 13 | FILES:${PN}:append:gsj = " ${bindir}/fan-default-speed.sh" |
Hank Liou | a9672e5 | 2019-05-24 10:27:08 +0800 | [diff] [blame] | 14 | |
| 15 | inherit systemd |
Willy Tu | a38b7cc | 2021-08-10 15:33:55 -0700 | [diff] [blame] | 16 | RDEPENDS:${PN} += "bash" |
Hank Liou | a9672e5 | 2019-05-24 10:27:08 +0800 | [diff] [blame] | 17 | |
Willy Tu | a38b7cc | 2021-08-10 15:33:55 -0700 | [diff] [blame] | 18 | SYSTEMD_SERVICE:${PN}:append:gsj = " phosphor-pid-control.service" |
| 19 | SYSTEMD_SERVICE:${PN}:append:gsj = " fan-reboot-control.service" |
| 20 | SYSTEMD_SERVICE:${PN}:append:gsj = " fan-boot-control.service" |
Hank Liou | a9672e5 | 2019-05-24 10:27:08 +0800 | [diff] [blame] | 21 | |
Willy Tu | a38b7cc | 2021-08-10 15:33:55 -0700 | [diff] [blame] | 22 | do_install:append:gsj() { |
Hank Liou | a9672e5 | 2019-05-24 10:27:08 +0800 | [diff] [blame] | 23 | install -d ${D}/${bindir} |
| 24 | install -m 0755 ${WORKDIR}/fan-control.sh ${D}/${bindir} |
Hank Liou | 38e869d | 2019-07-17 09:57:48 +0800 | [diff] [blame] | 25 | install -m 0755 ${WORKDIR}/fan-default-speed.sh ${D}/${bindir} |
Hank Liou | a9672e5 | 2019-05-24 10:27:08 +0800 | [diff] [blame] | 26 | |
| 27 | install -d ${D}${datadir}/swampd |
| 28 | install -m 0644 -D ${WORKDIR}/config-8ssd.json \ |
| 29 | ${D}${datadir}/swampd/config-8ssd.json |
| 30 | install -m 0644 -D ${WORKDIR}/config-2ssd.json \ |
| 31 | ${D}${datadir}/swampd/config-2ssd.json |
| 32 | |
| 33 | install -d ${D}${systemd_unitdir}/system/ |
| 34 | install -m 0644 ${WORKDIR}/phosphor-pid-control.service \ |
| 35 | ${D}${systemd_unitdir}/system |
| 36 | install -m 0644 ${WORKDIR}/fan-reboot-control.service \ |
| 37 | ${D}${systemd_unitdir}/system |
Hank Liou | 38e869d | 2019-07-17 09:57:48 +0800 | [diff] [blame] | 38 | install -m 0644 ${WORKDIR}/fan-boot-control.service \ |
| 39 | ${D}${systemd_unitdir}/system |
| 40 | } |