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