blob: a0661e589eb3ddcc2e64d9794fa8eae7d16d0c65 (
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.11.0
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=('electron13')
makedepends=('squashfs-tools')
source=(${_pkgname^^}-${pkgver}.snap::"https://github.com/emqx/MQTTX/releases/download/v${pkgver}/${_pkgname^^}_${pkgver}_amd64.snap"
"${_pkgname}.sh")
sha256sums=('e8803d4b047e0a7bde5942c8d5f7c820cc6581918d653a23447693fbb481c4a1'
'735d91b5f674b830d761a56fdef8e577077e9738e92143e75394acdecf38cba1')
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:
|