Update PKGBUILD to dynamically adjust pkgver, conform to shellcheck standards

This commit is contained in:
deadcade 2023-01-16 19:34:11 +01:00
parent a885784e12
commit 853bcb1046
2 changed files with 26 additions and 21 deletions

View file

@ -1,6 +1,6 @@
pkgbase = yuzu-early-access pkgbase = yuzu-early-access
pkgdesc = An experimental open-source Nintendo Switch emulator/debugger (early access version) pkgdesc = An experimental open-source Nintendo Switch emulator/debugger (early access version)
pkgver = 3308 pkgver = 3310
pkgrel = 1 pkgrel = 1
url = https://yuzu-emu.org/ url = https://yuzu-emu.org/
arch = i686 arch = i686
@ -21,6 +21,7 @@ pkgbase = yuzu-early-access
makedepends = qt5-tools makedepends = qt5-tools
makedepends = desktop-file-utils makedepends = desktop-file-utils
makedepends = robin-map makedepends = robin-map
makedepends = jq
depends = boost-libs depends = boost-libs
depends = shared-mime-info depends = shared-mime-info
depends = hicolor-icon-theme depends = hicolor-icon-theme
@ -41,11 +42,11 @@ pkgbase = yuzu-early-access
optdepends = qt5-wayland: for Wayland support optdepends = qt5-wayland: for Wayland support
provides = yuzu provides = yuzu
conflicts = yuzu conflicts = yuzu
source = https://github.com/pineappleEA/pineapple-src/archive/EA-3308.tar.gz source = https://github.com/pineappleEA/pineapple-src/archive/EA-3310.tar.gz
source = https://github.com/pineappleEA/pineapple-src/releases/download/EA-3310/Windows-Yuzu-EA-3310.zip
source = https://raw.githubusercontent.com/pineappleEA/Pineapple-Linux/master/yuzu.xml source = https://raw.githubusercontent.com/pineappleEA/Pineapple-Linux/master/yuzu.xml
source = https://github.com/pineappleEA/pineapple-src/releases/download/EA-3308/Windows-Yuzu-EA-3308.zip sha256sums = SKIP
sha256sums = 2fccac38b14450c69cd681de6d9c927d229877c3b8f11ec3e8c0f20647641f59 sha256sums = SKIP
sha256sums = e76ab2b3566d8135930e570ede5bed3da8f131270b60db818e453d248880bdf2
sha256sums = 99b593b80efd8ef237b08648099345f6f55d472dd55f44bbf3430fb4857274de sha256sums = 99b593b80efd8ef237b08648099345f6f55d472dd55f44bbf3430fb4857274de
pkgname = yuzu-early-access pkgname = yuzu-early-access

View file

@ -1,32 +1,35 @@
# Maintainer: 0xDEADCADE <$(base64 -d<<<MHhkZWFkY2FkZUBwcm90b25tYWlsLmNvbQ==)> # Maintainer: 0xDEADCADE <$(base64 -d<<<MHhkZWFkY2FkZUBwcm90b25tYWlsLmNvbQ==)>
# shellcheck disable=SC2148,SC2034,SC2154
_pkgname=yuzu _pkgname=yuzu
pkgname=$_pkgname-early-access pkgname=$_pkgname-early-access
pkgver=3308 _repo="pineappleEA/pineapple-src"
_releases_gh=$(curl https://api.github.com/repos/${_repo}/releases)
pkgver=$(echo "$_releases_gh" | jq -r .[0].tag_name | cut -d "-" -f 2)
pkgrel=1 pkgrel=1
pkgdesc="An experimental open-source Nintendo Switch emulator/debugger (early access version)" pkgdesc="An experimental open-source Nintendo Switch emulator/debugger (early access version)"
arch=('i686' 'x86_64') arch=('i686' 'x86_64')
url="https://yuzu-emu.org/" url="https://yuzu-emu.org/"
license=('GPL2') license=('GPL2')
depends=('boost-libs' 'shared-mime-info' 'hicolor-icon-theme' 'sdl2' 'qt5-base' 'qt5-multimedia' 'qt5-webengine' 'libxkbcommon-x11' 'ffmpeg' 'fmt' 'libzip' 'opus' 'libfdk-aac' 'lz4' 'mbedtls' 'openssl' 'zstd') depends=('boost-libs' 'shared-mime-info' 'hicolor-icon-theme' 'sdl2' 'qt5-base' 'qt5-multimedia' 'qt5-webengine' 'libxkbcommon-x11' 'ffmpeg' 'fmt' 'libzip' 'opus' 'libfdk-aac' 'lz4' 'mbedtls' 'openssl' 'zstd')
makedepends=('llvm' 'git' 'glslang' 'cmake' 'ninja' 'graphviz' 'doxygen' 'clang' 'boost' 'catch2' 'nlohmann-json' 'rapidjson' 'qt5-tools' 'desktop-file-utils' 'robin-map') makedepends=('llvm' 'git' 'glslang' 'cmake' 'ninja' 'graphviz' 'doxygen' 'clang' 'boost' 'catch2' 'nlohmann-json' 'rapidjson' 'qt5-tools' 'desktop-file-utils' 'robin-map' 'jq')
optdepends=('qt5-wayland: for Wayland support') optdepends=('qt5-wayland: for Wayland support')
provides=('yuzu') provides=('yuzu')
conflicts=('yuzu') conflicts=('yuzu')
source=("https://github.com/pineappleEA/pineapple-src/archive/EA-${pkgver}.tar.gz" source=("https://github.com/pineappleEA/pineapple-src/archive/EA-${pkgver}.tar.gz"
"https://raw.githubusercontent.com/pineappleEA/Pineapple-Linux/master/yuzu.xml" "https://github.com/pineappleEA/pineapple-src/releases/download/EA-${pkgver}/Windows-Yuzu-EA-${pkgver}.zip"
"https://github.com/pineappleEA/pineapple-src/releases/download/EA-${pkgver}/Windows-Yuzu-EA-${pkgver}.zip") "https://raw.githubusercontent.com/pineappleEA/Pineapple-Linux/master/yuzu.xml")
sha256sums=('2fccac38b14450c69cd681de6d9c927d229877c3b8f11ec3e8c0f20647641f59' sha256sums=('SKIP'
'e76ab2b3566d8135930e570ede5bed3da8f131270b60db818e453d248880bdf2' 'SKIP'
'99b593b80efd8ef237b08648099345f6f55d472dd55f44bbf3430fb4857274de') '99b593b80efd8ef237b08648099345f6f55d472dd55f44bbf3430fb4857274de')
prepare() { prepare() {
cd "$srcdir/yuzu-windows-msvc-early-access" cd "$srcdir/yuzu-windows-msvc-early-access" || exit
tar -xvf *.tar.xz tar -xvf -- *.tar.xz
cd $(ls *.tar.xz | sed -e 's/.tar.xz//') cd "$(find ./ -name "*.tar.xz" | sed -e 's/.tar.xz//')" || exit
cp -R .git* $srcdir/pineapple-src-EA-${pkgver}/ cp -R .git* "$srcdir/pineapple-src-EA-${pkgver}/"
cd "$srcdir/pineapple-src-EA-${pkgver}" cd "$srcdir/pineapple-src-EA-${pkgver}" || exit
for i in $(git config --file .gitmodules --get-regexp path | awk '{ print $2 }') ; do for i in $(git config --file .gitmodules --get-regexp path | awk '{ print $2 }') ; do
rm -rf "$i" rm -rf "$i"
done done
@ -37,17 +40,18 @@ prepare() {
find . -name "CMakeLists.txt" -exec sed -i 's/^.*-Werror=.*$/ /g' {} + find . -name "CMakeLists.txt" -exec sed -i 's/^.*-Werror=.*$/ /g' {} +
find . -name "CMakeLists.txt" -exec sed -i 's/-Werror/-W/g' {} + find . -name "CMakeLists.txt" -exec sed -i 's/-Werror/-W/g' {} +
sed -i -e 's/--quiet //g' src/video_core/host_shaders/CMakeLists.txt sed -i -e 's/--quiet //g' src/video_core/host_shaders/CMakeLists.txt
# shellcheck disable=SC2016
sed -i -e 's#${SPIRV_HEADER_FILE} ${SOURCE_FILE}#${SPIRV_HEADER_FILE} ${SOURCE_FILE} 2>/dev/null#g' src/video_core/host_shaders/CMakeLists.txt sed -i -e 's#${SPIRV_HEADER_FILE} ${SOURCE_FILE}#${SPIRV_HEADER_FILE} ${SOURCE_FILE} 2>/dev/null#g' src/video_core/host_shaders/CMakeLists.txt
sed -i -e '/Name=yuzu/ s/$/ Early Access/' dist/yuzu.desktop sed -i -e '/Name=yuzu/ s/$/ Early Access/' dist/yuzu.desktop
sed -i -e '/yuzu %f/a StartupWMClass=yuzu' dist/yuzu.desktop sed -i -e '/yuzu %f/a StartupWMClass=yuzu' dist/yuzu.desktop
sed -i -e 's_^MimeType=.*_&application/x-nx-nsp;application/x-nx-xci;_' dist/yuzu.desktop sed -i -e 's_^MimeType=.*_&application/x-nx-nsp;application/x-nx-xci;_' dist/yuzu.desktop
sed -i -e 's| (%2)||' src/yuzu/aboutdialog.ui sed -i -e 's| (%2)||' src/yuzu/aboutdialog.ui
cp -f $srcdir/yuzu.xml dist/yuzu.xml cp -f "$srcdir/yuzu.xml" "dist/yuzu.xml"
} }
build() { build() {
cd "$srcdir/pineapple-src-EA-${pkgver}" cd "$srcdir/pineapple-src-EA-${pkgver}" || exit
mkdir -p build && cd build mkdir -p build && cd build || exit
cmake .. -GNinja \ cmake .. -GNinja \
-DCMAKE_CXX_COMPILER=clang++ \ -DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang \ -DCMAKE_C_COMPILER=clang \
@ -75,8 +79,8 @@ build() {
} }
package() { package() {
cd "$srcdir/pineapple-src-EA-${pkgver}/build" cd "$srcdir/pineapple-src-EA-${pkgver}/build" || exit
DESTDIR="$pkgdir" ninja install DESTDIR="$pkgdir" ninja install
rm -rf $pkgdir/usr/lib $pkgdir/usr/include rm -rf "$pkgdir/usr/lib" "$pkgdir/usr/include"
} }