This commit is contained in:
CrafterPika 2025-04-25 14:28:06 +02:00
commit 95167361f0
Signed by: crafterpika
GPG key ID: B4E0BA4B52B201DC
6 changed files with 180 additions and 0 deletions

View file

@ -0,0 +1,51 @@
# Maintainer: CrafterPika <crafterpika@duck.com>
## basic info
pkgname="ryujinx-canary-bin"
pkgver=1.3.8
_pkgver="$(python3 ./autofetch.py -v)"
pkgrel=1
pkgdesc="Experimental Nintendo Switch Emulator written in C# (GreemDev Fork)"
url="https://github.com/Ryubing/Ryujinx"
license=('MIT')
arch=('x86_64')
depends=('dotnet-runtime')
makedepends=('python')
provides=(ryujinx-bin)
conflicts=(ryujinx ryujinx-git)
options=(!strip !debug !lto)
## Sources
source=("$(python3 ./autofetch.py)"
"https://git.ryujinx.app/ryubing/ryujinx/-/raw/master/distribution/misc/Logo.svg"
"https://git.ryujinx.app/ryubing/ryujinx/-/raw/master/distribution/linux/Ryujinx.desktop"
"https://git.ryujinx.app/ryubing/ryujinx/-/raw/master/distribution/linux/mime/Ryujinx.xml"
"autofetch.py")
b2sums=("SKIP"
"a52abdf5676ce7e6248bbb8eae1cf235816029d87f23be3dc70379f9caa7c4677b234e95b407cac023fa2071efa961f240a14c6faa79052915024363cee92776"
"aaf7e9ddc24bc0068d75a4136262ab2e7f669acda91b7abc66ac5c8d6332804af45b5f9eec43d1d5541dc8e7944001362fbb67bec873fffde496c6c46d6500fc"
"0002cccf2a3e9dec4b0646e8d50ed105dfd4544baf49ae4868cc2a0785839ab578171063b6149b54fee947a38d88bbd6552647f6c69c590acf8fd1b12835c67a"
"ee4b3c28230756380208dcbbe62ec7156b6f2e293205ee8c637740b31cc788db6c2e5202204e28bf508d5f55055487a3b26c835f4134031bb0d270cdcdc2a5d4")
# update pkgver
pkgver() {
echo "${_pkgver:?}"
}
# make package
package() {
mkdir --parents "${pkgdir}/opt"
cp --recursive "${srcdir}/publish" "${pkgdir}/opt/ryujinx"
chmod +x "${pkgdir}/opt/ryujinx/Ryujinx"
# create writable logs directory
install --directory --mode=777 "${pkgdir}/opt/ryujinx/Logs"
mkdir --parents "${pkgdir}/usr/bin"
ln --symbolic "/opt/ryujinx/Ryujinx" "${pkgdir}/usr/bin/Ryujinx"
ln --symbolic "/opt/ryujinx/Ryujinx.sh" "${pkgdir}/usr/bin/Ryujinx.sh"
install -D "${srcdir}/Ryujinx.desktop" "${pkgdir}/usr/share/applications/Ryujinx.desktop"
install -D "${srcdir}/Logo.svg" "${pkgdir}/usr/share/icons/hicolor/scalable/apps/Ryujinx.svg"
install -D "${srcdir}/Ryujinx.xml" "${pkgdir}/usr/share/mime/packages/Ryujinx.xml"
}

View file

@ -0,0 +1,23 @@
# Modules
import json
import re
from argparse import ArgumentParser
from urllib.request import Request, urlopen
parser = ArgumentParser()
parser.add_argument("-v", "--version", dest="ver", action='store_true')
args = parser.parse_args()
def fetch(url: str):
req = Request(url)
req.add_header("User-Agent", "RyujinxLatestFetch/1.0")
return urlopen(req).read()
latest = json.loads(fetch("https://api.github.com/repos/Ryubing/Canary-Releases/releases/latest"))
if not args.ver:
for asset in latest["assets"]:
regex = type(re.search(r"\/(?!sdl2-.*)ryujinx-.*-linux_x64.tar.gz", asset["browser_download_url"]))
if regex == re.Match:
print(asset["browser_download_url"])
else:
print(latest["tag_name"])