xserver-nodm-init_2.0.bb 1006 Bytes
Newer Older
1 2 3 4
DESCRIPTION = "Simple Xserver Init Script (no dm)"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
SECTION = "x11"
5

6
PR = "r10"
7 8

SRC_URI = "file://xserver-nodm \
9
           file://xserver-nodm.service \
10 11 12 13
           file://gplv2-license.patch \
"
S = ${WORKDIR}

14
inherit allarch
15 16

do_install() {
17 18 19 20 21
	install -d ${D}${sysconfdir}/init.d
	install xserver-nodm ${D}${sysconfdir}/init.d

	install -d ${D}${base_libdir}/systemd/system
	install -m 0644 xserver-nodm.service ${D}${base_libdir}/systemd/system/
22 23
}

24 25 26
RDEPENDS_${PN} = "xserver-common (>= 1.30) xinit"
FILES_${PN} += "${base_libdir}/systemd/system/"

27 28 29 30 31
inherit update-rc.d

INITSCRIPT_NAME = "xserver-nodm"
INITSCRIPT_PARAMS = "start 01 5 2 . stop 01 0 1 6 ."
INITSCRIPT_PARAMS_shr = "start 90 5 2 . stop 90 0 1 6 ."
32 33

pkg_postinst_${PN}_append () {
34 35 36
    if [ -e ${base_bindir}/systemctl ] ; then
        # can't do this offline
        [ "x$D" != "x" ] && exit 1
37 38 39 40

        systemctl enable xserver-nodm.service
    fi
}