Add AUR PKGBUILD
This commit is contained in:
parent
12a361a3d9
commit
f4074341a5
9 changed files with 351 additions and 0 deletions
35
packaging/linux/aur/sunshine-git/.SRCINFO
Normal file
35
packaging/linux/aur/sunshine-git/.SRCINFO
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
pkgbase = sunshine-git
|
||||
pkgdesc = Open source implementation of NVIDIA's GameStream, as used by the NVIDIA Shield
|
||||
pkgver = 0.13.0.957.4b658cd
|
||||
pkgrel = 1
|
||||
url = https://github.com/SunshineStream/sunshine
|
||||
install = sunshine.install
|
||||
arch = x86_64
|
||||
arch = i686
|
||||
license = GPL3
|
||||
makedepends = git
|
||||
makedepends = cmake
|
||||
makedepends = boost
|
||||
makedepends = make
|
||||
depends = boost-libs
|
||||
depends = ffmpeg4.4
|
||||
depends = openssl
|
||||
depends = libpulse
|
||||
depends = opus
|
||||
depends = libxtst
|
||||
depends = libx11
|
||||
depends = libxfixes
|
||||
depends = libevdev
|
||||
depends = libxcb
|
||||
depends = libxrandr
|
||||
depends = udev
|
||||
provides = sunshine
|
||||
conflicts = sunshine
|
||||
source = sunshine-git::git+https://github.com/SunshineStream/sunshine.git
|
||||
source = systemd-user-config.patch
|
||||
source = udev.rules
|
||||
sha256sums = SKIP
|
||||
sha256sums = 1642eb8672b137e94aa16e4aadde37f68bf1920dfadd1325cca480d7731f38c9
|
||||
sha256sums = 5ce01689247cb01d3f119cac32c731607d99bb875dcdd39c92b547f76d2befa0
|
||||
|
||||
pkgname = sunshine-git
|
||||
92
packaging/linux/aur/sunshine-git/PKGBUILD
Normal file
92
packaging/linux/aur/sunshine-git/PKGBUILD
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
# Maintainer: Jacek Szafarkiewicz <szafar at linux dot pl>
|
||||
# Contributor: Levente Polyak <anthraxx[at]archlinux[dot]org>
|
||||
|
||||
pkgname=sunshine-git
|
||||
pkgver=0.13.0.957.4b658cd
|
||||
pkgrel=1
|
||||
pkgdesc="Open source implementation of NVIDIA's GameStream, as used by the NVIDIA Shield"
|
||||
url="https://github.com/SunshineStream/sunshine"
|
||||
arch=('x86_64' 'i686')
|
||||
license=('GPL3')
|
||||
|
||||
depends=('boost-libs' 'ffmpeg4.4' 'openssl' 'libpulse' 'opus' 'libxtst' 'libx11' 'libxfixes' 'libevdev' 'libxcb' 'libxrandr' 'udev')
|
||||
makedepends=('git' 'cmake' 'boost' 'make')
|
||||
|
||||
provides=('sunshine')
|
||||
conflicts=("sunshine")
|
||||
|
||||
# source=("$pkgname::git+https://github.com/SunshineStream/sunshine.git"
|
||||
# "systemd-user-config.patch"
|
||||
# "udev.rules")
|
||||
source=("$pkgname::git+https://github.com/SunshineStream/sunshine.git")
|
||||
# sha256sums=('SKIP'
|
||||
# '1642eb8672b137e94aa16e4aadde37f68bf1920dfadd1325cca480d7731f38c9'
|
||||
# '5ce01689247cb01d3f119cac32c731607d99bb875dcdd39c92b547f76d2befa0')
|
||||
sha256sums=('SKIP')
|
||||
# install=sunshine.install
|
||||
|
||||
_assets_path=/usr/share/sunshine
|
||||
|
||||
pkgver() {
|
||||
cd "$pkgname"
|
||||
printf "%s.%s.%s" "$(git describe --tags $(git rev-list --tags --max-count=1) | sed 's/^v//')" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname"
|
||||
git submodule update --recursive --init
|
||||
|
||||
# patch -p1 < ../systemd-user-config.patch
|
||||
}
|
||||
|
||||
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 SUNSHINE_ASSETS_DIR="$_assets_path" \
|
||||
\
|
||||
-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 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() {
|
||||
pushd "$pkgname/assets"
|
||||
install -Dvm644 sunshine.conf "$pkgdir/$_assets_path/sunshine.conf"
|
||||
install -Dvm644 apps_linux.json "$pkgdir/$_assets_path/apps_linux.json"
|
||||
|
||||
find web shaders/opengl -type f -print0 | xargs -0 -I {} install -Dvm644 {} "$pkgdir/$_assets_path/{}"
|
||||
popd
|
||||
|
||||
pushd build
|
||||
install -Dvm755 sunshine "$pkgdir/usr/bin/sunshine"
|
||||
install -Dvm644 sunshine.service "$pkgdir/usr/lib/systemd/user/sunshine.service"
|
||||
popd
|
||||
|
||||
# install -Dvm644 udev.rules "$pkgdir/usr/lib/udev/rules.d/85-sunshine.rules"
|
||||
}
|
||||
|
||||
post_install() {
|
||||
if ! getent group input > /dev/null; then
|
||||
echo "Creating group input"
|
||||
groupadd -r input
|
||||
fi
|
||||
}
|
||||
|
||||
# vim: ts=2 sw=2 et:
|
||||
33
packaging/linux/aur/sunshine/.SRCINFO
Normal file
33
packaging/linux/aur/sunshine/.SRCINFO
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
pkgbase = sunshine
|
||||
pkgdesc = Open source implementation of NVIDIA's GameStream, as used by the NVIDIA Shield
|
||||
pkgver = 0.13.0
|
||||
pkgrel = 1
|
||||
url = https://github.com/SunshineStream/sunshine
|
||||
install = sunshine.install
|
||||
arch = x86_64
|
||||
arch = i686
|
||||
license = GPL3
|
||||
makedepends = git
|
||||
makedepends = cmake
|
||||
makedepends = boost
|
||||
makedepends = make
|
||||
depends = boost-libs
|
||||
depends = ffmpeg4.4
|
||||
depends = openssl
|
||||
depends = libpulse
|
||||
depends = opus
|
||||
depends = libxtst
|
||||
depends = libx11
|
||||
depends = libxfixes
|
||||
depends = libevdev
|
||||
depends = libxcb
|
||||
depends = libxrandr
|
||||
depends = udev
|
||||
source = sunshine::git+https://github.com/SunshineStream/sunshine.git#tag=v0.13.0
|
||||
source = systemd-user-config.patch
|
||||
source = udev.rules
|
||||
sha256sums = SKIP
|
||||
sha256sums = 1642eb8672b137e94aa16e4aadde37f68bf1920dfadd1325cca480d7731f38c9
|
||||
sha256sums = 5ce01689247cb01d3f119cac32c731607d99bb875dcdd39c92b547f76d2befa0
|
||||
|
||||
pkgname = sunshine
|
||||
81
packaging/linux/aur/sunshine/PKGBUILD
Normal file
81
packaging/linux/aur/sunshine/PKGBUILD
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
# Maintainer: Jacek Szafarkiewicz <szafar at linux dot pl>
|
||||
|
||||
pkgname=sunshine
|
||||
pkgver=0.13.0
|
||||
pkgrel=1
|
||||
pkgdesc="Open source implementation of NVIDIA's GameStream, as used by the NVIDIA Shield"
|
||||
url="https://github.com/SunshineStream/sunshine"
|
||||
arch=('x86_64' 'i686')
|
||||
license=('GPL3')
|
||||
|
||||
depends=('boost-libs' 'ffmpeg4.4' 'openssl' 'libpulse' 'opus' 'libxtst' 'libx11' 'libxfixes' 'libevdev' 'libxcb' 'libxrandr' 'udev')
|
||||
makedepends=('git' 'cmake' 'boost' 'make')
|
||||
|
||||
# source=("$pkgname::git+https://github.com/SunshineStream/sunshine.git#tag=v$pkgver"
|
||||
# "systemd-user-config.patch"
|
||||
# "udev.rules")
|
||||
source=("$pkgname::git+https://github.com/SunshineStream/sunshine.git#tag=v$pkgver")
|
||||
# sha256sums=('SKIP'
|
||||
# '1642eb8672b137e94aa16e4aadde37f68bf1920dfadd1325cca480d7731f38c9'
|
||||
# '5ce01689247cb01d3f119cac32c731607d99bb875dcdd39c92b547f76d2befa0')
|
||||
sha256sums=('SKIP')
|
||||
# install=sunshine.install
|
||||
|
||||
_assets_path=/usr/share/$pkgname
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname"
|
||||
git submodule update --recursive --init
|
||||
|
||||
# patch -p1 < ../systemd-user-config.patch
|
||||
}
|
||||
|
||||
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 SUNSHINE_ASSETS_DIR="$_assets_path" \
|
||||
\
|
||||
-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() {
|
||||
pushd "$pkgname/assets"
|
||||
install -Dvm644 sunshine.conf "$pkgdir/$_assets_path/sunshine.conf"
|
||||
install -Dvm644 apps_linux.json "$pkgdir/$_assets_path/apps_linux.json"
|
||||
|
||||
find web shaders/opengl -type f -print0 | xargs -0 -I {} install -Dvm644 {} "$pkgdir/$_assets_path/{}"
|
||||
popd
|
||||
|
||||
pushd build
|
||||
install -Dvm755 sunshine "$pkgdir/usr/bin/sunshine"
|
||||
install -Dvm644 sunshine.service "$pkgdir/usr/lib/systemd/user/sunshine.service"
|
||||
popd
|
||||
|
||||
# install -Dvm644 udev.rules "$pkgdir/usr/lib/udev/rules.d/85-sunshine.rules"
|
||||
}
|
||||
|
||||
post_install() {
|
||||
if ! getent group input > /dev/null; then
|
||||
echo "Creating group input"
|
||||
groupadd -r input
|
||||
fi
|
||||
}
|
||||
|
||||
# vim: ts=2 sw=2 et:
|
||||
6
packaging/linux/aur/tmp/sunshine.install
Normal file
6
packaging/linux/aur/tmp/sunshine.install
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
post_install() {
|
||||
if ! getent group input > /dev/null; then
|
||||
echo "Creating group input"
|
||||
groupadd -r input
|
||||
fi
|
||||
}
|
||||
14
packaging/linux/aur/tmp/systemd-user-config.patch
Normal file
14
packaging/linux/aur/tmp/systemd-user-config.patch
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
diff --git a/sunshine.service.in b/sunshine.service.in
|
||||
index c0c3828..fe45460 100644
|
||||
--- a/sunshine.service.in
|
||||
+++ b/sunshine.service.in
|
||||
@@ -2,7 +2,8 @@
|
||||
Description=Sunshine Gamestream Server for Moonlight
|
||||
|
||||
[Service]
|
||||
-ExecStart=@SUNSHINE_EXECUTABLE_PATH@
|
||||
+ExecStartPre=/bin/sh -c "test -e %E/sunshine || cp -r '@SUNSHINE_ASSETS_DIR@' '%E/sunshine'"
|
||||
+ExecStart=@SUNSHINE_EXECUTABLE_PATH@ %E/sunshine/sunshine.conf
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
1
packaging/linux/aur/tmp/udev.rules
Normal file
1
packaging/linux/aur/tmp/udev.rules
Normal file
|
|
@ -0,0 +1 @@
|
|||
KERNEL=="uinput", GROUP="input", MODE="0660"
|
||||
Loading…
Add table
Add a link
Reference in a new issue