From 78f76afe0a2e0d6525f373c627768852b41c61ab Mon Sep 17 00:00:00 2001 From: Fazri Gading Date: Mon, 26 Jan 2026 18:20:37 +0800 Subject: [PATCH] aur: add proper VCS (-git) PKGBUILD created clean VCS-based PKGBUILD following arch packaging conventions. this explicitly marked as a rolling (-git) build and derives its version dynamically from git tags and commit history via pkgver(). previous hybrid approach has been changed. key changes: - use -git suffix to clearly indicate rolling source builds - set pkgver=0 and compute the actual version via pkgver() - build only a directory layout using electron-builder (--dir) - avoid generating AppImage, deb, rpm, or pacman installers - align build and package steps with Arch packaging guidelines note: this PKGBUILD is intended for development and AUR use only and is not suitable for binary redistribution or release artifacts. --- PKGBUILD | 33 --------------------------------- PKGBUILD-git | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 33 deletions(-) delete mode 100644 PKGBUILD create mode 100644 PKGBUILD-git diff --git a/PKGBUILD b/PKGBUILD deleted file mode 100644 index 12f6707..0000000 --- a/PKGBUILD +++ /dev/null @@ -1,33 +0,0 @@ -# Maintainer: Terromur -pkgname=Hytale-F2P-git -_pkgname=Hytale-F2P -pkgver=2.0.12.r150.gb62ffc1 -pkgrel=1 -pkgdesc="Hytale-F2P - unofficial Hytale Launcher for free to play with multiplayer support" -arch=('x86_64') -url="https://github.com/amiayweb/Hytale-F2P" -license=('custom') -makedepends=('npm' 'git' 'rpm-tools' 'libxcrypt-compat') -source=("git+$url.git" "Hytale-F2P.desktop") -sha256sums=('SKIP' '46488fada4775d9976d7b7b62f8d1f1f8d9a9a9d8f8aa9af4f2e2153019f6a30') - -pkgver() { - cd "$_pkgname" - version=$(git describe --abbrev=0 --tags --match "v[0-9]*") - commits=$(git rev-list --count HEAD) - hash=$(git rev-parse --short HEAD) - printf "%s.r%s.g%s" "${version#v}" "$commits" "$hash" -} - -build() { - cd "$_pkgname" - npm ci - npm run build:linux -} - -package() { - mkdir -p "$pkgdir/opt/$_pkgname" - cp -r "$_pkgname/dist/linux-unpacked/"* "$pkgdir/opt/$_pkgname" - install -Dm644 "$_pkgname.desktop" "$pkgdir/usr/share/applications/$_pkgname.desktop" - install -Dm644 "$_pkgname/GUI/icon.png" "$pkgdir/usr/share/icons/hicolor/256x256/apps/$_pkgname.png" -} diff --git a/PKGBUILD-git b/PKGBUILD-git new file mode 100644 index 0000000..26da67a --- /dev/null +++ b/PKGBUILD-git @@ -0,0 +1,33 @@ +# Maintainer: Terromur +pkgname=Hytale-F2P-git +_pkgname=Hytale-F2P +pkgver=0 +pkgrel=1 +pkgdesc="Hytale-F2P - Unofficial Hytale Launcher for free to play with multiplayer support (rolling git build)" +arch=('x86_64') +url="https://github.com/amiayweb/Hytale-F2P" +license=('custom') +depends=('gtk3' 'nss' 'libxcrypt-compat') +makedepends=('git' 'npm') +source=("git+$url.git" "$_pkgname.desktop") +sha256sums=('SKIP' '46488fada4775d9976d7b7b62f8d1f1f8d9a9a9d8f8aa9af4f2e2153019f6a30') + +pkgver() { + cd "$srcdir/$_pkgname" + git describe --tags --long | sed 's/^v//;s/-/.r/;s/-/./' +} + +build() { + cd "$srcdir/$_pkgname" + npm ci + npm run build:arch +} + +package() { + cd "$srcdir/$_pkgname" + install -d "$pkgdir/opt/$_pkgname" + cp -r "$_pkgname/dist/linux-unpacked/"* "$pkgdir/opt/$_pkgname" + + install -Dm644 "$srcdir/$_pkgname.desktop" "$pkgdir/usr/share/applications/$_pkgname.desktop" + install -Dm644 GUI/icon.png "$pkgdir/usr/share/icons/hicolor/256x256/apps/$_pkgname.png" +}