blob: b58971256a8f588192cf2898b0bb83fb1bf6eaaa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# Maintainer: yjun <jerrysteve1101 at gmail dot com>
pkgname=mqttx-bin
_pkgname=${pkgname%-bin}
pkgver=1.7.2
pkgrel=1
pkgdesc="A cross-platform MQTT 5.0 client tool open sourced by EMQ"
arch=('x86_64')
url="https://github.com/emqx/MQTTX"
license=('Apache')
depends=('electron5')
makedepends=('squashfs-tools')
source=(${_pkgname^^}-${pkgver}.snap::"https://github.com/emqx/MQTTX/releases/download/v${pkgver}/${_pkgname^^}_${pkgver}_amd64.snap"
"${_pkgname}.sh")
sha256sums=('2d7483574d116b5d17c36c7b50f3aa4eebd62242f84455b6cbdfc4b0dc7e6742'
'8712e2ac7ea0b3c8fd7ec7664516cf03a6e61a51377f32aba0cbf750af4f6b0d')
prepare() {
unsquashfs -f ${_pkgname^^}-${pkgver}.snap /resources/app.asar \
/meta/gui/icon.png \
/meta/gui/${_pkgname}.desktop
}
package() {
# app.asar
install -Dm644 squashfs-root/resources/app.asar -t ${pkgdir}/usr/share/${_pkgname}
# electron wrapper
install -Dm755 ${_pkgname}.sh ${pkgdir}/usr/bin/${_pkgname}
# icon
install -Dm644 squashfs-root/meta/gui/icon.png ${pkgdir}/usr/share/pixmaps/${_pkgname}.png
# desktop entry
install -Dm644 squashfs-root/meta/gui/${_pkgname}.desktop -t ${pkgdir}/usr/share/applications
sed -i 's|${SNAP}/meta/gui/icon.png|mqttx|g' ${pkgdir}/usr/share/applications/${_pkgname}.desktop
}
# vim: set sw=2 ts=2 et:
|