Sunshine/packaging/linux/Arch/PKGBUILD
Cameron Gutman 278567f72d Move kmsgrab dependencies from optdepends to depends
kmsgrab is the most fully featured capture backend for current
versions of Sunshine, so it should be built by default.

In addition to zero-copy capture and HDR support, it is the *only*
capture backend that can handle non-wlroots Wayland capture.
2024-03-09 18:56:44 -06:00

74 lines
1.7 KiB
Bash

# Edit on github: https://github.com/LizardByte/Sunshine/blob/nightly/packaging/linux/Arch/PKGBUILD
# Reference: https://wiki.archlinux.org/title/PKGBUILD
pkgname='sunshine'
pkgver=@PROJECT_VERSION@@SUNSHINE_SUB_VERSION@
pkgrel=1
pkgdesc="@PROJECT_DESCRIPTION@"
arch=('x86_64' 'aarch64')
url=@PROJECT_HOMEPAGE_URL@
license=('GPL3')
depends=('avahi'
'boost-libs'
'curl'
'libayatana-appindicator'
'libcap'
'libdrm'
'libevdev'
'libmfx'
'libnotify'
'libpulse'
'libva'
'libvdpau'
'libx11'
'libxcb'
'libxfixes'
'libxrandr'
'libxtst'
'miniupnpc'
'numactl'
'openssl'
'opus'
'udev')
makedepends=('boost'
'cmake'
'git'
'make'
'nodejs'
'npm')
optdepends=('cuda: NvFBC capture support')
provides=('sunshine')
source=("$pkgname::git+@GITHUB_CLONE_URL@#commit=@GITHUB_COMMIT@")
sha256sums=('SKIP')
prepare() {
cd "$pkgname"
git submodule update --recursive --init
}
build() {
export BRANCH="@GITHUB_BRANCH@"
export BUILD_VERSION="@GITHUB_BUILD_VERSION@"
export COMMIT="@GITHUB_COMMIT@"
export CFLAGS="${CFLAGS/-Werror=format-security/}"
export CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
cmake \
-S "$pkgname" \
-B build \
-Wno-dev \
-D BUILD_WERROR=ON \
-D CMAKE_INSTALL_PREFIX=/usr \
-D SUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
-D SUNSHINE_ASSETS_DIR="share/sunshine"
make -C build
}
package() {
make -C build install DESTDIR="$pkgdir"
}