1.2.76-2; add git support

This commit is contained in:
xiota 2024-12-05 16:32:25 +00:00
parent 3d5e242abf
commit 3241dbc00e
5 changed files with 40 additions and 11 deletions

View file

@ -14,10 +14,12 @@ pkgbase = ryujinx
source = ryujinx-1.2.76.tar.gz::https://github.com/GreemDev/Ryujinx/archive/refs/tags/1.2.76.tar.gz
source = PKGBUILD.canary
source = PKGBUILD.common
source = PKGBUILD.git
source = PKGBUILD.release
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
sha256sums = SKIP
pkgname = ryujinx

View file

@ -5,11 +5,14 @@ if [[ (-z "$_srcinfo" && -z "$_pkgver") ]]; then
: ${_autoupdate:=true}
fi
: ${_install_path:=usr/lib}
: ${_build_git:=false}
: ${_canary:=false}
: ${_install_path:=usr/lib}
: ${startdir:=.}
_pkgname="ryujinx"
pkgname="$_pkgname"
pkgver=1.2.76
pkgrel=2
pkgdesc="Experimental Nintendo Switch Emulator written in C#"
@ -17,25 +20,29 @@ url="https://github.com/GreemDev/Ryujinx"
license=('MIT')
arch=('x86_64')
if [[ "${_canary::1}" == "t" ]]; then
source "$startdir"/PKGBUILD.common
if [[ "${_build_git::1}" == "t" ]]; then
source "$startdir"/PKGBUILD.git
elif [[ "${_canary::1}" == "t" ]]; then
_autoupdate=true
source "$startdir"/PKGBUILD.canary
else
source "$startdir"/PKGBUILD.release
fi
source "$startdir"/PKGBUILD.common
_update_version
_source_ryujinx
source+=(
PKGBUILD.canary
PKGBUILD.common
PKGBUILD.git
PKGBUILD.release
)
sha256sums+=(
'SKIP'
'SKIP'
'SKIP'
'SKIP'
)

View file

@ -1,9 +1,7 @@
pkgname="$_pkgname-canary"
_source_ryujinx() {
_pkgsrc="${_pkgname^}-Canary-$_pkgver"
_pkgsrc="${_pkgname^}-Canary-${_pkgver%.Canary}"
_pkgext="tar.gz"
source=("${_pkgsrc,,}.$_pkgext"::"$url/archive/refs/tags/${_tag:-$_pkgver}.$_pkgext")
source=("${_pkgsrc,,}.$_pkgext"::"$url/archive/refs/tags/$_tag.$_pkgext")
sha256sums=('SKIP')
}
@ -22,7 +20,7 @@ _update_version() {
| sed -E 's&^.*/tag/(Canary-[0-9\.]+)".*$&\1&' \
| sort -rV | head -1
)
_pkgver_new="${_tag#Canary-}"
_pkgver_new="${_tag#Canary-}.Canary"
if [ "$_pkgver" != "${_pkgver_new:?}" ]; then
_pkgver="${_pkgver_new:?}"

24
PKGBUILD.git Normal file
View file

@ -0,0 +1,24 @@
makedepends+=('git')
_source_ryujinx() {
provides=("$_pkgname")
conflicts=("$_pkgname")
_pkgsrc="$_pkgname"
source=("$_pkgsrc"::"git+$url.git")
sha256sums=('SKIP')
}
pkgver() {
cd "$_pkgsrc"
local _tag _version _revision _hash
_tag=$(git tag -l '[0-9]*' | grep -Ev '[a-z][a-z]' | sort -rV | head -1)
_version="${_tag:?}"
_revision=$(git rev-list --count --cherry-pick "$_tag"...HEAD)
_hash=$(git rev-parse --short=7 HEAD)
printf '%s.r%s.g%s' "${_version:?}" "${_revision:?}" "${_hash:?}"
}
_update_version() {
:
}

View file

@ -1,5 +1,3 @@
pkgname="$_pkgname"
_source_ryujinx() {
_pkgsrc="${_pkgname^}-$_pkgver"
_pkgext="tar.gz"