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 \ |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 8 | file://weston.ini \ |
| 9 | file://weston@.service \ |
| 10 | file://71-weston-drm.rules \ |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 11 | file://weston-start" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | |
| 13 | S = "${WORKDIR}" |
| 14 | |
| 15 | do_install() { |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 16 | install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 17 | install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 18 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 19 | # 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 Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 27 | # 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 Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 31 | } |
| 32 | |
Brad Bishop | 6dbb316 | 2019-11-25 09:41:34 -0500 | [diff] [blame^] | 33 | inherit update-rc.d features_check systemd |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 34 | |
| 35 | # rdepends on weston which depends on virtual/egl |
| 36 | REQUIRED_DISTRO_FEATURES = "opengl" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 37 | |
| 38 | RDEPENDS_${PN} = "weston kbd" |
| 39 | |
| 40 | INITSCRIPT_NAME = "weston" |
| 41 | INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ." |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 42 | |
Brad Bishop | a34c030 | 2019-09-23 22:34:48 -0400 | [diff] [blame] | 43 | FILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini ${systemd_system_unitdir}/weston@.service" |
| 44 | |
| 45 | CONFFILES_${PN} += "${sysconfdir}/xdg/weston/weston.ini" |
| 46 | |
| 47 | SYSTEMD_SERVICE_${PN} = "weston@%i.service" |
| 48 | SYSTEMD_AUTO_ENABLE = "disable" |
| 49 | |