diff --git a/packages/wayland/weston/config/weston.ini b/packages/wayland/weston/config/weston.ini new file mode 100644 index 0000000000..b48f9c30c4 --- /dev/null +++ b/packages/wayland/weston/config/weston.ini @@ -0,0 +1,13 @@ +[core] +idle-time=0 + +[shell] +locking=false + +[launcher] +path=/usr/lib/kodi/kodi.bin +icon=/usr/share/kodi/media/icon16x16.png + +[launcher] +icon=/usr/share/weston/terminal.png +path=/usr/bin/weston-terminal diff --git a/packages/wayland/weston/package.mk b/packages/wayland/weston/package.mk new file mode 100644 index 0000000000..3a6e4fab2a --- /dev/null +++ b/packages/wayland/weston/package.mk @@ -0,0 +1,68 @@ +################################################################################ +# This file is part of LibreELEC - https://libreelec.tv +# Copyright (C) 2016-present Team LibreELEC +# +# LibreELEC is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# LibreELEC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with LibreELEC. If not, see . +################################################################################ + +PKG_NAME="weston" +PKG_VERSION="3.0.0" +PKG_SHA256="cde1d55e8dd70c3cbb3d1ec72f60e60000041579caa1d6a262bd9c35e93723a5" +PKG_ARCH="any" +PKG_LICENSE="OSS" +PKG_SITE="https://wayland.freedesktop.org/" +PKG_URL="https://wayland.freedesktop.org/releases/${PKG_NAME}-${PKG_VERSION}.tar.xz" +PKG_DEPENDS_TARGET="toolchain wayland-protocols libdrm libxkbcommon libinput cairo libjpeg-turbo dbus" +PKG_SECTION="wayland" +PKG_SHORTDESC="Reference implementation of a Wayland compositor" +PKG_LONGDESC="Reference implementation of a Wayland compositor" + +PKG_CONFIGURE_OPTS_TARGET="CFLAGS=-DMESA_EGL_NO_X11_HEADERS \ + LIBS=-lturbojpeg \ + --with-cairo-glesv2 \ + --disable-xwayland \ + --disable-x11-compositor \ + --disable-xwayland-test \ + --disable-libunwind \ + --disable-colord \ + --disable-ivi-shell \ + --disable-fbdev-compositor \ + --disable-rdp-compositor \ + --disable-screen-sharing \ + --disable-vaapi-recorder \ + --disable-headless-compositor \ + --enable-systemd-login \ + --disable-weston-launch \ + --disable-fullscreen-shell \ + --disable-demo-clients-install \ + --enable-systemd-notify" + +pre_configure_target() { + strip_lto +} + +post_makeinstall_target() { + mkdir -p $INSTALL/usr/lib/weston + cp $PKG_DIR/scripts/weston-config $INSTALL/usr/lib/weston + + mkdir -p $INSTALL/usr/share/weston + cp $PKG_DIR/config/weston.ini $INSTALL/usr/share/weston + + rm -r $INSTALL/usr/share/wayland-sessions + rm -r $INSTALL/usr/lib/weston-simple-im +} + +post_install() { + enable_service weston.service +} diff --git a/packages/wayland/weston/profile.d/04-weston.conf b/packages/wayland/weston/profile.d/04-weston.conf new file mode 100644 index 0000000000..d006d4a532 --- /dev/null +++ b/packages/wayland/weston/profile.d/04-weston.conf @@ -0,0 +1,19 @@ +################################################################################ +# This file is part of LibreELEC - https://libreelec.tv +# Copyright (C) 2016-present Team LibreELEC +# +# LibreELEC is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# LibreELEC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with LibreELEC. If not, see . +################################################################################ + +export XDG_RUNTIME_DIR=/var/run/0-runtime-dir diff --git a/packages/wayland/weston/scripts/weston-config b/packages/wayland/weston/scripts/weston-config new file mode 100755 index 0000000000..75f6dc8528 --- /dev/null +++ b/packages/wayland/weston/scripts/weston-config @@ -0,0 +1,29 @@ +#!/bin/sh +################################################################################ +# This file is part of LibreELEC - https://libreelec.tv +# Copyright (C) 2016-present Team LibreELEC +# +# LibreELEC is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# LibreELEC is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with LibreELEC. If not, see . +################################################################################ + +export XDG_RUNTIME_DIR=/var/run/0-runtime-dir + +if [ ! -d "$XDG_RUNTIME_DIR" ]; then + mkdir "$XDG_RUNTIME_DIR" + chmod 0700 "$XDG_RUNTIME_DIR" +fi + +if [ ! -f /storage/.config/weston.ini ]; then + cp /usr/share/weston/weston.ini /storage/.config/weston.ini +fi diff --git a/packages/wayland/weston/system.d/weston.service b/packages/wayland/weston/system.d/weston.service new file mode 100644 index 0000000000..a776af3dfc --- /dev/null +++ b/packages/wayland/weston/system.d/weston.service @@ -0,0 +1,18 @@ +[Unit] +Description=Weston Launcher +Before=graphical.target +After=multi-user.target +ConditionKernelCommandLine=!installer + +[Service] +Environment=HOME=/storage +Environment=XDG_RUNTIME_DIR=/var/run/0-runtime-dir +WorkingDirectory=/storage +ExecStartPre=-/usr/lib/weston/weston-config +ExecStart=/usr/bin/weston --tty=1 --log=/var/log/weston.log +Restart=always +RestartSec=10 + +[Install] +Alias=display-manager.service +WantedBy=graphical.target