mirror of
https://github.com/amiayweb/Hytale-F2P.git
synced 2026-02-26 09:21:58 -03:00
* Add correct auto-detect version and commit If a person uses PKGBUILD, it will automatically determine the latest version and commit. * Remove maintainer and change to npm ci --------- Co-authored-by: Terromur <79866197+Terromur@users.noreply.github.com>
34 lines
1.1 KiB
Bash
34 lines
1.1 KiB
Bash
# Maintainer: Terromur <terromuroz@proton.me>
|
|
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/icon.png" "$pkgdir/usr/share/icons/hicolor/512x512/apps/$_pkgname.png"
|
|
}
|