void-packages/srcpkgs/Rocket.Chat-Desktop/template

47 lines
1.7 KiB
Bash
Raw Normal View History

# Template file for 'Rocket.Chat-Desktop'
pkgname=Rocket.Chat-Desktop
2020-11-06 13:36:23 +01:00
version=3.0.6
revision=1
_electron_ver=10
wrksrc="Rocket.Chat.Electron-${version}"
hostmakedepends="yarn nodejs-lts python3 pkg-config app-builder"
makedepends="electron${_electron_ver} libvips-devel"
depends="electron${_electron_ver}"
short_desc="Rocket.Chat Native Cross-Platform Desktop Application via Electron"
maintainer="John <me@johnnynator.dev>"
license="MIT"
homepage="https://rocket.chat/"
distfiles="https://github.com/RocketChat/Rocket.Chat.Electron/archive/${version}.tar.gz"
2020-11-06 13:36:23 +01:00
checksum=1b00f280df130291c79f3a2e32af7e808fa1efbcaa1a49ce4f6a11370cba101c
export USE_SYSTEM_APP_BUILDER=true
do_configure() {
# we can't make electron skip binary download as that fails in do_build
# so instead, force a bogus architecture so it downloads its binary
# artifact, it will use the system one later anyway
# but this appears to fail on i686, so don't override there
local carch=x64
case "$XBPS_TARGET_MACHINE" in
i686*) carch=ia32 ;;
esac
npm_config_arch=$carch \
yarn upgrade electron@"$(</usr/lib/electron${_electron_ver}/version)" \
--non-interactive
}
do_build() {
export NODE_ENV=production
2020-10-04 14:25:18 +02:00
yarn build
yarn run electron-builder --linux --x64 --dir \
-c.electronDist=/usr/lib/electron${_electron_ver} \
-c.electronVersion="$(</usr/lib/electron${_electron_ver}/version)"
}
do_install() {
vinstall "${FILESDIR}/Rocket.Chat-Desktop.desktop" 644 usr/share/applications
vbin "$FILESDIR/Rocket.Chat-Desktop"
vinstall build/icons/512x512.png 644 usr/share/icons/hicolor/512x512/apps Rocket.Chat-Desktop.png
vlicense LICENSE
vinstall "dist/linux-unpacked/resources/app.asar" 644 /usr/lib Rocket.Chat-Desktop.asar
}