summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4b3432d2d0db7df4b03366b8c84871207071fac2 (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
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=chinesechesscontrol-bin
_pkgname=ChineseChessControl
_appname="org.Rabbit.${_pkgname%Control}"
pkgver=2.0.13
pkgrel=2
pkgdesc="中国象棋控件,包括中国象棋 MFC 扩展库,中国象棋 activex 控件,中国象棋Qt插件,人工智能引擎等"
arch=("x86_64")
url="https://github.com/KangLin/ChineseChessControl"
license=('GPL-3.0-only')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
    'openssl'
    'qt6-multimedia'
    'qt6-base'
    'qt6-webengine'
    'qt6-scxml'
)
source=(
    "${pkgname%-bin}-${pkgver}.deb::${url}/releases/download/v${pkgver}/${pkgname%-bin}_v${pkgver}_Linux_${CARCH}_setup.deb"
    "${pkgname%-bin}.sh"
)
sha256sums=('16009e75c9ff725c200a34f967132ab585584f315983358bcbf6fe9a8425ad57'
            '804ba9105633f8b743c8888edbac0b5894da0deaf5397713528fedc93de1ec6d')
build() {
    sed -e "s|@appname@|${pkgname%-bin}|g" \
        -e "s|@runname@|ChineseChessApp-v${pkgver}|g" \
        -i "${srcdir}/${pkgname%-bin}.sh"
    bsdtar -xf "${srcdir}/data."*
    sed "s|/opt/${_pkgname}/bin/ChineseChess.sh|${pkgname%-bin}|g;s|${_appname}|${pkgname%-bin}|g" \
        -i "${srcdir}/opt/${_pkgname}/share/applications/${_appname}.desktop"
}
package() {
    install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
    install -Dm755 -d "${pkgdir}/usr/lib/${pkgname%-bin}"
    cp -r "${srcdir}/opt/${_pkgname}/"* "${pkgdir}/usr/lib/${pkgname%-bin}"
    install -Dm644 "${srcdir}/opt/${_pkgname}/share/pixmaps/${_appname}.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
    install -Dm644 "${srcdir}/opt/${_pkgname}/share/applications/${_appname}.desktop" "${pkgdir}/usr/share/applications/${pkgname%-bin}.desktop"
}