summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 397442211441f523a05c09c3b57a613cf74a4ab8 (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
56
57
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
_appname=shutu_client
pkgname="${_appname//_/-}-bin"
_pkgname=ShuTu
_enname=TreeMind
_zhsname="树图思维导图"
pkgver=1.0.7
_electronversion=21
pkgrel=3
pkgdesc="A new generation of 'AI intelligence' mind map.Prebuilt version.Use system-wide electron.新一代'AI智能'思维导图"
arch=('x86_64')
url="https://shutu.cn"
license=('LicenseRef-custom')
conflicts=(
    "${pkgname%-bin}"
    "${_appname}"
)
provides=("${pkgname%-bin}=${pkgver}")
depends=(
    "electron${_electronversion}"
)
source=(
    "${pkgname%-bin}-${pkgver}.deb::https://static.shutu.cn/client/download/ShuTu-Linux-${pkgver}.deb"
    "LICENSE-user.html"
    "LICENSE-privacy.html"
    "LICENSE-upload.html"
    "${pkgname%-bin}.sh"
)
sha256sums=('923bd86ab825a23aa31e0b8aaf04f56a3fd427c23f8f78a6fe31b9cf1eae30f3'
            '0c61137e0949077ce76ecee1d5709b054b272bb6787fa6b2bfe63dbc16175ccd'
            '08b36b6ebe9256e91033557c43fe911857a2eea4c1ac07e19e61c577f219a09a'
            'bce7b2ffb9a99535c7ede2122a9c078226affd95f2cfe4e9831c8f79586429a3'
            '291f50480f5a61bc9c68db7d44cd0412071128706baa868a9cb854f8779a1980')
build() {
    sed -e "
        s/@electronversion@/${_electronversion}/g
        s/@appname@/${pkgname%-bin}/g
        s/@runname@/app.asar/g
        s/@cfgdirname@/${_appname}/g
        s/@options@//g
    " -i "${srcdir}/${pkgname%-bin}.sh"
    bsdtar -xf "${srcdir}/data."*
    sed -e "
        s/\"\/opt\/${_zhsname}\/${_appname}\"/${pkgname%-bin}/g
        s/Icon=${_appname}/Icon=${pkgname%-bin}/g
        s/Name=/Name[zh_CN]=/g
        s/Comment=${_zhsname}/Comment=${pkgdesc}/g
        2i\Name=${_enname}
    " -i "${srcdir}/usr/share/applications/${_appname}.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}"
    install -Dm644 "${srcdir}/usr/share/applications/${_appname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
    install -Dm644 "${srcdir}/usr/share/icons/hicolor/256x256/apps/${_appname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
    install -Dm644 "${srcdir}/LICENSE-"*.html -t "${pkgdir}/usr/share/licenses/${pkgname}"
}