blob: 40aa76295ffe927e5541917211de598d46973d3b [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 \
Andrew Geissler82c905d2020-04-13 13:39:40 -05008 file://weston.env \
Brad Bishopa34c0302019-09-23 22:34:48 -04009 file://weston.ini \
10 file://weston@.service \
11 file://71-weston-drm.rules \
Patrick Williamsc0f7c042017-02-23 20:41:17 -060012 file://weston-start"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050013
14S = "${WORKDIR}"
15
16do_install() {
Patrick Williamsc0f7c042017-02-23 20:41:17 -060017 install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
Brad Bishopa34c0302019-09-23 22:34:48 -040018 install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini
Andrew Geissler82c905d2020-04-13 13:39:40 -050019 install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050020
Brad Bishopa34c0302019-09-23 22:34:48 -040021 # Install Weston systemd service and accompanying udev rule
22 install -D -p -m0644 ${WORKDIR}/weston@.service ${D}${systemd_system_unitdir}/weston@.service
23 sed -i -e s:/etc:${sysconfdir}:g \
24 -e s:/usr/bin:${bindir}:g \
25 -e s:/var:${localstatedir}:g \
26 ${D}${systemd_unitdir}/system/weston@.service
27 install -D -p -m0644 ${WORKDIR}/71-weston-drm.rules \
28 ${D}${sysconfdir}/udev/rules.d/71-weston-drm.rules
Patrick Williamsc0f7c042017-02-23 20:41:17 -060029 # Install weston-start script
30 install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
31 sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
32 sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
Patrick Williamsc124f4f2015-09-15 14:41:29 -050033}
34
Andrew Geissler82c905d2020-04-13 13:39:40 -050035do_install_append_libc-musl_qemux86() {
36 echo "WESTON_DISABLE_ATOMIC=Y" >> ${D}${sysconfdir}/default/weston
37}
38
39do_install_append_libc-musl_qemux86-64() {
40 echo "WESTON_DISABLE_ATOMIC=Y" >> ${D}${sysconfdir}/default/weston
41}
42
Brad Bishop6dbb3162019-11-25 09:41:34 -050043inherit update-rc.d features_check systemd
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050044
45# rdepends on weston which depends on virtual/egl
46REQUIRED_DISTRO_FEATURES = "opengl"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050047
48RDEPENDS_${PN} = "weston kbd"
49
50INITSCRIPT_NAME = "weston"
51INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050052
Andrew Geissler82c905d2020-04-13 13:39:40 -050053FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/weston@.service ${sysconfdir}/default/weston"
Brad Bishopa34c0302019-09-23 22:34:48 -040054
Andrew Geissler82c905d2020-04-13 13:39:40 -050055CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston"
Brad Bishopa34c0302019-09-23 22:34:48 -040056
57SYSTEMD_SERVICE_${PN} = "weston@%i.service"
58SYSTEMD_AUTO_ENABLE = "disable"
59