mirror of
https://github.com/LizardByte/Sunshine.git
synced 2024-11-18 20:09:54 +00:00
f07171315f
- Release to AUR on push into `master` - Update AUR installation instructions - Use common linux directories for `PKGBUILD`
56 lines
1.9 KiB
Bash
56 lines
1.9 KiB
Bash
# Edit on github: https://github.com/SunshineStream/Sunshine/tree/nightly/packaging/linux/aur/PKGBUILD
|
|
# Reference: https://wiki.archlinux.org/title/PKGBUILD
|
|
|
|
pkgname=@SUNSHINE_AUR_PKG@
|
|
pkgver=@PROJECT_VERSION@@SUNSHINE_SUB_VERSION@
|
|
pkgrel=1
|
|
pkgdesc="@PROJECT_DESCRIPTION@"
|
|
arch=('x86_64' 'i686')
|
|
url=@PROJECT_HOMEPAGE_URL@
|
|
license=('GPL3')
|
|
|
|
depends=('boost-libs' 'ffmpeg4.4' 'libpulse' 'libevdev' 'libx11' 'libxcb' 'libxfixes' 'libxrandr' 'libxtst' 'openssl' 'opus' 'udev')
|
|
makedepends=('git' 'cmake' 'boost' 'make')
|
|
optdepends=('cuda' 'libdrm' 'libcap')
|
|
|
|
provides=(@SUNSHINE_AUR_PROVIDES@)
|
|
conflicts=(@SUNSHINE_AUR_CONFLICTS@)
|
|
|
|
source=("$pkgname::git+https://github.com/@GITHUB_OWNER@/@GITHUB_REPO@.git@SUNSHINE_AUR_FRAGMENT@")
|
|
sha256sums=('SKIP')
|
|
|
|
prepare() {
|
|
cd "$pkgname"
|
|
git submodule update --recursive --init
|
|
}
|
|
|
|
build() {
|
|
export CFLAGS="${CFLAGS/-Werror=format-security/}"
|
|
export CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"
|
|
|
|
cmake \
|
|
-S "$pkgname" \
|
|
-B build \
|
|
-Wno-dev \
|
|
-D SUNSHINE_EXECUTABLE_PATH=/usr/bin/sunshine \
|
|
-D CMAKE_INSTALL_PREFIX="/usr" \
|
|
-D SUNSHINE_ASSETS_DIR="local/sunshine/assets" \
|
|
-D SUNSHINE_CONFIG_DIR="local/sunshine/config" \
|
|
-D LIBAVCODEC_INCLUDE_DIR=/usr/include/ffmpeg4.4 \
|
|
-D LIBAVCODEC_LIBRARIES=/usr/lib/ffmpeg4.4/libavcodec.so \
|
|
-D LIBAVDEVICE_INCLUDE_DIR=/usr/include/ffmpeg4.4 \
|
|
-D LIBAVDEVICE_LIBRARIES=/usr/lib/ffmpeg4.4/libavdevice.so \
|
|
-D LIBAVFORMAT_INCLUDE_DIR=/usr/include/ffmpeg4.4 \
|
|
-D LIBAVFORMAT_LIBRARIES=/usr/lib/ffmpeg4.4/libavformat.so \
|
|
-D LIBAVUTIL_INCLUDE_DIR=/usr/include/ffmpeg4.4 \
|
|
-D LIBAVUTIL_LIBRARIES=/usr/lib/ffmpeg4.4/libavutil.so \
|
|
-D LIBSWSCALE_INCLUDE_DIR=/usr/include/ffmpeg4.4 \
|
|
-D LIBSWSCALE_LIBRARIES=/usr/lib/ffmpeg4.4/libswscale.so
|
|
|
|
make -C build
|
|
}
|
|
|
|
package() {
|
|
make -C build install DESTDIR="$pkgdir"
|
|
}
|