Group A: source upstream binaries instead of self-built artifacts
The AUR does not allow packages to ship a binary tarball built by the maintainer - a -bin package must repackage a deliverable published by upstream. These six packages now do that: snapx-bin upstream's self-contained Linux tar.zst zapzap-bin upstream's pure-Python wheel faugus-launcher-bin upstream's arch-independent .deb wiiudownloader-bin upstream's AppImage waydroid-helper-bin upstream's AppImage chiaki-ng-bin upstream's AppImage All six drop build_artifact() and switch to refresh_checksums(), so CI no longer builds or hosts anything - it only tracks upstream's assets. Where the asset name carries build metadata that does not follow from pkgver (snapx, faugus-launcher), refresh_checksums() resolves it via the GitHub API and syncs an _asset variable in the PKGBUILD. Dependency lists are re-derived from what the bundles actually resolve outside themselves; the AppImage payloads land in /opt with wrappers in /usr/bin, because their entry points resolve paths relative to argv[0].
This commit is contained in:
1 parent
c25c2790e8
commit
fa1c190d17
19 files changed
+428
-379
No files matched your search
+17
-10
@@ -1,22 +1,29 @@
|
||||
pkgbase = wiiudownloader-bin
|
||||
pkgdesc = Download encrypted Wii U files from Nintendo's official servers (prebuilt)
|
||||
pkgdesc = Download encrypted Wii U files from Nintendo's official servers (upstream AppImage)
|
||||
pkgver = 2.99
|
||||
pkgrel = 1
|
||||
pkgrel = 2
|
||||
url = https://github.com/Xpl0itU/WiiUDownloader
|
||||
arch = x86_64
|
||||
license = GPL-3.0-or-later
|
||||
depends = glibc
|
||||
depends = glib2
|
||||
depends = hicolor-icon-theme
|
||||
depends = libx11
|
||||
depends = gtk3
|
||||
depends = gdk-pixbuf2
|
||||
depends = cairo
|
||||
depends = pango
|
||||
depends = libxcb
|
||||
depends = wayland
|
||||
depends = fontconfig
|
||||
depends = freetype2
|
||||
depends = harfbuzz
|
||||
depends = fribidi
|
||||
depends = zlib
|
||||
depends = bzip2
|
||||
depends = expat
|
||||
depends = libgpg-error
|
||||
depends = hicolor-icon-theme
|
||||
provides = wiiudownloader
|
||||
conflicts = wiiudownloader
|
||||
source = wiiudownloader-bin-2.99-1.tar.zst::https://github.com/Felitendo/PKGBUILDS/releases/download/wiiudownloader-bin-2.99/wiiudownloader-bin-2.99.tar.zst
|
||||
sha256sums = 1a43185b07869b8c25b71c3d43ddd829fd79af9d4cf6bfcfddb201f12cf8ff2e
|
||||
noextract = wiiudownloader-bin-2.99.AppImage
|
||||
options = !strip
|
||||
options = !debug
|
||||
source = wiiudownloader-bin-2.99.AppImage::https://github.com/Xpl0itU/WiiUDownloader/releases/download/v2.99/WiiUDownloader-Linux-x86_64.AppImage
|
||||
sha256sums = 3a2e8e7f34a288308666032d6834db00c515a0c897a66a2ae1012702d017f240
|
||||
|
||||
pkgname = wiiudownloader-bin
|
||||
@@ -4,18 +4,46 @@
|
||||
|
||||
pkgname=wiiudownloader-bin
|
||||
pkgver=2.99
|
||||
pkgrel=1
|
||||
pkgdesc="Download encrypted Wii U files from Nintendo's official servers (prebuilt)"
|
||||
pkgrel=2
|
||||
pkgdesc="Download encrypted Wii U files from Nintendo's official servers (upstream AppImage)"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/Xpl0itU/WiiUDownloader"
|
||||
license=('GPL-3.0-or-later')
|
||||
depends=('glibc' 'glib2' 'hicolor-icon-theme' 'libx11' 'gtk3' 'gdk-pixbuf2'
|
||||
'cairo' 'pango' 'fontconfig')
|
||||
# the AppImage bundles GTK3 and its stack; these are what is left over
|
||||
depends=('glibc' 'libx11' 'libxcb' 'wayland' 'fontconfig' 'freetype2'
|
||||
'harfbuzz' 'fribidi' 'zlib' 'bzip2' 'expat' 'libgpg-error'
|
||||
'hicolor-icon-theme')
|
||||
provides=('wiiudownloader')
|
||||
conflicts=('wiiudownloader')
|
||||
source=("${pkgname}-${pkgver}-${pkgrel}.tar.zst::https://github.com/Felitendo/PKGBUILDS/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.zst")
|
||||
sha256sums=('1a43185b07869b8c25b71c3d43ddd829fd79af9d4cf6bfcfddb201f12cf8ff2e')
|
||||
options=('!strip' '!debug')
|
||||
source=("${pkgname}-${pkgver}.AppImage::${url}/releases/download/v${pkgver}/WiiUDownloader-Linux-x86_64.AppImage")
|
||||
noextract=("${pkgname}-${pkgver}.AppImage")
|
||||
sha256sums=('3a2e8e7f34a288308666032d6834db00c515a0c897a66a2ae1012702d017f240')
|
||||
|
||||
prepare() {
|
||||
chmod +x "$srcdir/${pkgname}-${pkgver}.AppImage"
|
||||
"$srcdir/${pkgname}-${pkgver}.AppImage" --appimage-extract > /dev/null
|
||||
}
|
||||
|
||||
package() {
|
||||
cp -a "$srcdir/usr" "$pkgdir/"
|
||||
# upstream's AppImage payload, installed unchanged
|
||||
install -d "$pkgdir/opt/$pkgname"
|
||||
cp -a "$srcdir/squashfs-root/." "$pkgdir/opt/$pkgname/"
|
||||
rm -f "$pkgdir/opt/$pkgname/.DirIcon"
|
||||
|
||||
# AppRun resolves its own directory, so it has to be exec'd by its real
|
||||
# path - a symlink from /usr/bin would make it look next to the symlink
|
||||
install -d "$pkgdir/usr/bin"
|
||||
cat > "$pkgdir/usr/bin/wiiudownloader" << EOF
|
||||
#!/bin/sh
|
||||
exec /opt/$pkgname/AppRun "\$@"
|
||||
EOF
|
||||
chmod 755 "$pkgdir/usr/bin/wiiudownloader"
|
||||
|
||||
install -Dm644 "$srcdir/squashfs-root/usr/share/icons/hicolor/512x512/apps/WiiUDownloader.png" \
|
||||
"$pkgdir/usr/share/icons/hicolor/512x512/apps/wiiudownloader.png"
|
||||
install -Dm644 "$srcdir/squashfs-root/WiiUDownloader.desktop" \
|
||||
"$pkgdir/usr/share/applications/wiiudownloader.desktop"
|
||||
sed -i -e 's|^Exec=.*|Exec=wiiudownloader|' -e 's|^Icon=.*|Icon=wiiudownloader|' \
|
||||
"$pkgdir/usr/share/applications/wiiudownloader.desktop"
|
||||
}
|
||||
+13
-46
@@ -1,55 +1,22 @@
|
||||
# wiiudownloader-bin - prebuilt package of https://github.com/Xpl0itU/WiiUDownloader
|
||||
# (Go + GTK3 downloader for Wii U titles from Nintendo's official servers).
|
||||
# wiiudownloader-bin - WiiUDownloader
|
||||
# (https://github.com/Xpl0itU/WiiUDownloader), a Go + GTK3 downloader for
|
||||
# Wii U titles from Nintendo's official servers.
|
||||
#
|
||||
# Upstream only ships AppImages, so build_artifact() builds the Go binary
|
||||
# from the release tarball (grabTitles.py generates the title database that
|
||||
# is compiled in).
|
||||
# Upstream publishes an AppImage per release, which the PKGBUILD unpacks and
|
||||
# installs into /opt - so there is no build step here, only pkgver and the
|
||||
# checksum are refreshed on a new version.
|
||||
|
||||
UPSTREAM_REPO="Xpl0itU/WiiUDownloader"
|
||||
|
||||
# Installed in CI (pacman) before build_artifact runs.
|
||||
BUILD_DEPS=(go gtk3 python)
|
||||
|
||||
latest_version() {
|
||||
gh api "repos/$UPSTREAM_REPO/releases/latest" --jq '.tag_name' | sed 's/^v//'
|
||||
}
|
||||
|
||||
# build_artifact <version> <output-file>
|
||||
build_artifact() {
|
||||
local ver="$1" outfile="$2"
|
||||
local workdir destdir srctree
|
||||
workdir="$(mktemp -d)"
|
||||
destdir="$(mktemp -d)"
|
||||
|
||||
curl -sfL "https://github.com/$UPSTREAM_REPO/archive/refs/tags/v$ver.tar.gz" | tar -xz -C "$workdir"
|
||||
srctree="$workdir/WiiUDownloader-$ver"
|
||||
|
||||
(cd "$srctree" && python3 grabTitles.py)
|
||||
|
||||
(cd "$srctree/cmd/WiiUDownloader" && \
|
||||
GOPATH="$workdir/gopath" \
|
||||
GOFLAGS="-buildmode=pie -trimpath -mod=readonly -modcacherw" \
|
||||
go build -v -o "$destdir/wiiudownloader" .)
|
||||
|
||||
install -Dm755 "$destdir/wiiudownloader" "$destdir/usr/bin/wiiudownloader"
|
||||
rm "$destdir/wiiudownloader"
|
||||
install -Dm644 "$srctree/data/WiiUDownloader.png" \
|
||||
"$destdir/usr/share/icons/hicolor/256x256/apps/wiiudownloader.png"
|
||||
|
||||
mkdir -p "$destdir/usr/share/applications"
|
||||
cat > "$destdir/usr/share/applications/wiiudownloader.desktop" << 'EOF'
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=WiiUDownloader
|
||||
Comment=Download Wii U titles from Nintendo's official servers
|
||||
Exec=wiiudownloader
|
||||
Icon=wiiudownloader
|
||||
Terminal=false
|
||||
Categories=Utility;
|
||||
EOF
|
||||
|
||||
tar --zstd --sort=name --owner=0 --group=0 --numeric-owner --mtime='@0' \
|
||||
-cf "$outfile" -C "$destdir" usr
|
||||
|
||||
rm -rf "$workdir" "$destdir"
|
||||
# refresh_checksums <version> <pkgbuild-path>
|
||||
refresh_checksums() {
|
||||
local ver="$1" pkgbuild="$2"
|
||||
local sha
|
||||
sha="$(curl -sfL "https://github.com/$UPSTREAM_REPO/releases/download/v$ver/WiiUDownloader-Linux-x86_64.AppImage" \
|
||||
| sha256sum | cut -d' ' -f1)"
|
||||
sed -i "s|^sha256sums=.*|sha256sums=('$sha')|" "$pkgbuild"
|
||||
}
|
||||
Reference in new issue
Block a user