diff options
author | BrLi | 2020-12-20 08:06:52 +0800 |
---|---|---|
committer | BrLi | 2020-12-20 08:06:52 +0800 |
commit | fb538592f26cb95104f1ad369bb9fb3c570f59ea (patch) | |
tree | af0aae8936bbb4e102f5276ed184259457c4d81c | |
download | aur-fb538592f26cb95104f1ad369bb9fb3c570f59ea.tar.gz |
rename pkgname
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 45 |
2 files changed, 67 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..12f18727757c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = zdict + pkgdesc = CLI dictionary framework mainly focus on any kind of online dictionary + pkgver = 3.7.0 + pkgrel = 1 + url = https://github.com/zdict/zdict + arch = any + license = GPL3 + checkdepends = python-pytest + checkdepends = python-pytest-cov + checkdepends = python-pytest-flake8 + checkdepends = python-pyjokes + makedepends = python-setuptools + depends = python-beautifulsoup4 + depends = python-peewee + depends = python-requests + source = https://pypi.io/packages/source/z/zdict/zdict-3.7.0.tar.gz + source = git+https://github.com/zdict/zdict.sh.git#commit=8698dc733b3174f5aac319234fec60dfa380a87e + sha256sums = d2b3c00cf66515a601a8da3069608905691faa164225a6c09a7aca0ffc07d2bb + sha256sums = SKIP + +pkgname = zdict + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5bcaeb3910d9 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,45 @@ +# Maintainer: BrLi <brli at chakralinux dot org> + +# The check function contains several remote site api checks, may fail due to too many try or site down. +# Feel free to `--nocheck` and comment out checkdepends line to skip it. +# If cannot pass the check due to python package error, try to force the pkgver of depends as shown in requirements-test.txt + +pkgname=zdict +pkgver=3.7.0 +pkgrel=1 +pkgdesc="CLI dictionary framework mainly focus on any kind of online dictionary" +arch=('any') +url="https://github.com/zdict/zdict" +license=('GPL3') +depends=('python-beautifulsoup4' 'python-peewee' 'python-requests') +makedepends=('python-setuptools') +checkdepends=('python-pytest' 'python-pytest-cov' 'python-pytest-flake8' 'python-pyjokes') +_completion_commit=8698dc733b3174f5aac319234fec60dfa380a87e +source=("https://pypi.io/packages/source/z/zdict/$pkgname-$pkgver.tar.gz" + git+https://github.com/zdict/zdict.sh.git#commit=$_completion_commit) +sha256sums=('d2b3c00cf66515a601a8da3069608905691faa164225a6c09a7aca0ffc07d2bb' + 'SKIP') + +build() { + cd "$pkgname-$pkgver" + python setup.py build +} + +check() { + cd "$pkgname-$pkgver/build" + py.test +} + +package() { + cd "$pkgname-$pkgver" + python setup.py install --root="$pkgdir" --optimize=1 --skip-build + + # Install shell completion + # Bash + install -Dm644 "$srcdir/zdict.sh/zdict.bash-completion" "$pkgdir/usr/share/bash-completion/completions/zdict" + # Zsh + install -Dm644 "$srcdir/zdict.sh/zdict.plugin.zsh" "$pkgdir/usr/share/zsh/plugins/zdict/zdict.plugin.zsh" + install -Dm644 "$srcdir/zdict.sh/_zdict" "$pkgdir/usr/share/zsh/site-functions/_zdict" + # Fish + install -Dm644 "$srcdir/zdict.sh/zdict.fish" "$pkgdir/usr/share/fish/completions/zdict.fish" +} |