2022-07-11 10:58:58 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
# Copyright (C) 2021-present Team LibreELEC (https://libreelec.tv)
|
|
|
|
|
|
|
|
PKG_NAME="sway"
|
|
|
|
PKG_VERSION="1.7"
|
|
|
|
PKG_SHA256="0c64536fb2883ec518e75cfb119f9300115fb49b084e3fde62b794fe2c6c8d84"
|
|
|
|
PKG_LICENSE="MIT"
|
|
|
|
PKG_SITE="https://swaywm.org/"
|
|
|
|
PKG_URL="https://github.com/swaywm/sway/archive/${PKG_VERSION}.tar.gz"
|
2022-09-02 10:51:17 +00:00
|
|
|
PKG_DEPENDS_TARGET="toolchain wayland wayland-protocols libdrm libxkbcommon libinput cairo pango libjpeg-turbo dbus json-c wlroots gdk-pixbuf swaybg foot bemenu xorg-server"
|
2022-07-11 10:58:58 +00:00
|
|
|
PKG_LONGDESC="i3-compatible Wayland compositor"
|
|
|
|
|
|
|
|
PKG_MESON_OPTS_TARGET="-Ddefault-wallpaper=false \
|
|
|
|
-Dzsh-completions=false \
|
|
|
|
-Dbash-completions=false \
|
|
|
|
-Dfish-completions=false \
|
|
|
|
-Dswaybar=true \
|
|
|
|
-Dswaynag=true \
|
2022-09-02 10:51:17 +00:00
|
|
|
-Dxwayland=enabled \
|
2022-07-11 10:58:58 +00:00
|
|
|
-Dtray=disabled \
|
|
|
|
-Dgdk-pixbuf=enabled \
|
|
|
|
-Dman-pages=disabled \
|
|
|
|
-Dsd-bus-provider=auto"
|
|
|
|
|
|
|
|
pre_configure_target() {
|
|
|
|
# sway does not build without -Wno flags as all warnings being treated as errors
|
2022-08-27 20:22:17 +00:00
|
|
|
export TARGET_CFLAGS=$(echo "${TARGET_CFLAGS} -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-function -Wno-maybe-uninitialized -Wno-stringop-truncation -Wno-address")
|
2022-07-11 10:58:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
post_makeinstall_target() {
|
|
|
|
mkdir -p ${INSTALL}/usr/lib/sway
|
|
|
|
cp ${PKG_DIR}/scripts/sway.sh ${INSTALL}/usr/bin
|
|
|
|
cp ${PKG_DIR}/scripts/sway-config ${INSTALL}/usr/lib/sway
|
|
|
|
|
|
|
|
# install config & wallpaper
|
|
|
|
mkdir -p ${INSTALL}/usr/share/sway
|
|
|
|
cp ${PKG_DIR}/config/* ${INSTALL}/usr/share/sway
|
|
|
|
find_file_path "splash/splash-2160.png" && cp ${FOUND_PATH} ${INSTALL}/usr/share/sway/libreelec-wallpaper-2160.png
|
|
|
|
|
|
|
|
# clean up
|
|
|
|
safe_remove ${INSTALL}/etc
|
|
|
|
safe_remove ${INSTALL}/usr/share/wayland-sessions
|
|
|
|
}
|
|
|
|
|
|
|
|
post_install() {
|
|
|
|
enable_service sway.service
|
|
|
|
}
|