# Contributor: Ivan Tham # Maintainer: Ivan Tham setglobal pkgname = 'ydcv' setglobal pkgver = '0.4' setglobal pkgrel = '0' setglobal pkgdesc = '"YouDao Console Version - Chinese online translate'" setglobal url = '"https://github.com/felixonmars/ydcv'" setglobal arch = '"noarch'" setglobal license = '"GPL'" setglobal depends = ''"" # TODO: Either python2 or python3 is needed setglobal subpackages = ""$pkgname-zsh-completion:zshcomp"" setglobal source = ""$pkgname-$pkgver.tar.gz::https://github.com/felixonmars/$(pkgname)/archive/$(pkgver).tar.gz"" setglobal options = '"!check'" setglobal builddir = ""$srcdir/"$pkgname-$pkgver" proc package { mkdir -p "$pkgdir"/usr/bin/$pkgname install -Dm755 "$builddir"/ydcv.py \ "$pkgdir"/usr/bin/$pkgname || return 1 } proc zshcomp { setglobal pkgdesc = ""Zsh completions for $pkgname"" setglobal depends = ''"" setglobal 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 || return 1 } setglobal sha512sums = '"96c19ab8496159c90ef634533cd2f4e0a3d8a85449ae988ef0cb4d4d73e106b6383ad8c4eef5bdd0e9c7ae07db3ba2cf20112c8fa34d9487786d0cd4744f9bf3 ydcv-0.4.tar.gz'"