mirror of
https://github.com/archlinux/aur.git
synced 2026-03-14 23:16:48 +01:00
73 lines
2.2 KiB
Text
73 lines
2.2 KiB
Text
depends=(
|
|
'gcc-libs'
|
|
'zlib'
|
|
)
|
|
makedepends=(
|
|
'desktop-file-utils'
|
|
'dotnet-sdk-bin' # aur/dotnet-core-bin
|
|
)
|
|
|
|
options=('!strip' '!debug')
|
|
|
|
pkgver() {
|
|
echo "${_pkgver:?}"
|
|
}
|
|
|
|
build() (
|
|
export HOME="$SRCDEST/nuget-home"
|
|
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
|
|
|
local _args=(
|
|
-c Release
|
|
-r linux-x64
|
|
--nologo
|
|
--self-contained true
|
|
-p:DebugType=none
|
|
-p:ExtraDefineConstants=DISABLE_UPDATER
|
|
-p:Version="${pkgver%%.[A-Za-z]*}"
|
|
)
|
|
|
|
echo "Building AVA Interface..."
|
|
dotnet publish "${_args[@]}" -o publish_ava "$_pkgsrc/src/Ryujinx"
|
|
|
|
echo "Building SDL2 Headless..."
|
|
dotnet publish "${_args[@]}" -o publish_sdl "$_pkgsrc/src/Ryujinx.Headless.SDL2"
|
|
|
|
echo "Shutting down dotnet build server in background."
|
|
(timeout -k 45 30 dotnet build-server shutdown) > /dev/null 2>&1 &
|
|
)
|
|
|
|
package() {
|
|
# program
|
|
install -dm755 "$pkgdir/$_install_path/ryujinx"
|
|
cp -a --update=none --reflink=auto publish_ava/* "$pkgdir/$_install_path/ryujinx/"
|
|
cp -a --update=none --reflink=auto publish_sdl/* "$pkgdir/$_install_path/ryujinx/"
|
|
|
|
# symlinks
|
|
install -dm755 "$pkgdir/usr/bin"
|
|
ln -s "/$_install_path/ryujinx/Ryujinx" "$pkgdir/usr/bin/ryujinx"
|
|
ln -s "/$_install_path/ryujinx/Ryujinx.Headless.SDL2" "$pkgdir/usr/bin/ryujinx.sdl"
|
|
|
|
# .desktop
|
|
install -Dm644 "$_pkgsrc"/distribution/linux/Ryujinx.desktop "$pkgdir/usr/share/applications/ryujinx.desktop"
|
|
|
|
# icon
|
|
install -Dm644 "$_pkgsrc"/distribution/misc/Logo.svg "$pkgdir/usr/share/pixmaps/ryujinx.svg"
|
|
|
|
# mimetype
|
|
install -Dm644 "$_pkgsrc"/distribution/linux/mime/Ryujinx.xml "$pkgdir/usr/share/mime/packages/ryujinx.xml"
|
|
|
|
# license
|
|
install -Dm644 "$_pkgsrc"/LICENSE.txt "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
|
|
# fix permissions
|
|
find "$pkgdir" -type d -exec chmod 755 {} \;
|
|
find "$pkgdir" -type f -exec chmod 644 {} \;
|
|
chmod 755 "$pkgdir/$_install_path/ryujinx/Ryujinx"
|
|
chmod 755 "$pkgdir/$_install_path/ryujinx/Ryujinx.Headless.SDL2"
|
|
chmod 755 "$pkgdir/$_install_path/ryujinx/Ryujinx.sh"
|
|
|
|
# fix desktop file
|
|
desktop-file-edit --set-key="Exec" --set-value="ryujinx %f" "$pkgdir/usr/share/applications/ryujinx.desktop"
|
|
desktop-file-edit --set-icon="ryujinx" "$pkgdir/usr/share/applications/ryujinx.desktop"
|
|
}
|