fix: harden PKGBUILD for reliable npm dependency installation and clean build state
This commit is contained in:
14
PKGBUILD
14
PKGBUILD
@@ -1,7 +1,7 @@
|
||||
# Maintainer: Nils Pukropp <nils@narl.io>
|
||||
pkgname=ultimate-ban-tracker
|
||||
pkgver=1.3.3
|
||||
pkgrel=4
|
||||
pkgrel=5
|
||||
pkgdesc="Professional Steam Account Manager & Ban Tracker"
|
||||
arch=('x86_64')
|
||||
url="https://narl.io"
|
||||
@@ -14,8 +14,13 @@ sha256sums=('SKIP')
|
||||
build() {
|
||||
cd "${srcdir}/ultimate-ban-tracker"
|
||||
|
||||
# Clean previous build state if any
|
||||
rm -rf frontend/node_modules
|
||||
|
||||
cd frontend
|
||||
npm install
|
||||
|
||||
# Force fresh install and handle electron's postinstall quirks
|
||||
npm install --omit=optional
|
||||
|
||||
# Ensure icon is converted
|
||||
convert -background none -size 512x512 assets-build/icon.svg assets-build/icon.png
|
||||
@@ -36,13 +41,12 @@ package() {
|
||||
# Copy the unpacked linux build
|
||||
cp -r release/linux-unpacked/* "${pkgdir}/usr/lib/${pkgname}/"
|
||||
|
||||
# Fix permissions for chrome-sandbox (Crucial for Arch)
|
||||
# Fix permissions for chrome-sandbox
|
||||
chmod 4755 "${pkgdir}/usr/lib/${pkgname}/chrome-sandbox"
|
||||
|
||||
# Create a more robust wrapper script
|
||||
# Create wrapper script
|
||||
cat > "${pkgdir}/usr/bin/${pkgname}" <<EOF
|
||||
#!/bin/bash
|
||||
# Electron apps on Wayland sometimes need specific flags for the tray
|
||||
export ELECTRON_OZONE_PLATFORM_HINT=auto
|
||||
export XDG_CURRENT_DESKTOP=Unity
|
||||
exec /usr/lib/${pkgname}/${pkgname}-desktop "\$@"
|
||||
|
||||
Reference in New Issue
Block a user