summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 265247deab117caaf35f9650aa369ebde7d78e10 (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
# Maintainer: zxp19821005 <zxp19821005 at 163 dot com>
pkgname=mydict-bin
_pkgname=MyDict
pkgver=0.6.14
pkgrel=6
pkgdesc='A Chinese and English dictionary.一款中英文词典'
arch=(x86_64)
url="https://github.com/xxNull-lsk/my_dict"
license=('BSD-3-Clause')
provides=("${pkgname%-bin}=${pkgver}")
conflicts=("${pkgname%-bin}")
depends=(
    'qt5-websockets'
    'qt5-declarative'
    'qt5-svg'
    'qt5-wayland'
    'alsa-lib'
    'qt5-base'
    'qt5-multimedia'
    'gtk3'
    'gstreamer'
    'libasyncns'
    'gst-plugins-base-libs'
    'libxcrypt-compat'
    'openssl-1.1'
    'libbsd'
)
makedepends=('gendesk')
source=(
    "${pkgname%-bin}-${pkgver}.tar.gz::${url}/releases/download/v${pkgver}/${pkgname%-bin}_arch_linux_x64_${pkgver}.tar.gz"
    "LICENSE-${pkgver}::https://raw.githubusercontent.com/xxNull-lsk/my_dict/v${pkgver}/LICENSE"
    "${pkgname%-bin}.sh"
)
sha256sums=('505769645eed49ed19d6fd39dd5a1c8fd5b9bef8f262b34a45fbb03d7265e66d'
            '7514140772df5ff1a5cff21685af45c7b50f320fee680e134553d053e40e6ccb'
            'f31faceaca7820e34aa0a349fe19c18b135ce3b93be39555fe884527edc7759a')
build() {
    sed -e "s|@appname@|${pkgname%-bin}|g" \
        -e "s|@runname@|${pkgname%-bin}|g" \
        -i "${srcdir}/${pkgname%-bin}.sh"
    gendesk -q -f -n --pkgname="${pkgname%-bin}" --pkgdesc="${pkgdesc}" --exec="${pkgname%-bin}" --categories="Utility" --name="${_pkgname}"
}
package() {
    install -Dm755 "${srcdir}/${pkgname%-bin}.sh" "${pkgdir}/usr/bin/${pkgname%-bin}"
    install -Dm755 -d "${pkgdir}/usr/lib"
    cp -r "${srcdir}/${pkgname%-bin}" "${pkgdir}/usr/lib"
    install -Dm644 "${srcdir}/${pkgname%-bin}.desktop" -t "${pkgdir}/usr/share/applications"
    install -Dm644 "${srcdir}/${pkgname%-bin}/res/dict.png" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.png"
    install -Dm644 "${srcdir}/LICENSE-${pkgver}" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}