Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | SUMMARY = "Linux zram compressed in-memory swap" |
| 2 | LICENSE = "MIT" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 3 | LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 4 | |
| 5 | inherit update-rc.d systemd |
| 6 | |
| 7 | RDEPENDS_${PN} = "util-linux-swaponoff kmod" |
| 8 | RRECOMMENDS_${PN} = "kernel-module-zram" |
| 9 | |
| 10 | PR = "r3" |
| 11 | |
| 12 | SRC_URI = " \ |
| 13 | file://init \ |
| 14 | file://zram.service \ |
| 15 | " |
| 16 | |
| 17 | do_install () { |
| 18 | # Sysvinit |
| 19 | install -d ${D}${sysconfdir}/init.d |
| 20 | install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/zram |
| 21 | |
| 22 | install -d ${D}${systemd_unitdir}/system |
| 23 | install -m 0644 ${WORKDIR}/zram.service ${D}${systemd_unitdir}/system |
| 24 | } |
| 25 | |
| 26 | FILES_${PN} = "${sysconfdir}" |
| 27 | INITSCRIPT_NAME = "zram" |
| 28 | INITSCRIPT_PARAMS = "start 05 2 3 4 5 . stop 22 0 1 6 ." |
| 29 | |
| 30 | RPROVIDES_${PN} += "${PN}-systemd" |
| 31 | RREPLACES_${PN} += "${PN}-systemd" |
| 32 | RCONFLICTS_${PN} += "${PN}-systemd" |
| 33 | SYSTEMD_SERVICE_${PN} = "zram.service" |