add go when build

This commit is contained in:
AzPepoze 2026-01-15 17:29:39 +07:00
parent 2180a71b53
commit 775eaa52a7
2 changed files with 10 additions and 4 deletions

View file

@ -7,6 +7,7 @@ pkgbase = linux-wallpaperengine-gui-git
license = MIT
makedepends = git
makedepends = npm
makedepends = go
makedepends = python
depends = linux-wallpaperengine
depends = gtk3

View file

@ -8,7 +8,7 @@ arch=('x86_64')
url="https://github.com/AzPepoze/linux-wallpaperengine-gui"
license=('MIT')
depends=('linux-wallpaperengine' 'gtk3' 'nss' 'libxss' 'alsa-lib')
makedepends=('git' 'npm' 'python')
makedepends=('git' 'npm' 'go' 'python')
provides=("$_pkgname")
conflicts=("$_pkgname" "${_pkgname}-bin")
source=("git+${url}.git")
@ -26,8 +26,13 @@ prepare() {
build() {
cd "$srcdir/$_pkgname"
# Set local caches for Electron and Go to avoid using global user directories
export ELECTRON_CACHE="$srcdir/electron-cache"
export ELECTRON_BUILDER_CACHE="$srcdir/electron-cache"
export GOPATH="$srcdir/go"
export GOCACHE="$srcdir/go-build"
export GOMODCACHE="$GOPATH/pkg/mod"
npm install --verbose
npm run build
@ -55,7 +60,7 @@ Type=Application
Categories=Utility;
EOF
if [ -f "build/icon.png" ]; then
install -Dm644 "build/icon.png" "$pkgdir/usr/share/pixmaps/$_pkgname.png"
if [ -f "build/frontend/icon.png" ]; then
install -Dm644 "build/frontend/icon.png" "$pkgdir/usr/share/pixmaps/$_pkgname.png"
fi
}
}