void-packages/srcpkgs/wire-desktop/template
2021-05-11 13:09:38 -03:00

44 lines
1.3 KiB
Bash

# Template file for 'wire-desktop'
pkgname=wire-desktop
version=3.25.2940
revision=1
wrksrc="${pkgname}-linux-${version}"
hostmakedepends="nodejs yarn git"
depends="electron10"
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=d1702bb64692b3970c2b49be4621069e7ea40b367be0917632cec50e123e570c
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 electron10 "/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
}