67 lines
1.9 KiB
Bash
67 lines
1.9 KiB
Bash
# Maintainer: Nils Pukropp <nils@narl.io>
|
|
pkgname=ultimate-ban-tracker
|
|
pkgver=1.3.3
|
|
pkgrel=2
|
|
pkgdesc="Professional Steam Account Manager & Ban Tracker"
|
|
arch=('x86_64')
|
|
url="https://narl.io"
|
|
license=('custom:Personal Use and Non-Commercial')
|
|
depends=('electron' 'nodejs' 'npm' 'libxss' 'nss' 'libxtst')
|
|
makedepends=('imagemagick')
|
|
source=("ultimate-ban-tracker-${pkgver}.tar.gz::https://git.narl.io/nvrl/ultimate-ban-tracker/archive/v${pkgver}.tar.gz")
|
|
sha256sums=('SKIP')
|
|
|
|
build() {
|
|
# The Gitea archive usually extracts to a folder named after the repo
|
|
cd "${srcdir}/ultimate-ban-tracker"
|
|
|
|
cd frontend
|
|
npm install
|
|
|
|
# Ensure icon is converted
|
|
convert -background none -size 512x512 assets-build/icon.svg assets-build/icon.png
|
|
|
|
# Build production
|
|
npm run electron:build -- --linux
|
|
}
|
|
|
|
package() {
|
|
cd "${srcdir}/ultimate-ban-tracker/frontend"
|
|
|
|
# Create directory structure
|
|
install -d "${pkgdir}/usr/lib/${pkgname}"
|
|
install -d "${pkgdir}/usr/bin"
|
|
install -d "${pkgdir}/usr/share/applications"
|
|
install -d "${pkgdir}/usr/share/pixmaps"
|
|
|
|
# Copy the unpacked linux build
|
|
cp -r release/linux-unpacked/* "${pkgdir}/usr/lib/${pkgname}/"
|
|
|
|
# Create a wrapper script instead of a direct symlink
|
|
# This ensures Electron finds its relative resources correctly
|
|
cat > "${pkgdir}/usr/bin/${pkgname}" <<EOF
|
|
#!/bin/bash
|
|
exec /usr/lib/${pkgname}/${pkgname} "\$@"
|
|
EOF
|
|
chmod +x "${pkgdir}/usr/bin/${pkgname}"
|
|
|
|
# Install Desktop Entry
|
|
cat > "${pkgdir}/usr/share/applications/${pkgname}.desktop" <<EOF
|
|
[Desktop Entry]
|
|
Name=Ultimate Ban Tracker
|
|
Exec=/usr/bin/${pkgname} %U
|
|
Icon=${pkgname}
|
|
Type=Application
|
|
Categories=Game;Utility;
|
|
Terminal=false
|
|
Comment=Professional Steam Account Manager & Ban Tracker
|
|
StartupWMClass=ultimate-ban-tracker
|
|
EOF
|
|
|
|
# Install Icon
|
|
install -m644 "assets-build/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png"
|
|
|
|
# Install License
|
|
install -D -m644 "../LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
|
|
}
|