Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 1 | SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 2 | LICENSE = "MIT" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 3 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 4 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 5 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
| 6 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 7 | SRC_URI = "file://init \ |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 8 | file://weston.env \ |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 9 | file://weston.ini \ |
| 10 | file://weston@.service \ |
| 11 | file://71-weston-drm.rules \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 12 | file://weston-start" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 13 | |
| 14 | S = "${WORKDIR}" |
| 15 | |
| 16 | do_install() { |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 17 | install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 18 | install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 19 | install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 20 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 21 | # 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 Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 29 | # 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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 33 | } |
| 34 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 35 | do_install_append_libc-musl_qemux86() { |
| 36 | echo "WESTON_DISABLE_ATOMIC=Y" >> ${D}${sysconfdir}/default/weston |
| 37 | } |
| 38 | |
| 39 | do_install_append_libc-musl_qemux86-64() { |
| 40 | echo "WESTON_DISABLE_ATOMIC=Y" >> ${D}${sysconfdir}/default/weston |
| 41 | } |
| 42 | |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame] | 43 | inherit update-rc.d features_check systemd |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 44 | |
| 45 | # rdepends on weston which depends on virtual/egl |
| 46 | REQUIRED_DISTRO_FEATURES = "opengl" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 47 | |
| 48 | RDEPENDS_${PN} = "weston kbd" |
| 49 | |
| 50 | INITSCRIPT_NAME = "weston" |
| 51 | INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 52 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 53 | FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/weston@.service ${sysconfdir}/default/weston" |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 54 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 55 | CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston" |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 56 | |
| 57 | SYSTEMD_SERVICE_${PN} = "weston@%i.service" |
| 58 | SYSTEMD_AUTO_ENABLE = "disable" |
| 59 | |