blob: 84d8b5a7d6fa135ef28c13ca456589f821eece04 (
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=polyglot
pkgname="${_pkgname}-ai-bin"
pkgver=0.3.7
_electronversion=23
pkgrel=1
pkgdesc="🤖️ Cross-platform AI language practice app(跨平台AI语言练习应用).Prebuilt version.Use system-wide electron."
arch=('x86_64')
url="https://polyglotai.xyz/"
_ghurl="https://github.com/liou666/polyglot"
license=('GPL-3.0-only')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
"electron${_electronversion}"
)
makedepends=(
'fuse2'
)
source=(
"${pkgname%-bin}-${pkgver}.AppImage::${_ghurl}/releases/download/v${pkgver}/${_pkgname//p/P}_${pkgver}.AppImage"
"${pkgname%-bin}.sh"
)
sha256sums=('cadebfabd6018b43206db04bf321b53807f4f3fb2509405d278bdaffea495479'
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
build() {
sed -e "
s/@electronversion@/${_electronversion}/g
s/@appname@/${pkgname%-bin}/g
s/@runname@/app.asar/g
s/@cfgdirname@/${_pkgname}/g
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 -e "
s/AppRun --no-sandbox/${pkgname%-bin}/g
s/Icon=${_pkgname}/Icon=${pkgname%-bin}/g
" -i "${srcdir}/squashfs-root/${_pkgname}.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"
install -Dm644 "${srcdir}/squashfs-root/usr/share/icons/hicolor/0x0/apps/${_pkgname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
install -Dm644 "${srcdir}/squashfs-root/${_pkgname}.desktop" -t "${pkgdir}/usr/share/applications"
}
|