aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ydcv/APKBUILD
blob: 2da67fe6ac75c10d85d770b6f5d106c32360a4de (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
# Contributor: Ivan Tham <pickfire@riseup.net>
# Maintainer: Ivan Tham <pickfire@riseup.net>
pkgname=ydcv
pkgver=0.7
pkgrel=1
pkgdesc="YouDao Console Version - Chinese online translate"
url="https://github.com/felixonmars/ydcv"
arch="noarch"
license="GPL-3.0-only"
depends="python3"
makedepends="py3-setuptools"
subpackages="$pkgname-zsh-completion:zshcomp"
source="ydcv-$pkgver.tar.gz::https://github.com/felixonmars/ydcv/archive/$pkgver.tar.gz"
options="!check"

build() {
	git init
	python3 setup.py build
}

package() {
	python3 setup.py install --root="$pkgdir"
}

zshcomp() {
	pkgdesc="Zsh completions for $pkgname"
	depends=""
	install_if="$pkgname=$pkgver-r$pkgrel zsh"

	mkdir -p "$subpkgdir"/usr/share/zsh/site-functions/
	install -Dm644 "$builddir"/contrib/zsh_completion \
		"$subpkgdir"/usr/share/zsh/site-functions/_$pkgname
}

sha512sums="04277b2cc586bf19b0cd8cb52c0287ac75b235f72cbab19358a962f14de74f042cc90da1ec7ded06e3ce07a4694a6511599ce9213485ed0e4d40a84d296663bf  ydcv-0.7.tar.gz"