summaryrefslogtreecommitdiff
path: root/recipes-support/usb-suspend-resume/usb-suspend-resume.bb
blob: 307c82369034a99de5412d3990b08748de434abe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
SECTION = "USB"
SUMMARY = "Fix for USB suspend resume on Vybrid"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"

PR = "r1"

inherit allarch systemd

SRC_URI = " \
    file://usb-suspend.sh \
    file://usb-resume.sh \
    file://usb-suspend.service \
    file://usb-resume.service \
"

do_install() {
    install -d ${D}/${bindir}
    install -m 0755 ${WORKDIR}/usb-suspend.sh ${D}/${bindir}/
    install -m 0755 ${WORKDIR}/usb-resume.sh ${D}/${bindir}/

    install -d ${D}${systemd_unitdir}/system/
    install -m 0644 ${WORKDIR}/usb-suspend.service ${D}${systemd_unitdir}/system
    install -m 0644 ${WORKDIR}/usb-resume.service ${D}${systemd_unitdir}/system
}

FILES_${PN} += " \
    ${systemd_unitdir}/system \
"

NATIVE_SYSTEMD_SUPPORT = "1"
SYSTEMD_PACKAGES = "${PN}"
SYSTEMD_SERVICE_${PN} = "usb-suspend.service usb-resume.service"
SYSTEMD_AUTO_ENABLE_vf = "enable"
SYSTEMD_AUTO_ENABLE = "disable"