diff --git a/.SRCINFO b/.SRCINFO index a45814ec5d0f..06fffef3d61b 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = ryujinx pkgdesc = Experimental Nintendo Switch Emulator written in C# pkgver = 1.2.86 - pkgrel = 1 + pkgrel = 2 url = https://git.ryujinx.app/ryubing/ryujinx arch = x86_64 license = MIT @@ -15,11 +15,7 @@ pkgbase = ryujinx depends = wayland options = !strip options = !debug - source = ryujinx-1.2.86.tar.gz::https://git.ryujinx.app/ryubing/ryujinx/-/archive/1.2.86/ryujinx-1.2.86.tar.gz - source = PKGBUILD.common - source = PKGBUILD.release - sha256sums = SKIP - sha256sums = SKIP + source = ryujinx-1.2.86-7664f8c.tar.gz::https://git.ryujinx.app/ryubing/ryujinx/-/archive/7664f8cde9f8fe7ed0347e098086e1227aef8bdc/ryujinx-7664f8cde9f8fe7ed0347e098086e1227aef8bdc.tar.gz sha256sums = SKIP pkgname = ryujinx diff --git a/.nvchecker.toml b/.nvchecker.toml deleted file mode 100644 index b7b13519d523..000000000000 --- a/.nvchecker.toml +++ /dev/null @@ -1,4 +0,0 @@ -[ryujinx] -source = "git" -git = "https://github.com/Ryubing/Ryujinx.git" -exclude_regex = '^[A-Za-z].*' diff --git a/PKGBUILD b/PKGBUILD index 1f9747d0eccf..144e1e20ba00 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,33 +1,91 @@ # Maintainer: ## options -if [[ (-z "$_srcinfo" && -z "$_pkgver") ]]; then - : ${_autoupdate:=true} -fi - #: ${_dotnet_type=-bin} : ${_install_path:=usr/lib} +: ${_commit=7664f8cde9f8fe7ed0347e098086e1227aef8bdc} + _pkgname="ryujinx" pkgname="$_pkgname" pkgver=1.2.86 -pkgrel=1 +pkgrel=2 pkgdesc="Experimental Nintendo Switch Emulator written in C#" url="https://git.ryujinx.app/ryubing/ryujinx" license=('MIT') arch=('x86_64') -source PKGBUILD.common -source PKGBUILD.release - -_update_version -_source_ryujinx - -source+=( - PKGBUILD.common - PKGBUILD.release +depends=( + 'alsa-lib' + 'fontconfig' + 'jack' + 'libpulse' + 'libx11' + 'wayland' ) -sha256sums+=( - 'SKIP' - 'SKIP' +makedepends=( + "dotnet-sdk${_dotnet_type:-}" + 'desktop-file-utils' ) + +options=('!strip' '!debug') + +_pkgsrc="$_pkgname-$_commit" +_pkgext="tar.gz" +source=("$_pkgname-$pkgver-${_commit::7}.$_pkgext"::"$url/-/archive/$_commit/$_pkgname-$_commit.$_pkgext") +sha256sums=('SKIP') + +build() ( + export HOME="$SRCDEST/nuget-home" + export DOTNET_CLI_TELEMETRY_OPTOUT=1 + + local _args=( + -c Release + -r linux-x64 + --disable-build-servers + --nologo + --self-contained true + -p:DebugType=none + -p:ExtraDefineConstants=DISABLE_UPDATER + -p:PublishSingleFile=true + -p:Version="${pkgver%%.[A-Za-z]*}" + ) + + echo "Building AVA Interface..." + dotnet publish "${_args[@]}" -o publish_ava "$_pkgsrc/src/Ryujinx" + + 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/" + + # symlinks + install -dm755 "$pkgdir/usr/bin" + ln -s "/$_install_path/ryujinx/Ryujinx" "$pkgdir/usr/bin/ryujinx" + + # .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.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" +} diff --git a/PKGBUILD.common b/PKGBUILD.common deleted file mode 100644 index cb802fda2b4f..000000000000 --- a/PKGBUILD.common +++ /dev/null @@ -1,73 +0,0 @@ -depends=( - 'alsa-lib' - 'fontconfig' - 'jack' - 'libpulse' - 'libx11' - 'wayland' -) -makedepends=( - "dotnet-sdk${_dotnet_type:-}" - 'desktop-file-utils' -) - -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 - --disable-build-servers - --nologo - --self-contained true - -p:DebugType=none - -p:ExtraDefineConstants=DISABLE_UPDATER - -p:PublishSingleFile=true - -p:Version="${pkgver%%.[A-Za-z]*}" - ) - - echo "Building AVA Interface..." - dotnet publish "${_args[@]}" -o publish_ava "$_pkgsrc/src/Ryujinx" - - 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/" - - # symlinks - install -dm755 "$pkgdir/usr/bin" - ln -s "/$_install_path/ryujinx/Ryujinx" "$pkgdir/usr/bin/ryujinx" - - # .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.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" -} diff --git a/PKGBUILD.release b/PKGBUILD.release deleted file mode 100644 index 54a5b5b8016b..000000000000 --- a/PKGBUILD.release +++ /dev/null @@ -1,28 +0,0 @@ -_source_ryujinx() { - _pkgsrc="${_pkgname}-$_pkgver" - _pkgext="tar.gz" - source=("${_pkgsrc,,}.$_pkgext"::"$url/-/archive/${_tag:-$_pkgver}/$_pkgsrc.$_pkgext") - sha256sums=('SKIP') -} - -_update_version() { - : ${_pkgver:=$pkgver} - - if [[ "${_autoupdate::1}" != "t" ]]; then - return - fi - - local _response _pkgver_new - _response=$(curl -Ssf -L --max-redirs 3 "$url/-/releases.atom") - _tag=$( - printf '%s' "$_response" \ - | grep -E '/releases/([0-9\.]+)"' \ - | sed -E 's&^.*/releases/([0-9\.]+)".*$&\1&' \ - | sort -rV | head -1 - ) - _pkgver_new="${_tag:?}" - - if [ "$_pkgver" != "${_pkgver_new:?}" ]; then - _pkgver="${_pkgver_new:?}" - fi -}