blob: 23c706c00699b4788fea668569909987d8357c0b (
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
48
49
50
51
52
53
54
|
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=xterminal-bin
_pkgname=XTerminal
pkgver=2.6.3
_electronversion=31
#update:https://txc.qq.com/products/598955/change-log
pkgrel=1
pkgdesc="Not only powerful SSH tools, but also local consoles, and more coming soon.Prebuilt version.Use system-wide electron.不仅是强大的SSH工具,更提供本地控制台,以及更多即将推出的开发相关功能."
arch=(
'aarch64'
'x86_64'
)
url="https://www.xterminal.cn/"
license=('LicenseRef-custom')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
"electron${_electronversion}"
'java-runtime'
)
makedepends=(
'asar'
)
source=(
"LICENSE.html"
"${pkgname%-bin}.sh"
)
source_aarch64=("${pkgname%-bin}-${pkgver}-aarch64.rpm::https://cdn-cn.xterminal.cn/downloads/${_pkgname}-${pkgver}-linux-aarch64.rpm")
source_x86_64=("${pkgname%-bin}-${pkgver}-x86_64.rpm::https://cdn-cn.xterminal.cn/downloads/${_pkgname}-${pkgver}-linux-x86_64.rpm")
sha256sums=('8d08a959e0086a206ef3454cc0fc323454c73609cd764f102d8d2d076dafa0af'
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
sha256sums_aarch64=('2728f6a372ab49110900d54355afb248d707cdcae84a523d26e2157d3816dd4e')
sha256sums_x86_64=('b3ca2034c508c475049801b63cda7b934ed7ff629058133e9106e3ea7d7d672b')
build() {
sed -e "
s/@electronversion@/${_electronversion}/g
s/@appname@/${pkgname%-bin}/g
s/@runname@/app.asar/g
s/@cfgdirname@/${pkgname%-bin}/g
s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/g
" -i "${srcdir}/${pkgname%-bin}.sh"
sed -i "s/\/opt\/${_pkgname}\/${pkgname%-bin}/${pkgname%-bin}/g" "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
asar e "${srcdir}/opt/${_pkgname}/resources/app.asar" "${srcdir}/app.asar.unpacked"
find "${srcdir}/app.asar.unpacked/dist" -type f -exec sed -i "s/process.resourcesPath/\'\/usr\/lib\/${pkgname%-bin}\'/g" {} \;
asar p "${srcdir}/app.asar.unpacked" "${srcdir}/app.asar"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm644 "${srcdir}/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
cp -Pr --no-preserve=ownership "${srcdir}/opt/${_pkgname}/resources/"{app.asar.unpacked,tray} "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
install -Dm644 "${srcdir}/usr/share/icons/hicolor/512x512/apps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps"
install -Dm644 "${srcdir}/LICENSE.html" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
|