initial commit
This commit is contained in:
parent
ee21fa8a6c
commit
8c5deeee76
2 changed files with 72 additions and 0 deletions
49
PKGBUILD
Normal file
49
PKGBUILD
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
# Maintainer: CrafterPika <crafterpika@duck.com>
|
||||||
|
|
||||||
|
## basic info
|
||||||
|
pkgname="ryujinx-canary-bin"
|
||||||
|
pkgver=1.2.30
|
||||||
|
_pkgver="$(python3 ./autofetch.py -v)"
|
||||||
|
pkgrel=1
|
||||||
|
pkgdesc="Experimental Nintendo Switch Emulator written in C# (GreemDev Fork)"
|
||||||
|
url="https://github.com/GreemDev/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://raw.githubusercontent.com/GreemDev/Ryujinx/master/distribution/misc/Logo.svg"
|
||||||
|
"https://raw.githubusercontent.com/GreemDev/Ryujinx/refs/heads/master/distribution/linux/Ryujinx.desktop"
|
||||||
|
"https://raw.githubusercontent.com/GreemDev/Ryujinx/refs/heads/master/distribution/linux/mime/Ryujinx.xml")
|
||||||
|
b2sums=("SKIP"
|
||||||
|
"b09be223a28495aaad61267751d82e1cc4127c041dce69cb38a16941212640c61c60cdcc76ef3dc534f67dd1d45c0f2786ee4cc1de68b73f275d47485e48c5a1"
|
||||||
|
"aaf7e9ddc24bc0068d75a4136262ab2e7f669acda91b7abc66ac5c8d6332804af45b5f9eec43d1d5541dc8e7944001362fbb67bec873fffde496c6c46d6500fc"
|
||||||
|
"0002cccf2a3e9dec4b0646e8d50ed105dfd4544baf49ae4868cc2a0785839ab578171063b6149b54fee947a38d88bbd6552647f6c69c590acf8fd1b12835c67a")
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
}
|
23
autofetch.py
Normal file
23
autofetch.py
Normal 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/GreemDev/Ryujinx-Canary/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"])
|
Loading…
Add table
Reference in a new issue