void-packages/srcpkgs/wire-desktop/template

45 lines
1.3 KiB
Bash

# Template file for 'wire-desktop'
pkgname=wire-desktop
version=3.27.2944
revision=1
wrksrc="${pkgname}-linux-${version}"
hostmakedepends="nodejs-lts yarn git"
depends="electron13"
short_desc="Wire for desktop"
maintainer="Young Jin Park <youngjinpark20@gmail.com>"
license="GPL-3.0-or-later"
homepage="https://wire.com"
distfiles="https://github.com/wireapp/wire-desktop/archive/linux/${version}.tar.gz"
checksum=378c945e6933855407aa03fe49a934409675bdfc370398c8f21da1fd13832af9
case "$XBPS_MACHINE" in
x86_64*|i686*) ;;
*) broken="oof" ;;
esac
pre_build() {
yarn
}
do_build() {
LINUX_TARGET=dir yarn build:linux
npx ts-node -P tsconfig.bin.json ./bin/build-tools/build-linux-desktop-file.ts > wire-desktop.desktop
}
do_install() {
vmkdir usr/lib/wire-desktop
vinstall wrap/dist/linux-unpacked/resources/app.asar 644 usr/lib/wire-desktop
vmkdir usr/bin
cat << EOF > "wire-desktop.sh"
#!/bin/sh
exec electron13 "/usr/lib/wire-desktop/app.asar" "\$@"
EOF
vbin wire-desktop.sh wire-desktop
vmkdir usr/share/icons/hicolor/256x256/apps
vcopy resources/icons/256x256.png usr/share/icons/hicolor/256x256/apps/wire-desktop.png
vmkdir usr/share/icons/hicolor/32x32/apps
vcopy resources/icons/32x32.png usr/share/icons/hicolor/32x32/apps/wire-desktop.png
vmkdir usr/share/applications
vcopy wire-desktop.desktop usr/share/applications/wire-desktop.desktop
}