use npm dependencies

This commit is contained in:
ReenigneArcher 2022-11-18 15:44:06 -05:00
commit 981d878082
No known key found for this signature in database
GPG key ID: 0CA6A47B0630EA9B
37 changed files with 110 additions and 21698 deletions

View file

@ -10,7 +10,7 @@ url=@PROJECT_HOMEPAGE_URL@
license=('GPL3')
depends=('avahi' 'boost-libs' 'curl' 'ffmpeg4.4' 'libevdev' 'libpulse' 'libx11' 'libxcb' 'libxfixes' 'libxrandr' 'libxtst' 'openssl' 'opus' 'udev')
makedepends=('boost' 'cmake' 'git' 'make')
makedepends=('boost' 'cmake' 'git' 'make' 'nodejs' 'npm')
optdepends=('cuda' 'libcap' 'libdrm')
provides=(@SUNSHINE_AUR_PROVIDES@)
@ -25,6 +25,10 @@ prepare() {
}
build() {
pushd "$pkgname/src_assets/common/assets/web"
npm install
popd
export CFLAGS="${CFLAGS/-Werror=format-security/}"
export CXXFLAGS="${CXXFLAGS/-Werror=format-security/}"

View file

@ -3,6 +3,8 @@ app-id: dev.lizardbyte.sunshine
runtime: org.freedesktop.Platform
runtime-version: "21.08"
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.node18
command: sunshine
separate-locales: false
finish-args:
@ -183,7 +185,16 @@ modules:
no-make-install: false
builddir: true
build-options:
append-path: /usr/lib/sdk/node18/bin
build-args:
- --share=network
cxxflags: -I${C_INCLUDE_PATH}/libevdev-1.0
env:
npm_config_nodedir: /usr/lib/sdk/node18
NPM_CONFIG_LOGLEVEL: info
build-commands:
# Install npm dependencies
- cd ${FLATPAK_BUILDER_BUILDDIR}/src_assets/common/assets/web && npm install
config-opts:
- -DCMAKE_BUILD_TYPE=Release
- -DCMAKE_INSTALL_PREFIX=/app

View file

@ -34,7 +34,8 @@ post-fetch {
depends_lib port:avahi \
port:curl \
port:ffmpeg \
port:libopus
port:libopus \
port:npm9
boost.version 1.80
@ -54,6 +55,10 @@ platform darwin {
}
}
pre-build {
system -W ${worksrcpath}/src_assets/common/assets/web "npm install"
}
notes-append "Run @PROJECT_NAME@ by executing 'sunshine <path to user config>', e.g. 'sunshine ~/sunshine.conf' "
notes-append "The config file will be created if it doesn't exist."
notes-append "It is recommended to set a location for the apps file in the config."