diff --git a/srcpkgs/Signal-Desktop/files/signal.desktop b/srcpkgs/Signal-Desktop/files/signal.desktop new file mode 100644 index 00000000000..435cfbc93ce --- /dev/null +++ b/srcpkgs/Signal-Desktop/files/signal.desktop @@ -0,0 +1,9 @@ +[Desktop Entry] +Type=Application +Name=Signal +GenericName=Messenger +Comment=Signal Private Messenger for the Desktop +Icon=signal +Exec=signal-desktop +Categories=Network;Messenger; +StartupNotify=true diff --git a/srcpkgs/Signal-Desktop/template b/srcpkgs/Signal-Desktop/template new file mode 100644 index 00000000000..1696957cf37 --- /dev/null +++ b/srcpkgs/Signal-Desktop/template @@ -0,0 +1,48 @@ +# Template file for 'Signal-Desktop' +pkgname=Signal-Desktop +version=1.6.1 +revision=1 +hostmakedepends="git python nodejs-lts" +depends="libnotify libappindicator" +short_desc="Signal Private Messenger for Linux" +maintainer="Julio Galvan " +license="GPL-3" +homepage="https://github.com/signalapp/Signal-Desktop" +distfiles="https://github.com/signalapp/Signal-Desktop/archive/v${version}.tar.gz" +checksum=6781de0f3da79af1d1416611f20c3b46ca1a82c1b615f949d19a293ab4099e72 +# 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 +}