1*e67e2287SmustafaSUMMARY = "Initialize PWM sensors"
2*e67e2287SmustafaDESCRIPTION = "Initialize PWM sensors"
3*e67e2287SmustafaLICENSE = "CLOSED"
4*e67e2287SmustafaPR = "r1"
5*e67e2287Smustafa
6*e67e2287Smustafainherit systemd
7*e67e2287Smustafa
8*e67e2287SmustafaDEPENDS = "systemd"
9*e67e2287SmustafaRDEPENDS_${PN} = "bash"
10*e67e2287Smustafa
11*e67e2287SmustafaS = "${WORKDIR}"
12*e67e2287SmustafaFILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
13*e67e2287SmustafaSRC_URI += " \
14*e67e2287Smustafa    file://pwm_init.service \
15*e67e2287Smustafa    file://bin/pwm_init.sh \
16*e67e2287Smustafa    "
17*e67e2287Smustafa
18*e67e2287SmustafaSYSTEMD_PACKAGES = "${PN}"
19*e67e2287SmustafaSYSTEMD_AUTO_ENABLE = "enable"
20*e67e2287SmustafaSYSTEMD_SERVICE_${PN} += "pwm_init.service"
21*e67e2287Smustafa
22*e67e2287SmustafaFILES_${PN} += "${bindir}/* ${systemd_system_unitdir}/*"
23*e67e2287Smustafa
24*e67e2287Smustafado_install_append() {
25*e67e2287Smustafa    install -d ${D}${bindir}
26*e67e2287Smustafa    install -m 0755 ${S}/bin/* ${D}${bindir}/
27*e67e2287Smustafa    install -d ${D}${systemd_system_unitdir}
28*e67e2287Smustafa    install -m 0644 ${S}/*.service ${D}${systemd_system_unitdir}
29*e67e2287Smustafa}
30