blob: 48cfe1e2b5fceb8a77d8c88b32ce5a202e3cdde5 (
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
|
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=shuli-bin
_zhsname="书立"
pkgver=0.1.8
_electronversion=31
pkgrel=1
pkgdesc="Personal Knowledge Management Assistant.Double-chain, table, rich text, high performance, local first.书立,个体知识管理助手,双链、表格、富文本、高性能、本地优先"
arch=('x86_64')
url="https://slinote.com/home"
_ghurl="https://github.com/codeartel/slinote-community"
license=('LicenseRef-custom')
conflicts=("${pkgname%-bin}")
prodives=("${pkgname%-bin}=${pkgver}")
depends=(
"electron${_electronversion}"
)
options=(
'!emptydirs'
)
source=(
"${pkgname%-bin}-${pkgver}.rpm::https://file.slinote.com/installer/linux/${pkgname%-bin}-${pkgver}.${CARCH}.rpm"
"${pkgname%-bin}.sh"
)
sha256sums=('b1097519b6889c458edc197f5d486e83ff98b5ca995de696e93698385db7a61f'
'291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
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\/${_zhsname}\/${pkgname%-bin}\"/${pkgname%-bin}/g" "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop"
}
package() {
install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
install -Dm644 "${srcdir}/opt/${_zhsname}/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
_icon_sizes=(16x16 32x32 256x256 512x512 1024x1024)
for _icons in "${_icon_sizes[@]}";do
install -Dm644 "${srcdir}/usr/share/icons/hicolor/${_icons}/apps/${pkgname%-bin}.png" \
-t "${pkgdir}/usr/share/icons/hicolor/${_icons}/apps"
done
install -Dm644 "${srcdir}/usr/share/applications/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
install -Dm644 "${srcdir}/opt/${_zhsname}/LICENSE"* -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
|