Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | SUMMARY = "Simple Xserver Init Script (no dm)" |
| 2 | LICENSE = "GPLv2" |
| 3 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" |
| 4 | SECTION = "x11" |
| 5 | PR = "r31" |
| 6 | |
| 7 | SRC_URI = "file://xserver-nodm \ |
| 8 | file://Xserver \ |
| 9 | file://X11 \ |
| 10 | file://gplv2-license.patch \ |
| 11 | file://xserver-nodm.service.in \ |
| 12 | file://xserver-nodm.conf.in \ |
| 13 | " |
| 14 | |
| 15 | S = "${WORKDIR}" |
| 16 | |
| 17 | # Since we refer to ROOTLESS_X which is normally enabled per-machine |
| 18 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 19 | |
| 20 | inherit update-rc.d systemd distro_features_check |
| 21 | |
| 22 | REQUIRED_DISTRO_FEATURES = "x11" |
| 23 | |
| 24 | PACKAGECONFIG ??= "blank" |
| 25 | # dpms and screen saver will be on only if 'blank' is in PACKAGECONFIG |
| 26 | PACKAGECONFIG[blank] = "" |
| 27 | PACKAGECONFIG[nocursor] = "" |
| 28 | |
| 29 | do_install() { |
| 30 | install -d ${D}${sysconfdir}/default |
| 31 | install xserver-nodm.conf.in ${D}${sysconfdir}/default/xserver-nodm |
| 32 | install -d ${D}${sysconfdir}/xserver-nodm |
| 33 | install Xserver ${D}${sysconfdir}/xserver-nodm/Xserver |
| 34 | install -d ${D}${sysconfdir}/X11/Xsession.d |
| 35 | install X11/Xsession.d/* ${D}${sysconfdir}/X11/Xsession.d/ |
| 36 | install X11/Xsession ${D}${sysconfdir}/X11/ |
| 37 | |
| 38 | BLANK_ARGS="${@bb.utils.contains('PACKAGECONFIG', 'blank', '', '-s 0 -dpms', d)}" |
| 39 | NO_CURSOR_ARG="${@bb.utils.contains('PACKAGECONFIG', 'nocursor', '-nocursor', '', d)}" |
| 40 | if [ "${ROOTLESS_X}" = "1" ] ; then |
| 41 | XUSER_HOME="/home/xuser" |
| 42 | XUSER="xuser" |
| 43 | else |
| 44 | XUSER_HOME=${ROOT_HOME} |
| 45 | XUSER="root" |
| 46 | fi |
| 47 | sed -i "s:@HOME@:${XUSER_HOME}:; s:@USER@:${XUSER}:; s:@BLANK_ARGS@:${BLANK_ARGS}:" \ |
| 48 | ${D}${sysconfdir}/default/xserver-nodm |
| 49 | sed -i "s:@NO_CURSOR_ARG@:${NO_CURSOR_ARG}:" ${D}${sysconfdir}/default/xserver-nodm |
| 50 | |
| 51 | if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then |
| 52 | install -d ${D}${systemd_unitdir}/system |
| 53 | install -m 0644 ${WORKDIR}/xserver-nodm.service.in ${D}${systemd_unitdir}/system/xserver-nodm.service |
| 54 | sed -i "s:@USER@:${XUSER}:" ${D}${systemd_unitdir}/system/xserver-nodm.service |
| 55 | fi |
| 56 | |
| 57 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then |
| 58 | install -d ${D}${sysconfdir}/init.d |
| 59 | install xserver-nodm ${D}${sysconfdir}/init.d |
| 60 | fi |
| 61 | } |
| 62 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 63 | RDEPENDS_${PN} = "xinit ${@oe.utils.conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 64 | |
| 65 | INITSCRIPT_NAME = "xserver-nodm" |
| 66 | INITSCRIPT_PARAMS = "start 9 5 . stop 20 0 1 2 3 6 ." |
| 67 | SYSTEMD_SERVICE_${PN} = "xserver-nodm.service" |
| 68 | |
| 69 | RCONFLICTS_${PN} = "xserver-common (< 1.34-r9) x11-common" |