Hank Liou | bf5dffe | 2019-05-24 10:27:08 +0800 | [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-full-speed.sh" |
| 6 | SRC_URI_append_gsj = " file://phosphor-pid-control.service" |
| 7 | SRC_URI_append_gsj = " file://fan-reboot-control.service" |
| 8 | |
| 9 | FILES_${PN}_append_gsj = " ${datadir}/swampd/config-8ssd.json" |
| 10 | FILES_${PN}_append_gsj = " ${datadir}/swampd/config-2ssd.json" |
| 11 | FILES_${PN}_append_gsj = " ${bindir}/fan-control.sh" |
| 12 | FILES_${PN}_append_gsj = " ${bindir}/fan-full-speed.sh" |
| 13 | |
| 14 | inherit systemd |
| 15 | RDEPENDS_${PN} += "bash" |
| 16 | |
| 17 | SYSTEMD_SERVICE_${PN}_append_gsj = " phosphor-pid-control.service" |
| 18 | SYSTEMD_SERVICE_${PN}_append_gsj = " fan-reboot-control.service" |
| 19 | |
| 20 | do_install_append_gsj() { |
| 21 | install -d ${D}/${bindir} |
| 22 | install -m 0755 ${WORKDIR}/fan-control.sh ${D}/${bindir} |
| 23 | install -m 0755 ${WORKDIR}/fan-full-speed.sh ${D}/${bindir} |
| 24 | |
| 25 | install -d ${D}${datadir}/swampd |
| 26 | install -m 0644 -D ${WORKDIR}/config-8ssd.json \ |
| 27 | ${D}${datadir}/swampd/config-8ssd.json |
| 28 | install -m 0644 -D ${WORKDIR}/config-2ssd.json \ |
| 29 | ${D}${datadir}/swampd/config-2ssd.json |
| 30 | |
| 31 | install -d ${D}${systemd_unitdir}/system/ |
| 32 | install -m 0644 ${WORKDIR}/phosphor-pid-control.service \ |
| 33 | ${D}${systemd_unitdir}/system |
| 34 | install -m 0644 ${WORKDIR}/fan-reboot-control.service \ |
| 35 | ${D}${systemd_unitdir}/system |
| 36 | } |