diff --git a/wiiudownloader-bin/.SRCINFO b/wiiudownloader-bin/.SRCINFO new file mode 100644 index 0000000..f12ef32 --- /dev/null +++ b/wiiudownloader-bin/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = wiiudownloader-bin + pkgdesc = Download encrypted Wii U files from Nintendo's official servers (prebuilt) + pkgver = 2.98 + pkgrel = 1 + 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 = fontconfig + provides = wiiudownloader + conflicts = wiiudownloader + source = https://github.com/Felitendo/PKGBUILDS/releases/download/wiiudownloader-bin-2.98/wiiudownloader-bin-2.98.tar.zst + sha256sums = 5b2bd57e6531aee1774ca3b9acc70bc402eab585a2532a666f4484584412622e + +pkgname = wiiudownloader-bin diff --git a/wiiudownloader-bin/PKGBUILD b/wiiudownloader-bin/PKGBUILD new file mode 100644 index 0000000..286e193 --- /dev/null +++ b/wiiudownloader-bin/PKGBUILD @@ -0,0 +1,21 @@ +# Maintainer: Felitendo +# This PKGBUILD is updated automatically: +# https://github.com/Felitendo/PKGBUILDS + +pkgname=wiiudownloader-bin +pkgver=2.98 +pkgrel=1 +pkgdesc="Download encrypted Wii U files from Nintendo's official servers (prebuilt)" +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') +provides=('wiiudownloader') +conflicts=('wiiudownloader') +source=("https://github.com/Felitendo/PKGBUILDS/releases/download/${pkgname}-${pkgver}/${pkgname}-${pkgver}.tar.zst") +sha256sums=('5b2bd57e6531aee1774ca3b9acc70bc402eab585a2532a666f4484584412622e') + +package() { + cp -a "$srcdir/usr" "$pkgdir/" +} diff --git a/wiiudownloader-bin/pkg.sh b/wiiudownloader-bin/pkg.sh new file mode 100644 index 0000000..26a4bf6 --- /dev/null +++ b/wiiudownloader-bin/pkg.sh @@ -0,0 +1,55 @@ +# wiiudownloader-bin - prebuilt package of https://github.com/Xpl0itU/WiiUDownloader +# (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_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 +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" +}