summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 7450be0c2caae7d5257b6bb2a2b7624add0b1967 (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
# Maintainer: tuberry

_srcname=dict-cedict
pkgname=dict-cedict-git
pkgver=20201117.r5.255bb57
pkgrel=1
pkgdesc="A port of CC-CEDICT database for dictd et al."
arch=('any')
url="https://www.mdbg.net/chinese/dictionary?page=cc-cedict"
license=('CCPL')
optdepends=('dictd: dict client and server')
makedepends=('dictd' 'git' 'python' 'curl' 'gzip')
provides=('dict-cedict')
conflicts=('dict-cedict')
install=${pkgname}.install
source=("git+https://github.com/tuberry/${_srcname}")
sha512sums=('SKIP')

pkgver()
{
    cd ${_srcname}
    printf "%s.r%s.%s" \
        "$( curl ${url} 2>&1 | grep Latest | grep -Eo '[[:digit:]]{4}-[[:digit:]]{2}-[[:digit:]]{2}' | tr -d '-' )" \
        "$( git rev-list --count HEAD )" \
        "$( git rev-parse --short HEAD )"
}

package()
{
    cd ${_srcname}
    make DESTDIR=${pkgdir} install
}