summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorfossdd2021-03-22 14:17:42 +0000
committerfossdd2021-03-22 14:17:42 +0000
commitedff30c72278d1ccdf013294a2f6d75fc07f94b7 (patch)
tree3ee57a706469f24ed12e9a151d6a72561450bee8
downloadaur-edff30c72278d1ccdf013294a2f6d75fc07f94b7.tar.gz
initial package
-rw-r--r--.SRCINFO19
-rw-r--r--PKGBUILD34
-rwxr-xr-xargos-translate-git.install3
3 files changed, 56 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..a0dd5c163333
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,19 @@
+pkgbase = argos-translate-git
+ pkgdesc = Offline neural machine translation library and GUI.
+ pkgver = r231.8c4e64e
+ pkgrel = 1
+ url = https://github.com/argosopentech/argos-translate
+ install = argos-translate-git.install
+ arch = any
+ license = MIT
+ makedepends = python-setuptools
+ makedepends = git
+ depends = python
+ depends = python-pip
+ provides = argos-translate
+ provides = argos-translate-cli
+ source = git+https://github.com/argosopentech/argos-translate.git
+ sha256sums = SKIP
+
+pkgname = argos-translate-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..6677b145c1e0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
+# Maintainer: fossdd <fossdd@tutanota.com>
+pkgname=argos-translate-git
+_pkgname=argos-translate
+pkgver=r231.8c4e64e
+pkgrel=1
+pkgdesc="Offline neural machine translation library and GUI."
+arch=(any)
+url="https://github.com/argosopentech/argos-translate"
+provides=('argos-translate' 'argos-translate-cli')
+license=(MIT)
+depends=('python' 'python-pip')
+makedepends=('python-setuptools' 'git')
+install="argos-translate-git.install"
+source=('git+https://github.com/argosopentech/argos-translate.git')
+sha256sums=('SKIP')
+
+pkgver() {
+ cd "${_pkgname}"
+ ( set -o pipefail
+ git describe --long --tags 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+build() {
+ cd ${_pkgname}
+ python setup.py build
+}
+
+package() {
+ cd ${_pkgname}
+ python setup.py install --root="$pkgdir/" --optimize=1
+}
+
diff --git a/argos-translate-git.install b/argos-translate-git.install
new file mode 100755
index 000000000000..41043b68c355
--- /dev/null
+++ b/argos-translate-git.install
@@ -0,0 +1,3 @@
+post_install() {
+ pip install ctranslate2 sentencepiece stanza
+}