mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-16 16:27:27 +00:00
zram: move systemd support from meta-systemd back to meta-oe
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
@@ -2,22 +2,31 @@ DESCRIPTION = "Linux zram compressed in-memory swap"
|
|||||||
LICENSE = "MIT"
|
LICENSE = "MIT"
|
||||||
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
|
LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58"
|
||||||
|
|
||||||
inherit allarch update-rc.d
|
inherit allarch update-rc.d systemd
|
||||||
|
|
||||||
RDEPENDS_${PN} = "util-linux-swaponoff kmod kernel-module-zram"
|
RDEPENDS_${PN} = "util-linux-swaponoff kmod kernel-module-zram"
|
||||||
|
|
||||||
PR = "r0"
|
PR = "r3"
|
||||||
|
|
||||||
SRC_URI = " \
|
SRC_URI = " \
|
||||||
file://init \
|
file://init \
|
||||||
|
file://zram.service \
|
||||||
"
|
"
|
||||||
|
|
||||||
do_install () {
|
do_install () {
|
||||||
# Sysvinit
|
# Sysvinit
|
||||||
install -d ${D}${sysconfdir}/init.d
|
install -d ${D}${sysconfdir}/init.d
|
||||||
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/zram
|
install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/zram
|
||||||
|
|
||||||
|
install -d ${D}${systemd_unitdir}/system
|
||||||
|
install -m 0644 ${WORKDIR}/zram.service ${D}${systemd_unitdir}/system
|
||||||
}
|
}
|
||||||
|
|
||||||
FILES_${PN} = "${sysconfdir}/init.d"
|
FILES_${PN} = "${sysconfdir}/init.d"
|
||||||
INITSCRIPT_NAME = "zram"
|
INITSCRIPT_NAME = "zram"
|
||||||
INITSCRIPT_PARAMS = "start 05 2 3 4 5 . stop 22 0 1 6 ."
|
INITSCRIPT_PARAMS = "start 05 2 3 4 5 . stop 22 0 1 6 ."
|
||||||
|
|
||||||
|
RPROVIDES_${PN} += "${PN}-systemd"
|
||||||
|
RREPLACES_${PN} += "${PN}-systemd"
|
||||||
|
RCONFLICTS_${PN} += "${PN}-systemd"
|
||||||
|
SYSTEMD_SERVICE_${PN} = "zram.service"
|
||||||
|
|||||||
@@ -1,20 +0,0 @@
|
|||||||
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
|
|
||||||
|
|
||||||
PRINC := "${@int(PRINC) + 2}"
|
|
||||||
|
|
||||||
inherit systemd
|
|
||||||
|
|
||||||
SRC_URI += " \
|
|
||||||
file://zram.service \
|
|
||||||
"
|
|
||||||
|
|
||||||
RPROVIDES_${PN} += "${PN}-systemd"
|
|
||||||
RREPLACES_${PN} += "${PN}-systemd"
|
|
||||||
RCONFLICTS_${PN} += "${PN}-systemd"
|
|
||||||
SYSTEMD_SERVICE_${PN} = "zram.service"
|
|
||||||
|
|
||||||
do_install_append() {
|
|
||||||
install -d ${D}${systemd_unitdir}/system
|
|
||||||
install -m 0644 ${WORKDIR}/zram.service ${D}${systemd_unitdir}/system
|
|
||||||
}
|
|
||||||
|
|
||||||
Reference in New Issue
Block a user