summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 0707d500bd09bf29a8231ec8d1c9c089a90c57eb (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
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
_pkgname=ctool_electron
pkgname="${_pkgname//_/-}-bin"
pkgver=2.3.0
_electronversion=26
pkgrel=6
pkgdesc="Common tools for program development.程序开发常用工具 chrome/edge/firefox/utools/windows/linux/mac"
arch=('x86_64')
url="https://ctool.dev"
_ghurl="https://github.com/baiy/Ctool"
license=('MIT')
provides=("${_pkgname//_/-}")
conflicts=("${_pkgname//_/-}" "${pkgname%-bin}")
depends=(
    "electron${_electronversion}"
)
makedepends=(
    'gendesk'
)
source=(
    "${pkgname%-bin}-${pkgver}.tar.gz::${_ghurl}/releases/download/v${pkgver}/${_pkgname}_linux_x64.tar.gz"
    "${pkgname%-bin}-${pkgver}.png::https://raw.githubusercontent.com/baiy/Ctool/v${pkgver}/packages/ctool-core/public/icon/icon_1024.png"
    "LICENSE-${pkgver}::https://raw.githubusercontent.com/baiy/Ctool/v${pkgver}/LICENSE"
    "${pkgname%-bin}.sh"
)
sha256sums=('39943b2ce2f0232e112d14f4f39ec0008ef71d435246067692ba6dc574298337'
            '77467c477d328a27c45d59d1b808511dcff33824ca674f1aad43c606d8a1ab9c'
            '459af2e36090998e7807b1d2a5b8d6a381bf94b69cbd2ec68e7943a09e2ce1e2'
            '2b2e8aeed33fd71c521e49fd54fb2fa81218d16aef8bccb88d77909055ab8051')
build() {
    sed -e "s|@electronversion@|${_electronversion}|g" \
        -e "s|@appname@|${pkgname%-bin}|g" \
        -e "s|@runname@|app.asar|g" \
        -e "s|@cfgdirname@|ctool-adapter-electron|g" \
        -e "s|@options@||g" \
        -i "${srcdir}/${pkgname%-bin}.sh"
    gendesk -q -f -n --pkgname="${pkgname%-bin}" --pkgdesc="${pkgdesc}" --categories="Utility" --name="${pkgname%-bin}" --exec="${pkgname%-bin} %U"
}
package() {
	install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
    install -Dm644 "${srcdir}/electron_linux_x64/resources/app.asar" -t "${pkgdir}/usr/lib/${pkgname%-bin}"
    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"
    install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}