pkgs/srcpkgs/whatsdesk-git/template
KF-Art 169264166c whatsdesk-git: made only x86_64
As it gives error when building on i686. The checksum was also
corrected.
2022-09-20 22:40:29 -04:00

47 lines
1.3 KiB
Bash

# Template file for 'whatsdesk-git'
pkgname=whatsdesk-git
version=2022.09.08
revision=1
archs="x86_64"
hostmakedepends="nodejs jq"
wrksrc=whatsdesk-master
repository="cereus-extra"
depends="libXScrnSaver nss libXtst libnotify libappindicator"
short_desc="Unofficial client for WhatsApp - git version"
maintainer="Kevin F. <https://github.com/KF-Art>"
license="MIT"
homepage="https://gitlab.com/zerkc/whatsdesk"
distfiles="${homepage}/-/archive/master/whatsdesk-master.tar.gz"
checksum=01d276b8f9c6b8e654c3ab916b60a55cb428bcf49b9db1e92ced999ff1cc2794
do_build() {
mv package.json package.json.tmp
case ${XBPS_TARGET_MACHINE} in
x86_64)
jq ".build.linux.target={\"target\": \"deb\",\"arch\":[\"x64\"]}" package.json.tmp > package.json ;;
i686)
jq ".build.linux.target={\"target\": \"deb\",\"arch\":[\"ia32\"]}" package.json.tmp > package.json ;;
esac
npm install
npm run build
}
do_install() {
vmkdir opt/whatsdesk/
vmkdir usr/bin/
vmkdir usr/share/applications/
case ${XBPS_TARGET_MACHINE} in
x86_64)
bin_dir=dist/linux-unpacked ;;
i686)
bin_dir=dist/linux-ia32-unpacked ;;
esac
vcopy ${bin_dir}/* opt/whatsdesk/
vcopy ${FILESDIR}/whatsdesk.desktop usr/share/applications/
ln -s "/opt/whatsdesk/whatsdesk" "${DESTDIR}/usr/bin/"
vlicense LICENSE
}