diff options
author | xiota | 2023-12-28 07:02:26 -0800 |
---|---|---|
committer | xiota | 2023-12-28 07:02:26 -0800 |
commit | 03225e4fa6352ea9e17b15ce2da364958ce4cb9b (patch) | |
tree | 622c3c4ed979bbecac53c5c5de99ea9afb4f445b | |
parent | 44438fd9874cca9b0751569d9ea31d2a6adbfc1b (diff) | |
download | aur-03225e4fa6352ea9e17b15ce2da364958ce4cb9b.tar.gz |
2062.20231226.602f4f6
-rw-r--r-- | .SRCINFO | 44 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 183 | ||||
-rwxr-xr-x | citra-qt.bash | 3 | ||||
-rwxr-xr-x | citra.bash | 3 |
5 files changed, 152 insertions, 85 deletions
@@ -1,36 +1,20 @@ pkgbase = citra-nightly-bin - pkgdesc = An experimental open-source Nintendo 3DS emulator/debugger - pkgver = 1330_20190812_2f0ea48 - pkgrel = 7 - url = https://github.com/citra-emu/citra-nightly/ + pkgdesc = Nintendo 3DS emulator + pkgver = 2062.20231226.602f4f6 + pkgrel = 1 + url = https://github.com/citra-emu/citra-nightly arch = x86_64 - license = GPL + license = GPL-2.0-or-later + makedepends = gendesk provides = citra provides = citra-qt - source = https://github.com/citra-emu/citra-nightly/releases/download/nightly-1330/citra-linux-20190812-2f0ea48.tar.xz - source = https://raw.githubusercontent.com/citra-emu/citra/master/dist/citra.desktop - source = https://raw.githubusercontent.com/citra-emu/citra/master/dist/citra.svg - source = citra.bash - source = citra-qt.bash - sha256sums = 77a1305e96a401d8e2671e36cbfed7e5913e9eb0eba35a17a32ee8651ad80e40 - sha256sums = 93bd8f799877eba7dd87ed7a4c29607d78c42b8769626c1d479f7e34fb7b39e2 - sha256sums = eeab12f3f13f06db7984d361eebcd977ce500b1f73c9bd7ce726712d477e6e14 - sha256sums = 068409ef70c25e8da3f0430c5ff62609d122f2f857525940da8cd792a228a822 - sha256sums = 61bcee69be306b58fd0bdf6327cdfc88260ba9f9d0694cf54e2d720965bc918b + conflicts = citra + conflicts = citra-qt + conflicts = citra-git + conflicts = citra-qt-git + options = !strip + options = !debug + source = citra-linux-appimage-20231226-602f4f6-2062.20231226.602f4f6.tar.gz::https://github.com/citra-emu/citra-nightly/releases/download/nightly-2062/citra-linux-appimage-20231226-602f4f6.tar.gz + sha256sums = SKIP pkgname = citra-nightly-bin - depends = sdl2 - depends = libpng - depends = libpng12 - depends = libcurl-compat - depends = bash - -pkgname = citra-qt-nightly-bin - depends = qt5-base - depends = shared-mime-info - depends = desktop-file-utils - depends = libcurl-compat - depends = bash - optdepends = libxkbcommon-x11: for X11 support - optdepends = qt5-wayland: for Wayland support - diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..018a3de08144 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +* +!PKGBUILD +!.SRCINFO +!.gitignore @@ -1,52 +1,137 @@ -# Maintainer: Tom Bebbington <tophattedcoder@gmail.com> - -_pkgbase='citra' -pkgbase="$_pkgbase-nightly-bin" -pkgname=("$_pkgbase-nightly-bin" "$_pkgbase-qt-nightly-bin") -pkgrel=7 -pkgver=1330_20190812_2f0ea48 -pkgdesc="An experimental open-source Nintendo 3DS emulator/debugger" -provides=('citra' 'citra-qt') -license=('GPL') +# Maintainer: +# Contributor: Tom Bebbington <tophattedcoder@gmail.com> + +# options +if [ -n "$_srcinfo" ] || [ -n "$_pkgver" ] ; then + : ${_autoupdate:=false} +else + : ${_autoupdate:=true} +fi + +# basic info +_pkgname='citra-nightly' +pkgname="$_pkgname-bin" +pkgrel=1 +pkgver=2062.20231226.602f4f6 +pkgdesc="Nintendo 3DS emulator" +url="https://github.com/citra-emu/citra-nightly" +license=('GPL-2.0-or-later') arch=('x86_64') -url="https://github.com/citra-emu/citra-nightly/" -_nightly_id=$(echo $pkgver | cut -d'_' -f1) -_ref="$(echo $pkgver | cut -d'_' -f2)-$(echo $pkgver | cut -d'_' -f3)" - -source=( - "https://github.com/citra-emu/citra-nightly/releases/download/nightly-$_nightly_id/citra-linux-$_ref.tar.xz" - "https://raw.githubusercontent.com/citra-emu/citra/master/dist/citra.desktop" - "https://raw.githubusercontent.com/citra-emu/citra/master/dist/citra.svg" - "citra.bash" - "citra-qt.bash" -) -sha256sums=('77a1305e96a401d8e2671e36cbfed7e5913e9eb0eba35a17a32ee8651ad80e40' - '93bd8f799877eba7dd87ed7a4c29607d78c42b8769626c1d479f7e34fb7b39e2' - 'eeab12f3f13f06db7984d361eebcd977ce500b1f73c9bd7ce726712d477e6e14' - '068409ef70c25e8da3f0430c5ff62609d122f2f857525940da8cd792a228a822' - '61bcee69be306b58fd0bdf6327cdfc88260ba9f9d0694cf54e2d720965bc918b') - -package_citra-nightly-bin() { - depends=('sdl2' 'libpng' 'libpng12' 'libcurl-compat' 'bash') - - mkdir -p "${pkgdir}/usr/bin" - cp $srcdir/citra.bash "${pkgdir}/usr/bin/citra" - cd $srcdir/citra-linux-$_ref - mkdir -p "${pkgdir}/opt/citra" - cp citra "${pkgdir}/opt/citra" + +# main package +_main_package() { + _update_version + + makedepends=( + 'gendesk' + ) + + provides=( + 'citra' + 'citra-qt' + ) + conflicts=( + 'citra' + 'citra-qt' + + 'citra-git' + 'citra-qt-git' + ) + + 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+=("$_pkgsrc-$_pkgver.$_pkgext"::"$url/releases/download/nightly-$_version/$_pkgsrc.$_pkgext") + sha256sums+=('SKIP') +} + +# common functions +pkgver() { + printf '%s' "${_pkgver:?}" +} + +build() { + local _app + for _app in citra-qt citra-room citra ; do + local _appimage="$_pkgsrc/$_app.AppImage" + chmod +x "$_appimage" + "$_appimage" --appimage-extract + done + + rm -rf "squashfs-root/usr/optional" } -package_citra-qt-nightly-bin() { - depends=('qt5-base' 'shared-mime-info' 'desktop-file-utils' 'libcurl-compat' 'bash') - optdepends=('libxkbcommon-x11: for X11 support' - 'qt5-wayland: for Wayland support') - - mkdir -p $pkgdir/usr/bin - cp $srcdir/citra-qt.bash "${pkgdir}/usr/bin/citra-qt" - cd $srcdir/citra-linux-$_ref - mkdir -p $pkgdir/opt/citra - mv citra-qt $pkgdir/opt/citra - mkdir -p $pkgdir/usr/share/applications - cp $srcdir/citra.desktop $pkgdir/usr/share/applications - mkdir -p $pkgdir/usr/share/pixmaps - cp $srcdir/citra.svg $pkgdir/usr/share/pixmaps + +package() { + install -dm755 "$pkgdir/usr/bin" + install -dm755 "$pkgdir/usr/share/applications/" + + local _app + for _app in citra-qt citra-room citra ; do + # symlink + ln -sf "/opt/citra/bin/$_app" "$pkgdir/usr/bin/$_app" + + # desktop file + mv "squashfs-root/$_app.desktop" "$pkgdir/usr/share/applications/" + done + + # icon + install -Dm644 "$_pkgsrc/dist/citra.png" -t "$pkgdir/usr/share/pixmaps/" + + # move main files + install -dm755 "$pkgdir/opt" + mv "$srcdir/squashfs-root/usr" "$pkgdir/opt/citra" +} + +# update version +_update_version() { + : ${_pkgver:=${pkgver%%.r*}} + + if [[ "${_autoupdate::1}" != "t" ]] ; then + return + fi + + local _response=$(curl -Ssf "$url/releases") + local _regex='<a href="(.*/nightly-([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 diff --git a/citra-qt.bash b/citra-qt.bash deleted file mode 100755 index 0c0f7fbfef50..000000000000 --- a/citra-qt.bash +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -env LD_PRELOAD=/usr/lib/libcurl.so.3 /opt/citra/citra-qt "$@"
\ No newline at end of file diff --git a/citra.bash b/citra.bash deleted file mode 100755 index 49780cfdf34e..000000000000 --- a/citra.bash +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -env LD_PRELOAD=/usr/lib/libcurl.so.3 /opt/citra/citra "$@"
\ No newline at end of file |