summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWinícius Iago Vieira Cota2020-12-24 14:34:28 -0300
committerWinícius Iago Vieira Cota2020-12-24 14:34:28 -0300
commitc312ed6ad14628c8e225040aadd1602cd996f99d (patch)
tree67e5f8601b90b4255d317a91dc37f56902b41346
downloadaur-rofi-translate-git.tar.gz
Initial commit
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD32
-rw-r--r--default-language.patch13
3 files changed, 63 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..144b4e2c5e5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = rofi-translate-git
+ pkgdesc = Simple rofi script for translation based on translate shell
+ pkgver = r28.84356fd
+ pkgrel = 1
+ url = https://github.com/garyparrot/rofi-translate
+ arch = any
+ license = MIT
+ makedepends = git
+ depends = translate-shell
+ depends = rofi
+ depends = mplayer
+ source = git+https://github.com/garyparrot/rofi-translate
+ source = default-language.patch
+ md5sums = SKIP
+ md5sums = 1bef53ea756773942ed2788a425b2a8c
+
+pkgname = rofi-translate-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..72c6d7c95f4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,32 @@
+# Maintainer: Winícius Cota <winicius.cota@gmail.com>
+
+_pkgname=rofi-translate
+pkgname="${_pkgname}-git"
+pkgver=r28.84356fd
+pkgrel=1
+pkgdesc='Simple rofi script for translation based on translate shell'
+arch=('any')
+url='https://github.com/garyparrot/rofi-translate'
+license=('MIT')
+depends=('translate-shell' 'rofi' 'mplayer')
+makedepends=('git')
+source=("git+$url" 'default-language.patch')
+md5sums=('SKIP' '1bef53ea756773942ed2788a425b2a8c')
+
+pkgver() {
+ cd "${_pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+prepare() {
+ cd $srcdir/$_pkgname
+ patch -p1 -i "$srcdir/default-language.patch"
+}
+
+package() {
+ install -Dm755 ${_pkgname}/rofi_trans "${pkgdir}/usr/bin/rofi_trans"
+ install -Dm755 ${_pkgname}/rofi_trans_brief "${pkgdir}/usr/bin/rofi_trans_brief"
+ install -Dm755 ${_pkgname}/rofi_trans_delete "${pkgdir}/usr/bin/rofi_trans_delete"
+ install -Dm755 ${_pkgname}/rofi_trans_verbose "${pkgdir}/usr/bin/rofi_trans_verbose"
+ install -Dm755 ${_pkgname}/rofi_verbose "${pkgdir}/usr/bin/rofi_verbose"
+}
diff --git a/default-language.patch b/default-language.patch
new file mode 100644
index 00000000000..790b0388af2
--- /dev/null
+++ b/default-language.patch
@@ -0,0 +1,13 @@
+diff --git a/rofi_trans b/rofi_trans
+index ee9de62..8f012ae 100755
+--- a/rofi_trans
++++ b/rofi_trans
+@@ -14,7 +14,7 @@ function Configs {
+
+ export transHistory="$HOME/.rofi_trans"
+ export transAudioCacheDir="$HOME/.rofi_trans_audio"
+- export transTarget="zh-TW"
++ export transTarget="en-US"
+ export save_audio="save_audio"
+ export transArgs="-b -speak"
+ export verbose="1"