PKGBUILD (2060B) - View raw
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83# Maintainer: GreyXor <greyxor@protonmail.com> # Contributor: Drew DeVault <sir@cmpwn.com> pkgname=sway-git pkgver=1.12.r7633.c17c6e4 pkgrel=1 pkgdesc='Tiling Wayland compositor and replacement for the i3 window manager (git development version)' arch=('x86_64') url="https://git.awy.one/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" source=("${pkgname}::git+${url}.git#branch=tray-patch" "50-systemd-user.conf" "sway-portals.conf") b2sums=('SKIP' 'SKIP' 'SKIP') _meson_setup() { arch-meson "$pkgname" "$1" -D sd-bus-provider=libelogind } 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/" }