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

36 lines
1.3 KiB
Bash

# Template file for 'Rocket.Chat-Desktop'
pkgname=Rocket.Chat-Desktop
version=2.17.11
revision=1
wrksrc="Rocket.Chat.Electron-${version}"
hostmakedepends="yarn nodejs-lts python3 pkg-config app-builder"
makedepends="electron7 libvips-devel"
depends="electron7"
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"
checksum=2f13cc5d62b2246db8715809c4278748a770e5975f1a439a5d922ef7af4e26b7
export USE_SYSTEM_APP_BUILDER=true
do_configure() {
yarn upgrade electron@"$(</usr/lib/electron7/version)" @babel/core@7.8.7 @babel/preset-env@7.8.7 --non-interactive
}
do_build() {
export NODE_ENV=production
yarn gulp build
yarn run electron-builder --linux --x64 --dir \
-c.electronDist=/usr/lib/electron7 \
-c.electronVersion="$(</usr/lib/electron7/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
}