blob: 0874b2ed3a568c88d361db37da7e45455d77a7bf (
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
37
38
39
40
41
42
43
44
45
46
47
|
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=jsonbox-bin
pkgver=2.3.1
_electronversion=19
pkgrel=2
pkgdesc="A cross platform JSON formatting tool跨平台的json格式化工具"
arch=('x86_64')
url="https://docs.r-xnoro.com/jsonbox"
_ghurl="https://github.com/rexlevin/jsonbox"
license=('Apache')
conflicts=("${pkgname%-bin}")
provides=("${pkgname%-bin}=${pkgver}")
depends=(
"electron${_electronversion}"
'hicolor-icon-theme'
'libdbusmenu-glib'
'gtk2'
'dbus-glib'
)
makedepends=(
'squashfuse'
)
source=(
"${pkgname%-bin}-${pkgver}.AppImage::${url}/dist/${pkgname%-bin}-${pkgver}-linux-${CARCH}.AppImage"
"${pkgname%-bin}.sh"
)
sha256sums=('10971c1196d1e729d10f58e352afb4c4872458a910d2b55b16c670d4becb6a7f'
'd4272fed78cdcacd9edfb019134ac485d65b43f4d8c7a4179edbaed56af9b231')
build() {
sed -e "s|@electronversion@|${_electronversion}|" \
-e "s|@appname@|${pkgname%-bin}|g" \
-e "s|@appasar@|app.asar|g" \
-i "${srcdir}/${pkgname%-bin}.sh"
chmod a+x "${srcdir}/${pkgname%-bin}-${pkgver}.AppImage"
"${srcdir}/${pkgname%-bin}-${pkgver}.AppImage" --appimage-extract > /dev/null
sed "s|AppRun --no-sandbox|${pkgname%-bin}|g" -i "${srcdir}/squashfs-root/${pkgname%-bin}.desktop"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm644 "${srcdir}/squashfs-root/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/squashfs-root/usr/lib/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/lib"
for _icons in 16x16 32x32 48x48 64x64 128x128 256x256;do
install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \
-t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps"
done
install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
}
|