diff options
author | zxp19821005 | 2023-07-06 17:46:21 +0800 |
---|---|---|
committer | zxp19821005 | 2023-07-06 17:46:21 +0800 |
commit | 8cc284f482d2afc88467ec4c4d45ccae8c2491c7 (patch) | |
tree | fb592888aa104e39998b6fc9f6637ecd625865fd | |
parent | 870e5f2eb1faebc655b5930d787bc6be101644a6 (diff) | |
download | aur-8cc284f482d2afc88467ec4c4d45ccae8c2491c7.tar.gz |
optimized PKGBUILD
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | PKGBUILD | 20 | ||||
-rw-r--r-- | altus.sh | 6 |
3 files changed, 21 insertions, 33 deletions
@@ -1,39 +1,19 @@ pkgbase = altus pkgdesc = Desktop client for WhatsApp Web with themes, notifications and multiple account support pkgver = 4.8.6 - pkgrel = 1 + pkgrel = 2 url = https://github.com/amanharwara/altus arch = any license = GPL3 makedepends = yarn makedepends = electron makedepends = gendesk - depends = pango - depends = glib2 - depends = libxext - depends = alsa-lib - depends = libxcomposite - depends = libxcb - depends = libdrm - depends = libcups - depends = at-spi2-core - depends = libxrandr - depends = dbus - depends = libxkbcommon - depends = libx11 - depends = gcc-libs - depends = cairo - depends = nspr - depends = gtk3 - depends = nss - depends = expat - depends = mesa - depends = libxfixes - depends = libxdamage - depends = glibc + depends = electron conflicts = altus conflicts = altus-appimage source = altus-4.8.6.tar.gz::https://github.com/amanharwara/altus/archive/refs/tags/4.8.6.tar.gz + source = altus.sh sha256sums = ca5cb6f78df1a04beb1113d152171db8d2bab7d41d65658ff511af4de9dc0171 + sha256sums = 6f76a2f84efdcd3fb28df7fd0ac9db343a11f9fd62332cdfb9744a8909304310 pkgname = altus @@ -1,26 +1,28 @@ # Maintainer: zxp19821005 <zxp19821005 at 163 dot com> pkgname="altus" pkgver=4.8.6 -pkgrel=1 +pkgrel=2 pkgdesc="Desktop client for WhatsApp Web with themes, notifications and multiple account support" arch=('any') url="https://github.com/amanharwara/altus" license=('GPL3') conflicts=("${pkgname}" "${pkgname}-appimage") -depends=('pango' 'glib2' 'libxext' 'alsa-lib' 'libxcomposite' 'libxcb' 'libdrm' 'libcups' 'at-spi2-core' 'libxrandr' 'dbus' 'libxkbcommon' \ - 'libx11' 'gcc-libs' 'cairo' 'nspr' 'gtk3' 'nss' 'expat' 'mesa' 'libxfixes' 'libxdamage' 'glibc') +depends=('electron') makedepends=('yarn' 'electron' 'gendesk') -source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz") -sha256sums=('ca5cb6f78df1a04beb1113d152171db8d2bab7d41d65658ff511af4de9dc0171') +source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/refs/tags/${pkgver}.tar.gz" + "${pkgname}.sh") +sha256sums=('ca5cb6f78df1a04beb1113d152171db8d2bab7d41d65658ff511af4de9dc0171' + '6f76a2f84efdcd3fb28df7fd0ac9db343a11f9fd62332cdfb9744a8909304310') build() { cd "${srcdir}/${pkgname}-${pkgver}" - yarn install && yarn build + yarn install + yarn build } package() { - install -Dm755 -d "${pkgdir}/opt/${pkgname}" - cp -r "${srcdir}/${pkgname}-${pkgver}/dist/linux-unpacked/"* "${pkgdir}/opt/${pkgname}" + install -Dm644 "${srcdir}/${pkgname}-${pkgver}/dist/linux-unpacked/resources/app.asar" "${pkgdir}/opt/${pkgname}/${pkgname}.asar" + install -Dm755 "${srcdir}/${pkgname}.sh" "${pkgdir}/opt/${pkgname}/${pkgname}" install -Dm644 "${srcdir}/${pkgname}-${pkgver}/public/icon.png" "${pkgdir}/usr/share/pixmaps/${pkgname}.png" install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" - gendesk -f --icon "${pkgname}" --categories "Network" --name "Altus" --exec "/opt/${pkgname%}/${pkgname} %U" + gendesk -f -n --icon "${pkgname}" --categories "Network" --name "Altus" --exec "/opt/${pkgname%}/${pkgname} %U" install -Dm644 "${srcdir}/${pkgname}.desktop" -t "${pkgdir}/usr/share/applications" }
\ No newline at end of file diff --git a/altus.sh b/altus.sh new file mode 100644 index 000000000000..5bce6226b430 --- /dev/null +++ b/altus.sh @@ -0,0 +1,6 @@ +#!/bin/bash +if [[ $EUID -ne 0 ]] || [[ $ELECTRON_RUN_AS_NODE ]]; then + exec electron /opt/altus/altus.asar "$@" +else + exec electron --no-sandbox /opt/altus/altus.asar "$@" +fi
\ No newline at end of file |