aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2016-11-15 13:41:57 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-11-30 15:47:09 +0000
commitbf6fd144b6f3539009089df5f188d09c7c899140 (patch)
tree32c982d49eac4a17484a478bd673946095f3dc4d /meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
parent3526c23ae98d2e08af20b77175c12907355ec42a (diff)
downloadopenembedded-core-contrib-bf6fd144b6f3539009089df5f188d09c7c899140.tar.gz
xserver-nodm-init: Bump PV to ensure upgrade from 2.0
meta-oe provides a 2.0 version of this recipe, but this one now does everything the meta-oe version does. There's one exception though: xserver-common is not a runtime dependency. This needs to be added elsewhere for the platforms that require it. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb')
-rw-r--r--meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb61
1 files changed, 61 insertions, 0 deletions
diff --git a/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb b/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
new file mode 100644
index 0000000000..a6d0d5eeea
--- /dev/null
+++ b/meta/recipes-graphics/x11-common/xserver-nodm-init_3.0.bb
@@ -0,0 +1,61 @@
+SUMMARY = "Simple Xserver Init Script (no dm)"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+SECTION = "x11"
+PR = "r31"
+
+SRC_URI = "file://xserver-nodm \
+ file://Xserver \
+ file://gplv2-license.patch \
+ file://xserver-nodm.service.in \
+ file://xserver-nodm.conf.in \
+"
+
+S = "${WORKDIR}"
+
+# Since we refer to ROOTLESS_X which is normally enabled per-machine
+PACKAGE_ARCH = "${MACHINE_ARCH}"
+
+inherit update-rc.d systemd distro_features_check
+
+REQUIRED_DISTRO_FEATURES = "x11"
+
+PACKAGECONFIG ??= "blank"
+# dpms and screen saver will be on only if 'blank' is in PACKAGECONFIG
+PACKAGECONFIG[blank] = ""
+
+do_install() {
+ install -d ${D}${sysconfdir}/default
+ install xserver-nodm.conf.in ${D}${sysconfdir}/default/xserver-nodm
+ install -d ${D}${sysconfdir}/xserver-nodm
+ install Xserver ${D}${sysconfdir}/xserver-nodm/Xserver
+
+ BLANK_ARGS="${@bb.utils.contains('PACKAGECONFIG', 'blank', '', '-s 0 -dpms', d)}"
+ if [ "${ROOTLESS_X}" = "1" ] ; then
+ XUSER_HOME="/home/xuser"
+ XUSER="xuser"
+ else
+ XUSER_HOME=${ROOT_HOME}
+ XUSER="root"
+ fi
+ sed -i "s:@HOME@:${XUSER_HOME}:; s:@USER@:${XUSER}:; s:@BLANK_ARGS@:${BLANK_ARGS}:" \
+ ${D}${sysconfdir}/default/xserver-nodm
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ install -d ${D}${systemd_unitdir}/system
+ install -m 0644 ${WORKDIR}/xserver-nodm.service.in ${D}${systemd_unitdir}/system/xserver-nodm.service
+ sed -i "s:@USER@:${XUSER}:" ${D}${systemd_unitdir}/system/xserver-nodm.service
+ fi
+
+ if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then
+ install -d ${D}${sysconfdir}/init.d
+ install xserver-nodm ${D}${sysconfdir}/init.d
+ fi
+}
+
+RDEPENDS_${PN} = "xinit ${@base_conditional('ROOTLESS_X', '1', 'xuser-account', '', d)}"
+
+INITSCRIPT_NAME = "xserver-nodm"
+INITSCRIPT_PARAMS = "start 9 5 . stop 20 0 1 2 3 6 ."
+SYSTEMD_SERVICE_${PN} = "xserver-nodm.service"
+