summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcamusecao2020-11-30 20:43:08 +0800
committercamusecao2020-11-30 20:43:08 +0800
commitc9bd469a3ced66c7267190809950089b10bb5bb0 (patch)
tree362e7d1c78f959d46eeec0397dd2be9218e10f1e
downloadaur-c9bd469a3ced66c7267190809950089b10bb5bb0.tar.gz
init
-rw-r--r--.SRCINFO25
-rwxr-xr-xPKGBUILD41
-rwxr-xr-xcutetranslation.desktop7
3 files changed, 73 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..ea58ab0567c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,25 @@
+pkgbase = cutetranslation-flameshot
+ pkgdesc = flameshot 截图版的 Linux 系统上基于 X11 的一款取词翻译软件,帮助用户翻译多种语言的文字。
+ pkgver = 0.4.3
+ pkgrel = 2
+ url = https://github.com/jiangzc/CuteTranslation
+ arch = x86_64
+ license = GPL3
+ makedepends = git
+ makedepends = xcb-util
+ makedepends = qt5-base
+ makedepends = qt5-x11extras
+ makedepends = qt5-multimedia
+ depends = tidy
+ depends = nodejs
+ depends = qt5-multimedia
+ depends = flameshot
+ optdepends = libxtst
+ conflicts = cutetranslation
+ source = https://github.com/jiangzc/CuteTranslation/archive/v0.4.3-2.tar.gz
+ source = cutetranslation.desktop
+ md5sums = 218ec0212bd656ea3d175fd29b6f2db0
+ md5sums = 53dc6fbd71cc3e365405d42820ea9ab5
+
+pkgname = cutetranslation-flameshot
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 00000000000..73306f2f28b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,41 @@
+# Maintainer: CamuseCao camusecao@gmail.com
+pkgname=cutetranslation-flameshot
+pkgver=0.4.3
+pkgrel=2
+pkgdesc="flameshot 截图版的 Linux 系统上基于 X11 的一款取词翻译软件,帮助用户翻译多种语言的文字。"
+arch=('x86_64')
+url="https://github.com/jiangzc/CuteTranslation"
+license=('GPL3')
+depends=('tidy' 'nodejs' 'qt5-multimedia' 'flameshot')
+makedepends=('git' 'xcb-util' 'qt5-base' 'qt5-x11extras' 'qt5-multimedia')
+
+optdepends=('libxtst')
+conflicts=('cutetranslation')
+replaces=()
+backup=()
+source=("$url/archive/v$pkgver-$pkgrel.tar.gz" "cutetranslation.desktop")
+md5sums=('218ec0212bd656ea3d175fd29b6f2db0'
+ '53dc6fbd71cc3e365405d42820ea9ab5')
+
+prepare() {
+sed -i '19a\#include <QPainterPath>' $srcdir/CuteTranslation-$pkgver-$pkgrel/src/mainwindow.cpp
+sed -i 's/ nodejs.start("nodejs", args);/ nodejs.start("node", args);/g' $srcdir/CuteTranslation-$pkgver-$pkgrel/src/baidutranslate.cpp
+sed -i 's%gnome-screenshot%flameshot%g' $srcdir/CuteTranslation-$pkgver-$pkgrel/src/main.cpp
+sed -i 's%gnome-screenshot -a -f /tmp/ocr > /dev/null 2>&1%flameshot gui \-r > /tmp/ocr%g' $srcdir/CuteTranslation-$pkgver-$pkgrel/template/screenshot.sh
+# flameshot gui \-r >
+}
+
+build() {
+ cd $srcdir/CuteTranslation-$pkgver-$pkgrel
+ mkdir -p build && cd build
+ qmake ../ && make
+}
+
+package() {
+ cd $srcdir/CuteTranslation-$pkgver-$pkgrel
+ cp ./build/CuteTranslation ./template
+ install -Dm644 ./template/CuteTranslation.svg ${pkgdir}/usr/share/icons/CuteTranslation.svg
+ install -Dm644 $srcdir/cutetranslation.desktop $pkgdir/usr/share/applications/cutetranslation.desktop
+ install -D ./template/* -t ${pkgdir}/opt/CuteTranslation
+}
+
diff --git a/cutetranslation.desktop b/cutetranslation.desktop
new file mode 100755
index 00000000000..f9f935c7385
--- /dev/null
+++ b/cutetranslation.desktop
@@ -0,0 +1,7 @@
+[Desktop Entry]
+Name=cutetranslation
+Comment=基于 X11 的一款取词翻译软件
+Exec=/opt/CuteTranslation/CuteTranslation
+Icon=CuteTranslation.svg
+Terminal=false
+Type=Application