Skip to content

Instantly share code, notes, and snippets.

@junglerobba
Last active March 4, 2020 12:07
Show Gist options
  • Save junglerobba/009307387dd15d58d6ccb2f2543eb7ed to your computer and use it in GitHub Desktop.
Save junglerobba/009307387dd15d58d6ccb2f2543eb7ed to your computer and use it in GitHub Desktop.
sway VRR testing PKGBUILDS
# Maintainer: Drew DeVault <sir@cmpwn.com>
pkgname=sway-git
_pkgname=sway
pkgver=r6240.c0811fcf
pkgrel=1
license=("MIT")
pkgdesc="i3-compatible Wayland compositor"
makedepends=("meson" "git" "scdoc" "wayland-protocols" "ninja")
depends=(
"json-c" "pcre" "wlroots-git" "cairo" "pango" "gdk-pixbuf2" "pam"
"xorg-server-xwayland" "swaybg-git"
)
optdepends=(
"alacritty: Default terminal emulator."
"dmenu: Default for launching applications."
"i3status: To display system information with a bar."
"swayidle-git: Idle management daemon for Sway."
"swaylock-git: Screen locker for Sway."
)
arch=("i686" "x86_64")
url="https://swaywm.org"
source=("${pkgname%-*}::git+https://github.com/swaywm/sway.git"
"https://github.com/swaywm/sway/pull/5063.patch")
sha512sums=('SKIP' 'SKIP')
provides=("sway")
conflicts=("sway")
options=(debug !strip)
prepare() {
cd "$_pkgname"
patch --forward --strip=1 --input="${srcdir}/5063.patch"
}
pkgver() {
cd "$_pkgname"
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}
build() {
cd "$_pkgname"
meson \
-Dwerror=false \
--prefix /usr \
"$srcdir/build"
ninja -C "$srcdir/build"
}
package() {
cd "$_pkgname"
DESTDIR="$pkgdir" ninja -C "$srcdir/build" install
}
# Maintainer: Adrian Perez de Castro <aperez@igalia.com>
pkgname=wlroots-git
pkgver=0.10.0.r31.g8d2e8d8a
pkgrel=1
license=(custom:MIT)
pkgdesc='Modular Wayland compositor library'
url=https://github.com/swaywm/wlroots
arch=(x86_64)
provides=("wlroots=${pkgver%%.r*}")
conflicts=(wlroots)
options=(debug)
depends=(libcap systemd wayland opengl-driver libxcb xcb-util-errors
xcb-util-wm pixman libinput libxkbcommon)
makedepends=(meson ninja git wayland-protocols xorgproto)
source=("${pkgname}::git+${url}"
"https://github.com/swaywm/wlroots/pull/1987.patch")
sha512sums=('SKIP' 'SKIP')
prepare() {
cd "${pkgname}"
patch --forward --strip=1 --input="${srcdir}/1987.patch"
}
pkgver () {
cd "${pkgname}"
(
set -o pipefail
git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
)
}
build () {
cd "${pkgname}"
rm -rf build
meson build \
--prefix /usr \
--buildtype debug \
-Dlibcap=enabled \
-Dlogind=enabled \
-Dlogind-provider=systemd \
-Dxcb-errors=enabled \
-Dxcb-icccm=enabled \
-Dxwayland=enabled \
-Dx11-backend=enabled \
-Dexamples=true
ninja -C build
}
package () {
cd "${pkgname}"
DESTDIR="${pkgdir}" ninja -C build install
install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment