# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor : Fernando "Firef0x" G.P. da Silva <firefgx { aT ) gmail [ d0t } com>

pkgname=ydcv
pkgdesc="YouDao Console Version - Simple wrapper for Youdao online translate (Chinese <-> English) service API, as an alternative to the StarDict Console Version (sdcv)"
pkgver=0.7
pkgrel=4
arch=("any")
url="https://github.com/felixonmars/ydcv"
license=("GPL")
depends=('python')
makedepends=('python-setuptools-scm' 'python-setuptools-markdown')
source=("$pkgname-$pkgver.tar.gz::https://github.com/felixonmars/$pkgname/archive/$pkgver.tar.gz")
sha512sums=('04277b2cc586bf19b0cd8cb52c0287ac75b235f72cbab19358a962f14de74f042cc90da1ec7ded06e3ce07a4694a6511599ce9213485ed0e4d40a84d296663bf')

export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver

package() {
  cd $pkgname-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
  install -Dm644 contrib/zsh_completion "${pkgdir}/usr/share/zsh/site-functions/_${pkgname}"
}

# vim:set ts=2 sw=2 et:
