blob: 7e212fe7170c2f704ff28d674ffc4e0845574903 (
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
|
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=commas-bin
_pkgname=Commas
pkgver=0.35.0
_electronversion=32
pkgrel=1
pkgdesc="A hackable, pluggable terminal, and also a command runner.Prebuilt version.Use system-wide electron."
arch=("x86_64")
url="https://github.com/CyanSalt/commas"
license=('ISC')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
"electron${_electronversion}"
'python'
)
makedepends=(
'gendesk'
'asar'
)
source=(
"${pkgname%-bin}-${pkgver}.zip::${url}/releases/download/v${pkgver}/${_pkgname}-linux-x64.zip"
"${pkgname%-bin}-${pkgver}.png::https://raw.githubusercontent.com/CyanSalt/commas/v${pkgver}/resources/images/icon.png"
"${pkgname%-bin}.sh"
)
sha256sums=('abfe2397bef1163cade987055255a72f5333e9df6bc10523d088ecfb768cf315'
'8817203c377967a333a8822b4595368dd3b9506143ccb41567dc07fa5ea9107d'
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
build() {
sed -e "
s/@electronversion@/${_electronversion}/
s/@appname@/${pkgname%-bin}/
s/@runname@/app.asar/
s/@cfgdirname@/${_pkgname}/
s/@options@/env ELECTRON_OZONE_PLATFORM_HINT=auto/
" -i "${srcdir}/${pkgname%-bin}.sh"
gendesk -q -f -n --pkgname="${pkgname%-bin}" --pkgdesc="${pkgdesc}" --categories="Utility" --name="${_pkgname}" --exec="${pkgname%-bin} %U"
asar e "${srcdir}/${_pkgname}-linux-x64/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}\"/" {} \;
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}/${_pkgname}-linux-x64/resources/"{app.asar.unpacked,bin} "${pkgdir}/usr/lib/${pkgname%-bin}"
install -Dm644 "${srcdir}/${_pkgname}-linux-x64/LICENSE"* -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -Dm644 "${srcdir}/${pkgname%-bin}-${pkgver}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
install -Dm644 "${srcdir}/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
}
|