summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorxiota2024-02-10 17:33:03 -0800
committerxiota2024-02-10 17:48:47 -0800
commitd2aa50bc08dd7721c5bee8ca67a864cd35cb766e (patch)
tree344be698462802573fbfe59f48c0743869bdffef
parent5ede026ee6381f933c1b1109ddb9b381d6c9876a (diff)
downloadaur-d2aa50bc08dd7721c5bee8ca67a864cd35cb766e.tar.gz
2777.20240211.1f707b0
-rw-r--r--.SRCINFO54
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD184
3 files changed, 186 insertions, 56 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 36a6ecdedbaf..20c01a40763e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,31 +1,33 @@
pkgbase = citra-canary-bin
- pkgdesc = An experimental open-source Nintendo 3DS emulator/debugger
- pkgver = 2485_20230516_391fbec
+ pkgdesc = Nintendo 3DS emulator - additional features still under review
+ pkgver = 2777.20240211.1f707b0
pkgrel = 1
- url = https://citra-emu.org
+ url = https://github.com/citra-emu/citra-canary
arch = x86_64
- license = GPL2
- source = https://github.com/citra-emu/citra-canary/releases/download/canary-2485/citra-linux-20230516-391fbec.tar.xz
- source = https://raw.githubusercontent.com/citra-emu/citra/master/dist/citra.desktop
- sha256sums = d4efc831b46fe46737cee5f22564702bf0e7c5e68a2fcc0ebf6153e002f8c977
- sha256sums = 427e450b7f54c1a764eb96d109b45e67cbc8003bdca379cef7df7652ed539526
-
-pkgname = citra-canary-bin
- depends = ffmpeg-compat-57
- depends = libsndio-61-compat
- depends = sdl2
+ license = GPL-2.0-or-later
+ provides = citra
+ provides = citra-qt
+ conflicts = citra
+ conflicts = citra-qt
conflicts = citra-git
- conflicts = citra-nightly-bin
- conflicts = citra-bin
-
-pkgname = citra-qt-canary-bin
- depends = ffmpeg-compat-57
- depends = qt5-multimedia
- depends = libsndio-61-compat
- depends = sdl2
- depends = desktop-file-utils
- optdepends = libxkbcommon-x11: for X11 support
- optdepends = qt5-wayland: for Wayland support
conflicts = citra-qt-git
- conflicts = citra-qt-nightly-bin
- conflicts = citra-qt
+ options = !strip
+ options = !debug
+ source = citra-canary-20240211-1f707b0.tar.gz::https://github.com/citra-emu/citra-canary/releases/download/canary-2777/citra-linux-appimage-20240211-1f707b0.tar.gz
+ sha256sums = SKIP
+
+pkgname = citra-canary-bin
+ depends = alsa-lib
+ depends = e2fsprogs
+ depends = fontconfig
+ depends = freetype2
+ depends = harfbuzz
+ depends = libdrm
+ depends = libglvnd
+ depends = libgpg-error
+ depends = libice
+ depends = libsm
+ depends = libx11
+ depends = libxcb
+ depends = mesa
+ depends = zlib
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..018a3de08144
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*
+!PKGBUILD
+!.SRCINFO
+!.gitignore
diff --git a/PKGBUILD b/PKGBUILD
index 27fedd0122d3..d971dceff437 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,43 +1,167 @@
-# Maintainer: Mendel Greenberg <mendel at chabad360 dot me>
+# Maintainer:
+# Contributor: Mendel Greenberg <mendel at chabad360 dot me>
-pkgbase='citra-canary-bin'
-pkgname=('citra-canary-bin' 'citra-qt-canary-bin')
+# options
+if [ -n "$_srcinfo" ] || [ -n "$_pkgver" ] ; then
+ : ${_autoupdate:=false}
+else
+ : ${_autoupdate:=true}
+fi
+
+: ${_build_channel:=canary} # nightly or canary
+
+# basic info
+_pkgname="citra-${_build_channel:?}"
+pkgname="$_pkgname-bin"
pkgrel=1
-pkgver=2485_20230516_391fbec
-pkgdesc="An experimental open-source Nintendo 3DS emulator/debugger"
-license=('GPL2')
+pkgver=2777.20240211.1f707b0
+pkgdesc="Nintendo 3DS emulator"
+license=('GPL-2.0-or-later')
arch=('x86_64')
-url="https://citra-emu.org"
-_canary_id=$(echo $pkgver | cut -d'_' -f1)
-_ref="$(echo $pkgver | cut -d'_' -f2)-$(echo $pkgver | cut -d'_' -f3)"
+case "$_build_channel" in
+ canary)
+ url="https://github.com/citra-emu/citra-canary"
+ pkgdesc+=" - additional features still under review"
+ ;;
+ nightly)
+ url="https://github.com/citra-emu/citra-nightly"
+ pkgdesc+=" - reviewed and tested features"
+ ;;
+ *)
+ echo "Invalid release channel: ${_build_channel}"
+ return 1
+ ;;
+esac
+
+# main package
+_main_package() {
+ _update_version
-source=("https://github.com/citra-emu/citra-canary/releases/download/canary-$_canary_id/citra-linux-$_ref.tar.xz"
- "https://raw.githubusercontent.com/citra-emu/citra/master/dist/citra.desktop")
+ provides=(
+ 'citra'
+ 'citra-qt'
+ )
+ conflicts=(
+ 'citra'
+ 'citra-qt'
-sha256sums=('d4efc831b46fe46737cee5f22564702bf0e7c5e68a2fcc0ebf6153e002f8c977'
- '427e450b7f54c1a764eb96d109b45e67cbc8003bdca379cef7df7652ed539526')
+ 'citra-git'
+ 'citra-qt-git'
+ )
-package_citra-canary-bin() {
- depends=('ffmpeg-compat-57' 'libsndio-61-compat' 'sdl2')
- conflicts=('citra-git' 'citra-nightly-bin' 'citra-bin')
+ options=(!strip !debug)
+
+ local _version=${_pkgver%%.*}
+ local _date=$(echo "$_pkgver" | cut -d'.' -f2)
+ local _hash=${_pkgver##*.}
+
+ _pkgsrc="citra-linux-appimage-$_date-$_hash"
+ _pkgext="tar.gz"
+ source+=("$_pkgname-$_date-$_hash.$_pkgext"::"$url/releases/download/${_build_channel:?}-$_version/$_pkgsrc.$_pkgext")
+ sha256sums+=('SKIP')
+}
- cd "${srcdir}/citra-linux-${_ref}"
- install -Dm755 -t "${pkgdir}/usr/bin" citra
- install -Dm755 -t "${pkgdir}/usr/bin" citra-room
+# common functions
+pkgver() {
+ printf '%s' "${_pkgver:?}"
}
-package_citra-qt-canary-bin() {
- depends=('ffmpeg-compat-57' 'qt5-multimedia' 'libsndio-61-compat' 'sdl2' 'desktop-file-utils')
- optdepends=('libxkbcommon-x11: for X11 support'
- 'qt5-wayland: for Wayland support')
- conflicts=('citra-qt-git' 'citra-qt-nightly-bin' 'citra-qt')
+prepare() {
+ local _app
+ for _app in citra-qt citra-room citra ; do
+ local _appimage="$_pkgsrc/$_app.AppImage"
+ chmod +x "$_appimage"
+ "$_appimage" --appimage-extract
+ done
+}
+
+package() {
+ depends+=(
+ alsa-lib
+ e2fsprogs
+ fontconfig
+ freetype2
+ harfbuzz
+ libdrm
+ libglvnd
+ libgpg-error
+ libice
+ libsm
+ libx11
+ libxcb
+ mesa
+ zlib
+ )
+
+ install -dm755 "$pkgdir/opt/citra"
+ install -dm755 "$pkgdir/usr/bin"
+ install -dm755 "$pkgdir/usr/share/applications/"
+
+ # symlinks
+ local _app
+ for _app in citra-qt citra-room citra ; do
+ ln -sf "/opt/citra/bin/$_app" "$pkgdir/usr/bin/$_app"
+ done
+
+ # desktop file
+ mv "squashfs-root/usr/share/applications/citra-qt.desktop" "$pkgdir/usr/share/applications/"
- cd "${srcdir}/citra-linux-${_ref}"
- install -Dm755 -t "${pkgdir}/usr/bin" citra-qt
- install -Dm755 -t "${pkgdir}/usr/bin" citra-room
- install -Dm644 -t "${pkgdir}/usr/share/pixmaps" "dist/citra.png"
+ # icon
+ install -Dm644 "squashfs-root/usr/share/icons/hicolor/scalable/apps/citra.svg" -t "$pkgdir/usr/share/pixmaps/"
- cd "${srcdir}"
- install -Dm644 -t "${pkgdir}/usr/share/applications" "citra.desktop"
+ # move main files
+ mv "squashfs-root/usr"/{bin,lib,plugins,translations} "$pkgdir/opt/citra/"
+
+ # fix permissions
+ chmod -R u=rwX,go=rX "$pkgdir"
+}
+
+# update version
+_update_version() {
+ : ${_pkgver:=${pkgver%%.r*}}
+
+ if [[ "${_autoupdate::1}" != "t" ]] ; then
+ return
+ fi
+
+ local _response=$(curl -Ssf "$url/releases")
+ local _regex='<a href="(.*/'"${_build_channel:?}"'-([0-9]+)/(citra-linux-appimage-([0-9]+)-(.*)\.tar\.gz))"'
+
+ local _dl_path=$(
+ printf '%s' "$_response" \
+ | grep -Eio "$_regex" \
+ | sed -E "s&$_regex&\1&"
+ )
+ local _filename=$(
+ printf '%s' "$_response" \
+ | grep -Eio "$_regex" \
+ | sed -E "s&$_regex&\3&"
+ )
+
+ local _version=$(
+ printf '%s' "$_response" \
+ | grep -Eio "$_regex" \
+ | sed -E "s&$_regex&\2&"
+ )
+ local _date=$(
+ printf '%s' "$_response" \
+ | grep -Eio "$_regex" \
+ | sed -E "s&$_regex&\4&"
+ )
+ local _hash=$(
+ printf '%s' "$_response" \
+ | grep -Eio "$_regex" \
+ | sed -E "s&$_regex&\5&"
+ )
+
+ local _pkgver_new=$(printf '%s.%s.%s' "$_version" "$_date" "$_hash")
+
+ # update _pkgver
+ if [ "$_pkgver" != "${_pkgver_new:?}" ] ; then
+ _pkgver="${_pkgver_new:?}"
+ fi
}
+
+# execute
+_main_package