sharpemu-bin: add package (0.0.2_beta.4-1)

This commit is contained in:
Felitendo committed 2026-07-22 06:53:10 +02:00
1 parent db74a6b65a
commit 8b3302d335
4 files changed
+95

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
pkgbase = sharpemu-bin
pkgdesc = Experimental PlayStation 5 emulator (prebuilt)
pkgver = 0.0.2_beta.4
pkgrel = 1
url = https://github.com/sharpemu/sharpemu
arch = x86_64
license = GPL-2.0-or-later
depends = glibc
depends = gcc-libs
depends = icu
depends = openssl
depends = vulkan-icd-loader
depends = libx11
depends = libxcursor
depends = libxi
depends = libxinerama
depends = libxrandr
depends = libxkbcommon
depends = wayland
provides = sharpemu
conflicts = sharpemu
noextract = sharpemu-0.0.2-beta.4-linux-x64.tar.gz
options = !strip
source_x86_64 = https://github.com/sharpemu/sharpemu/releases/download/v0.0.2-beta.4/sharpemu-0.0.2-beta.4-linux-x64.tar.gz
sha256sums_x86_64 = 0818d2980e21692520043dd5f88cfc74d841e31126ac4b2a05d15f0d8e52b9cc
pkgname = sharpemu-bin
+39
View File
@@ -0,0 +1,39 @@
# Maintainer: Felitendo
# This PKGBUILD is updated automatically:
# https://github.com/Felitendo/PKGBUILDS
pkgname=sharpemu-bin
pkgver=0.0.2_beta.4
pkgrel=1
pkgdesc="Experimental PlayStation 5 emulator (prebuilt)"
arch=('x86_64')
url="https://github.com/sharpemu/sharpemu"
license=('GPL-2.0-or-later')
# The self-contained .NET binary bundles its own libglfw.so.3, which in turn
# dlopens the X11/Wayland client libraries at runtime.
depends=('glibc' 'gcc-libs' 'icu' 'openssl' 'vulkan-icd-loader'
'libx11' 'libxcursor' 'libxi' 'libxinerama' 'libxrandr'
'libxkbcommon' 'wayland')
provides=('sharpemu')
conflicts=('sharpemu')
options=('!strip')
# upstream tags use hyphens (v0.0.2-beta.4), which pkgver must not contain
_upver="${pkgver//_/-}"
noextract=("sharpemu-${_upver}-linux-x64.tar.gz")
source_x86_64=("https://github.com/sharpemu/sharpemu/releases/download/v${_upver}/sharpemu-${_upver}-linux-x64.tar.gz")
sha256sums_x86_64=('0818d2980e21692520043dd5f88cfc74d841e31126ac4b2a05d15f0d8e52b9cc')
package() {
# extracted straight into pkgdir so new files in future upstream archives
# are picked up automatically
install -d "$pkgdir/opt/$pkgname"
tar -xzf "$srcdir/sharpemu-${_upver}-linux-x64.tar.gz" -C "$pkgdir/opt/$pkgname"
chmod 755 "$pkgdir/opt/$pkgname/SharpEmu"
install -d "$pkgdir/usr/bin"
ln -s "/opt/$pkgname/SharpEmu" "$pkgdir/usr/bin/sharpemu"
install -Dm644 "$pkgdir/opt/$pkgname/LICENSE.txt" \
"$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
}
+28
View File
@@ -0,0 +1,28 @@
# sharpemu-bin - SharpEmu (https://github.com/sharpemu/sharpemu), an
# experimental PlayStation 5 emulator written in C#.
#
# Upstream publishes prebuilt linux-x64 release assets itself, so there is no
# build_artifact() here: on a new version only pkgver and the checksums are
# refreshed and the result is pushed to the AUR.
#
# Upstream versions contain hyphens (v0.0.2-beta.4), which an Arch pkgver
# must not; latest_version therefore reports the underscored form
# (0.0.2_beta.4) and the PKGBUILD derives the upstream form back via _upver.
UPSTREAM_REPO="sharpemu/sharpemu"
latest_version() {
# gh instead of plain curl: authenticated API calls, so shared-IP rate
# limits on the CI runners can't bite.
gh api "repos/$UPSTREAM_REPO/releases/latest" --jq '.tag_name' \
| sed -e 's/^v//' -e 's/-/_/g'
}
# refresh_checksums <version> <pkgbuild-path>
refresh_checksums() {
local ver="$1" pkgbuild="$2"
local upver="${ver//_/-}" sha
sha="$(curl -sfL "https://github.com/$UPSTREAM_REPO/releases/download/v$upver/sharpemu-$upver-linux-x64.tar.gz" \
| sha256sum | cut -d' ' -f1)"
sed -i "s|^sha256sums_x86_64=.*|sha256sums_x86_64=('$sha')|" "$pkgbuild"
}