blob: a0c042efb3419152b7bdab5db44b5413c08c41f8 (
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
55
|
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=nxshell-bin
_pkgname=NxShell
pkgver=1.9.3
_electronversion=17
pkgrel=8
pkgdesc="An easy to use new terminal."
arch=('x86_64')
url="https://nxshell.github.io/"
_ghurl="https://github.com/nxshell/nxshell"
_dlurl="http://106.15.238.81:52081/github"
license=('MIT')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
"electron${_electronversion}"
'nodejs'
)
makedepends=(
'fuse2'
'asar'
)
options=('!strip')
source=(
"${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/v${pkgver}/${_pkgname}-${CARCH}-linux-${pkgver}-202303220832.AppImage"
"LICENSE-${pkgver}::https://raw.githubusercontent.com/nxshell/nxshell/main/LICENSE"
"${pkgname%-bin}.sh"
)
sha256sums=('6824f48a9b3d453bc6ec660bc566d07defac8be9a60a7798a1f2122b4a16631d'
'5f6da76746b239458fc480805f2e761e4d95b023169b99bb2c333e5bbc125fb7'
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
build() {
sed -e "s|@electronversion@|${_electronversion}|g" \
-e "s|@appname@|${pkgname%-bin}|g" \
-e "s|@runname@|app.asar|g" \
-e "s|@cfgdirname@|${_pkgname}|g" \
-e "s|@options@||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"
asar e "${srcdir}/squashfs-root/resources/app.asar" "${srcdir}/app.asar.unpacked"
sed "s|process.resourcesPath|\"\/usr\/lib\/${pkgname%-bin}\"|g" -i "${srcdir}/app.asar.unpacked/index.js"
asar p "${srcdir}/app.asar.unpacked" "${srcdir}/app.asar"
find "${srcdir}/squashfs-root/resources" -type d -exec chmod 755 {} \;
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm644 "${srcdir}/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
cp -r "${srcdir}/squashfs-root/resources/"{apps,node_modules,"${pkgname%-bin}".png} "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/squashfs-root/usr/lib/"* -t "${pkgdir}/usr/lib/${pkgname%-bin}/lib"
install -Dm644 "${srcdir}/squashfs-root/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/512x512/apps/${pkgname%-bin}.png" -t "${pkgdir}/usr/share/pixmaps"
install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
|