void-packages/srcpkgs/mattermost-desktop/template

37 lines
1.0 KiB
Bash

# Template file for 'mattermost-desktop'
pkgname=mattermost-desktop
version=4.5.2
revision=1
archs="x86_64 i686"
wrksrc="desktop-${version}"
# electron-builder needs GNU tar
hostmakedepends="git nodejs-lts-10 python libicns GraphicsMagick xz tar"
makedepends="libnotify-devel"
short_desc="Team messaging app, an open source Slack alternative"
maintainer="Artem Zhurikhin <ashpool@xecut.net>"
license="Apache-2.0"
homepage="https://mattermost.com/"
distfiles="https://github.com/mattermost/desktop/archive/v${version}.tar.gz"
checksum=17e32346592d175f091a4f12068e0cfc5cfd20ed7894f88bb5b54b2eb6eac74a
pre_build() {
npm install
}
do_build() {
npm run build
npm run package:linux
}
do_install() {
case $XBPS_TARGET_MACHINE in
x86_64) cd release/linux-unpacked ;;
i686) cd release/linux-ia32-unpacked ;;
esac
vmkdir usr/libexec/${pkgname}
vcopy . usr/libexec/${pkgname}
vinstall Mattermost.desktop 644 usr/share/applications
vmkdir usr/bin
ln -s ../libexec/mattermost-desktop ${DESTDIR}/usr/bin/mattermost-desktop
}