49 lines
1.3 KiB
Bash
49 lines
1.3 KiB
Bash
# Template file for 'Signal-Desktop'
|
|
pkgname=Signal-Desktop
|
|
version=1.7.1
|
|
revision=1
|
|
hostmakedepends="git python nodejs-lts"
|
|
depends="libnotify libappindicator"
|
|
short_desc="Signal Private Messenger for Linux"
|
|
maintainer="Julio Galvan <juliogalvan@protonmail.com>"
|
|
license="GPL-3"
|
|
homepage="https://github.com/signalapp/Signal-Desktop"
|
|
distfiles="https://github.com/signalapp/Signal-Desktop/archive/v${version}.tar.gz"
|
|
checksum=188fe8c17ccf49609467ab59ea6321beb7ee71e00da7b419249d205ebf80d13d
|
|
# Due to electron
|
|
only_for_archs="x86_64 i686"
|
|
nostrip_files="signal-desktop"
|
|
|
|
post_extract() {
|
|
sed -i "s/'sass', 'date'/'sass'/g" Gruntfile.js
|
|
}
|
|
|
|
do_build() {
|
|
npm install -g yarn
|
|
yarn install --ignore-engines
|
|
yarn pack-prod
|
|
}
|
|
|
|
do_install() {
|
|
vmkdir usr/share/signal-desktop
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*) _ARCH="-ia32-";;
|
|
x86_64*) _ARCH="-";;
|
|
*) _ARCH="-${XBPS_TARGET_MACHINE%-musl}-";;
|
|
esac
|
|
vcopy dist/linux${_ARCH}unpacked/* usr/share/signal-desktop
|
|
|
|
vmkdir usr/bin
|
|
ln -s /usr/share/signal-desktop/signal-desktop ${DESTDIR}/usr/bin/
|
|
|
|
vmkdir usr/share/applications
|
|
vcopy ${FILESDIR}/signal.desktop usr/share/applications/
|
|
|
|
vmkdir usr/share/icons/hicolor
|
|
for size in 16 24 32 48 64 128 256 512; do
|
|
vinstall build/icons/png/${size}x${size}.png 644 usr/share/icons/hicolor/${size}x${size}/apps/ signal.png
|
|
done
|
|
npm remove -g yarn
|
|
}
|