blob: e3e739e2b7df0d144d0fb58b0b13834f6cd874a2 [file] [log] [blame]
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05001SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05002LICENSE = "MIT"
Brad Bishop6e60e8b2018-02-01 10:27:11 -05003LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05004
Brad Bishopa34c0302019-09-23 22:34:48 -04005PACKAGE_ARCH = "${MACHINE_ARCH}"
6
Patrick Williamsd8c66bc2016-06-20 12:57:21 -05007SRC_URI = "file://init \
Brad Bishopa34c0302019-09-23 22:34:48 -04008 file://weston.ini \
9 file://weston@.service \
10 file://71-weston-drm.rules \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060011 file://weston-start"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012
13S = "${WORKDIR}"
14
15do_install() {
Patrick Williamsc0f7c042017-02-23 20:41:17 -060016 install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
Brad Bishopa34c0302019-09-23 22:34:48 -040017 install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050018
Brad Bishopa34c0302019-09-23 22:34:48 -040019 # Install Weston systemd service and accompanying udev rule
20 install -D -p -m0644 ${WORKDIR}/weston@.service ${D}${systemd_system_unitdir}/weston@.service
21 sed -i -e s:/etc:${sysconfdir}:g \
22 -e s:/usr/bin:${bindir}:g \
23 -e s:/var:${localstatedir}:g \
24 ${D}${systemd_unitdir}/system/weston@.service
25 install -D -p -m0644 ${WORKDIR}/71-weston-drm.rules \
26 ${D}${sysconfdir}/udev/rules.d/71-weston-drm.rules
Patrick Williamsc0f7c042017-02-23 20:41:17 -060027 # Install weston-start script
28 install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
29 sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
30 sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
Patrick Williamsc124f4f2015-09-15 14:41:29 -050031}
32
Brad Bishop6dbb3162019-11-25 09:41:34 -050033inherit update-rc.d features_check systemd
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050034
35# rdepends on weston which depends on virtual/egl
36REQUIRED_DISTRO_FEATURES = "opengl"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050037
38RDEPENDS_${PN} = "weston kbd"
39
40INITSCRIPT_NAME = "weston"
41INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050042
Brad Bishopa34c0302019-09-23 22:34:48 -040043FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/weston@.service"
44
45CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini"
46
47SYSTEMD_SERVICE_${PN} = "weston@%i.service"
48SYSTEMD_AUTO_ENABLE = "disable"
49