107 lines
3.8 KiB
BlitzBasic
Executable File
107 lines
3.8 KiB
BlitzBasic
Executable File
SUMMARY = "Startup script and systemd unit file for the Weston Wayland compositor"
|
|
LICENSE = "MIT"
|
|
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
|
|
|
PACKAGE_ARCH = "${MACHINE_ARCH}"
|
|
|
|
SRC_URI = "file://init \
|
|
file://weston.env \
|
|
file://weston.ini \
|
|
file://weston.service \
|
|
file://weston.socket \
|
|
file://weston-autologin \
|
|
file://weston.sh \
|
|
file://ql_weston.service \
|
|
file://weston-start \
|
|
file://99-weston-ts.rules \
|
|
"
|
|
|
|
S = "${WORKDIR}"
|
|
|
|
PACKAGECONFIG ??= ""
|
|
PACKAGECONFIG:append:qemuriscv64 = " use-pixman"
|
|
PACKAGECONFIG:append:qemuppc64 = " use-pixman"
|
|
|
|
PACKAGECONFIG[no-idle-timeout] = ",,"
|
|
PACKAGECONFIG[use-pixman] = ",,"
|
|
|
|
DEFAULTBACKEND ??= ""
|
|
DEFAULTBACKEND:qemuall ?= "drm"
|
|
|
|
do_install() {
|
|
if [ "${VIRTUAL-RUNTIME_init_manager}" != "systemd" ]; then
|
|
install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
|
|
sed -i 's#ROOTHOME#${ROOT_HOME}#' ${D}/${sysconfdir}/init.d/weston
|
|
fi
|
|
|
|
install -D -p -m0644 ${WORKDIR}/weston.ini ${D}${sysconfdir}/xdg/weston/weston.ini
|
|
install -Dm644 ${WORKDIR}/weston.env ${D}${sysconfdir}/default/weston
|
|
install -Dm755 ${WORKDIR}/weston.sh ${D}${sysconfdir}/profile.d/weston.sh
|
|
install -Dm755 ${WORKDIR}/99-weston-ts.rules ${D}/lib/udev/rules.d/99-weston-ts.rules
|
|
|
|
# Install Weston systemd service and accompanying udev rule aa
|
|
install -d ${D}/etc/systemd/system/
|
|
install -m 0755 ${S}/ql_weston.service -D ${D}${sysconfdir}/systemd/system/init_display.service
|
|
install -d ${D}/etc/systemd/system/multi-user.target.wants
|
|
ln -sf /etc/systemd/system/init_display.service ${D}/etc/systemd/system/multi-user.target.wants/init_display.service
|
|
|
|
install -D -p -m0644 ${WORKDIR}/weston.socket ${D}${systemd_system_unitdir}/weston.socket
|
|
|
|
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
|
|
install -D -p -m0644 ${WORKDIR}/weston-autologin ${D}${sysconfdir}/pam.d/weston-autologin
|
|
fi
|
|
|
|
# Install weston-start script
|
|
#install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
|
|
#sed -i 's,@DATADIR@,${datadir},g' ${D}${bindir}/weston-start
|
|
#sed -i 's,@LOCALSTATEDIR@,${localstatedir},g' ${D}${bindir}/weston-start
|
|
|
|
if [ -n "${DEFAULTBACKEND}" ]; then
|
|
sed -i -e "/^\[core\]/a backend=${DEFAULTBACKEND}-backend.so" ${D}${sysconfdir}/xdg/weston/weston.ini
|
|
fi
|
|
|
|
if [ "${@bb.utils.contains('PACKAGECONFIG', 'no-idle-timeout', 'yes', 'no', d)}" = "yes" ]; then
|
|
sed -i -e "/^\[core\]/a idle-time=0" ${D}${sysconfdir}/xdg/weston/weston.ini
|
|
fi
|
|
|
|
if [ "${@bb.utils.contains('PACKAGECONFIG', 'use-pixman', 'yes', 'no', d)}" = "yes" ]; then
|
|
sed -i -e "/^\[core\]/a use-pixman=true" ${D}${sysconfdir}/xdg/weston/weston.ini
|
|
fi
|
|
|
|
#install -dm 755 -o weston -g weston ${D}/home/weston
|
|
}
|
|
|
|
INHIBIT_UPDATERCD_BBCLASS = "${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', '1', '', d)}"
|
|
|
|
inherit update-rc.d systemd
|
|
|
|
USERADD_PACKAGES = "${PN}"
|
|
|
|
# rdepends on weston which depends on virtual/egl
|
|
#
|
|
require ${THISDIR}/required-distro-features.inc
|
|
|
|
REQUIRED_DISTRO_FEATURES = "opengl ${@oe.utils.conditional('VIRTUAL-RUNTIME_init_manager', 'systemd', 'pam', '', d)}"
|
|
|
|
RDEPENDS:${PN} = "weston kbd"
|
|
|
|
INITSCRIPT_NAME = "weston"
|
|
INITSCRIPT_PARAMS = "start 9 5 2 . stop 20 0 1 6 ."
|
|
|
|
FILES:${PN} += "\
|
|
${sysconfdir}/xdg/weston/weston.ini \
|
|
${sysconfdir}/systemd/system/init_display.service \
|
|
${sysconfdir}/systemd/system/multi-user.target.wants/init_display.service \
|
|
${sysconfdir}/default/weston \
|
|
${sysconfdir}/pam.d/ \
|
|
/lib/udev/rules.d/99-weston-ts.rules \
|
|
/home/weston \
|
|
"
|
|
|
|
CONFFILES:${PN} += "${sysconfdir}/xdg/weston/weston.ini ${sysconfdir}/default/weston"
|
|
|
|
SYSTEMD_SERVICE:${PN} = "weston.socket"
|
|
#USERADD_PARAM:${PN} = "--home /home/weston --shell /bin/sh --user-group -G video,input weston"
|
|
GROUPADD_PARAM:${PN} = "-r wayland"
|
|
|