diff options
Diffstat (limited to 'sway-git')
| -rw-r--r-- | sway-git/.gitignore | 1 | ||||
| -rw-r--r-- | sway-git/50-systemd-user.conf | 16 | ||||
| -rw-r--r-- | sway-git/PKGBUILD | 82 | ||||
| -rw-r--r-- | sway-git/sway-git.install | 23 | ||||
| -rw-r--r-- | sway-git/sway-portals.conf | 5 |
5 files changed, 127 insertions, 0 deletions
diff --git a/sway-git/.gitignore b/sway-git/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/sway-git/.gitignore @@ -0,0 +1 @@ + diff --git a/sway-git/50-systemd-user.conf b/sway-git/50-systemd-user.conf new file mode 100644 index 0000000..8781db9 --- /dev/null +++ b/sway-git/50-systemd-user.conf @@ -0,0 +1,16 @@ +# sway does not set DISPLAY/WAYLAND_DISPLAY in the systemd user environment +# See FS#63021 +# Adapted from xorg's 50-systemd-user.sh, which achieves a similar goal. + +# Upstream refuses to set XDG_CURRENT_DESKTOP so we have to. +exec systemctl --user set-environment XDG_CURRENT_DESKTOP=sway +exec systemctl --user import-environment DISPLAY \ + SWAYSOCK \ + WAYLAND_DISPLAY \ + XDG_CURRENT_DESKTOP + +exec hash dbus-update-activation-environment 2>/dev/null && \ + dbus-update-activation-environment --systemd DISPLAY \ + SWAYSOCK \ + XDG_CURRENT_DESKTOP=sway \ + WAYLAND_DISPLAY diff --git a/sway-git/PKGBUILD b/sway-git/PKGBUILD new file mode 100644 index 0000000..d59435e --- /dev/null +++ b/sway-git/PKGBUILD @@ -0,0 +1,82 @@ +pkgname=sway-git +pkgver=1.12.r7631.e3c2412 +pkgrel=1 +pkgdesc='Tiling Wayland compositor and replacement for the i3 window manager (git development version)' +arch=('x86_64') +url="https://github.com/swaywm/sway" +license=("MIT") +depends=( + "cairo" + "gdk-pixbuf2" + "json-c" + "libdrm" + "libevdev" + "libinput" + "libxcb" + "libxkbcommon" + "pango" + "pcre2" + "pixman" + "wayland" + "wlroots-git" + "xcb-util-wm" +) +makedepends=( + "git" + "libcap" + "meson" + "scdoc" + "wayland-protocols" +) +optdepends=( + 'wmenu: Application launcher used in default configuration' + 'foot: Terminal emulator used in default configuration' + 'polkit: System privilege control. Required if not using seatd service' + 'swaybg: Wallpaper tool for sway' + 'swayidle: Idle management daemon' + 'swaylock: Screen locker' + 'xdg-desktop-portal-gtk: Portal used for default file picking' + 'xdg-desktop-portal-wlr: Portal used for screen sharing' +) +provides=("${pkgname%-git}" "wayland-compositor") +conflicts=("${pkgname%-git}") +install="${pkgname}.install" +options=("!debug") +source=("${pkgname}::git+${url}.git" + "50-systemd-user.conf" + "sway-portals.conf") +b2sums=('SKIP' + '71f45f9abb4e9f98a52177b227aa30ab27d02c9eef8a31400460e71c72b6d40ec396581f0b1703d4cec655aaba704077212882f643c6efb6cda951ea69b5383d' + 'cdba5fd2988b7ead8b264d5b41f1c7adb47a6487be1e3a4ce98c0af2094d9964f4bc364237c4437014be18061f067aa741b0382f21365be497e06b189c5c7728') + +_meson_setup() { + arch-meson "$pkgname" "$1" -D sd-bus-provider=libsystemd +} + +prepare() { + _meson_setup build-pkgver +} + +pkgver() { + ( + set -o pipefail + meson introspect --projectinfo build-pkgver | sed -n 's/.*"version": "\([^"]*\)".*/\1/;s/-\(dev\|rc[0-9]\+\)//p' | tr -d '\n' + ) + cd "$pkgname" + printf ".r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)" +} + +build() { + _meson_setup build + meson compile -C build +} + +package() { + meson install -C build --destdir "$pkgdir" + + install -Dm644 "${pkgname}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 "${pkgname}/README.md" "${pkgdir}/usr/share/doc/${pkgname}/README.md" + + install -Dm644 50-systemd-user.conf -t "$pkgdir/etc/sway/config.d/" + install -Dm644 sway-portals.conf -t "$pkgdir/usr/share/xdg-desktop-portal/" +} diff --git a/sway-git/sway-git.install b/sway-git/sway-git.install new file mode 100644 index 0000000..36753dd --- /dev/null +++ b/sway-git/sway-git.install @@ -0,0 +1,23 @@ +upgrade_wlroots_message() { + cat <<END + +Please make sure your wlroots-git is up-to-date before compiling sway-git. + +END +} + +pre_install() { + upgrade_wlroots_message +} + +pre_upgrade() { + upgrade_wlroots_message +} + +post_install() { + post_upgrade +} + +post_upgrade() { + setcap cap_sys_nice+ep usr/bin/sway +} diff --git a/sway-git/sway-portals.conf b/sway-git/sway-portals.conf new file mode 100644 index 0000000..aebea31 --- /dev/null +++ b/sway-git/sway-portals.conf @@ -0,0 +1,5 @@ +[preferred] +default=gtk +org.freedesktop.impl.portal.ScreenCast=wlr +org.freedesktop.impl.portal.Screenshot=wlr +org.freedesktop.impl.portal.Inhibit=none |
