# Maintainer: Riccardo Sacchetto pkgname=antares-sql pkgver=0.7.1 pkgrel=1 pkgdesc="Open source and cross platform SQL client made to be simple and complete" arch=('x86_64') url="https://antares-sql.app/" license=('MIT') depends=('electron17') makedepends=('nvm' 'python') source=("https://github.com/Fabio286/antares/archive/refs/tags/v${pkgver}.tar.gz" "antares-sql.desktop" "antares-sql.sh") sha512sums=("a69bf7ec7020a50397ae85655723192bd718d50e5587248794e09a26ac243fb57e307fdfbf8a48f4fc180686ae174452530bd2bde761d2f8bb239c348da90628" "4dc1837ee4a8e9e4c610a9fc8b8724a903ebaea1aeed32f30c4ee469d2e12198549bfc760327c413534053f54ffe8248905a925fc5d63d2c6e31d75a413da4dc" "b3b1e1c9dfb59fc3e89f3c53194550634a2cd9e45ee9ae1b725c315e1ee3fdf657487409cb044a0c28875031608b6d128475095597de7031a8aa3b601a34baf4") _ensure_local_nvm() { # Check if NVM is enabled (and, if so, disable it) which nvm >/dev/null 2>&1 && nvm deactivate && nvm unload # Use a temp folder as NVM dir to avoid ruining user config export NVM_DIR="${srcdir}/.nvm" # Load NVM with the temp path source /usr/share/nvm/init-nvm.sh || [[ $? != 1 ]] } prepare() { # Load NVM with temp path _ensure_local_nvm # Install Node.JS 16 with NVM to avoid compatibility issues nvm install 16 # Enter the Antares source folder downloaded from GitHub cd "${srcdir}/antares-${pkgver}" # Install JS dependencies npm install } build() { # Enter the Antares source folder downloaded from GitHub cd "${srcdir}/antares-${pkgver}" # Compile (WebPack) the application NODE_ENV=production npm run compile # Run Electron Builder npx --no-install electron-builder --linux --"x64" --dir -c.npmRebuild=false -c.electronDist=/usr/lib/electron17 -c.electronVersion=$(