diff options
author | Wenxuan Zhang | 2021-03-11 22:01:26 +0800 |
---|---|---|
committer | Wenxuan Zhang | 2021-03-11 22:08:54 +0800 |
commit | 357b190f650b9a526e260e0ddbd7457bc882c32b (patch) | |
tree | 57bed10c0bfcfc8c98c943de2062c723b5634e32 | |
download | aur-357b190f650b9a526e260e0ddbd7457bc882c32b.tar.gz |
init commit
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 40 |
3 files changed, 68 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8a08f79d313c --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = clitrans-git + pkgdesc = Yet another command-line translator (Chinese <=> English) + pkgver = 0.3.1.49.g3e6f0e1 + pkgrel = 1 + url = https://github.com/wfxr/clitrans + arch = i686 + arch = x86_64 + license = MIT + license = APACHE + makedepends = git + makedepends = rust + makedepends = cargo + makedepends = alsa-lib + makedepends = curl + depends = alsa-lib + depends = curl + conflicts = clitrans + conflicts = clitrans-bin + source = clitrans::git+https://github.com/wfxr/clitrans.git + sha256sums = SKIP + +pkgname = clitrans-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..18e99b5946f5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +* +!.gitignore +!.pre-commit-config.yaml +!.SRCINFO +!PKGBUILD diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..223530679424 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,40 @@ +# Maintainer: Wenxuan <wenxuangm@gmail.com> +_pkgname="clitrans" +pkgname="${_pkgname}-git" +pkgver=0.3.1.49.g3e6f0e1 +pkgrel=1 +pkgdesc="Yet another command-line translator (Chinese <=> English)" +arch=(i686 x86_64) +url="https://github.com/wfxr/${_pkgname}" +license=("MIT" "APACHE") +makedepends=("git" "rust" "cargo" "alsa-lib" "curl") +depends=("alsa-lib" "curl") +conflicts=("${_pkgname}" "${_pkgname}-bin") + +source=("${_pkgname}::git+https://github.com/wfxr/${_pkgname}.git") +sha256sums=('SKIP') + +pkgver() { + cd "${_pkgname}" + echo "$(grep '^version =' Cargo.toml|head -n1|cut -d\" -f2|cut -d\- -f1).$(git rev-list --count HEAD).g$(git rev-parse --short HEAD)" +} + +build() { + cd "${_pkgname}" + # resolver requires nightly version cargo for now (2021-03-11) + sed -i /^resolver/d Cargo.toml + cargo build --release --locked --features audio + git checkout Cargo.toml +} + +package() { + cd "$srcdir/${_pkgname}" + install -Dm755 "target/release/${_pkgname}" "$pkgdir/usr/bin/${_pkgname}" + install -Dm644 "completions/fish/${_pkgname}.fish" "$pkgdir/usr/share/fish/vendor_completions.d/${_pkgname}.fish" + install -Dm644 "completions/zsh/_${_pkgname}" "$pkgdir/usr/share/zsh/site-functions/_${_pkgname}" + install -Dm644 "README.md" "$pkgdir/usr/share/doc/${_pkgname}/README.md" + install -Dm644 "LICENSE-MIT" "$pkgdir/usr/share/licenses/${_pkgname}/LICENSE-MIT" + install -Dm644 "LICENSE-APACHE" "$pkgdir/usr/share/licenses/${_pkgname}/LICENSE-APACHE" +} + +# vim:set noet sts=0 sw=4 ts=4 ft=PKGBUILD: |