blob: 68d6dd454e95622a8def83c91e205a2e63837845 [file] [log] [blame]
Hank Lioubf5dffe2019-05-24 10:27:08 +08001FILESEXTRAPATHS_prepend_gsj := "${THISDIR}/${PN}:"
2SRC_URI_append_gsj = " file://config-8ssd.json"
3SRC_URI_append_gsj = " file://config-2ssd.json"
4SRC_URI_append_gsj = " file://fan-control.sh"
5SRC_URI_append_gsj = " file://fan-full-speed.sh"
6SRC_URI_append_gsj = " file://phosphor-pid-control.service"
7SRC_URI_append_gsj = " file://fan-reboot-control.service"
8
9FILES_${PN}_append_gsj = " ${datadir}/swampd/config-8ssd.json"
10FILES_${PN}_append_gsj = " ${datadir}/swampd/config-2ssd.json"
11FILES_${PN}_append_gsj = " ${bindir}/fan-control.sh"
12FILES_${PN}_append_gsj = " ${bindir}/fan-full-speed.sh"
13
14inherit systemd
15RDEPENDS_${PN} += "bash"
16
17SYSTEMD_SERVICE_${PN}_append_gsj = " phosphor-pid-control.service"
18SYSTEMD_SERVICE_${PN}_append_gsj = " fan-reboot-control.service"
19
20do_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}