summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorcamusecao2020-11-06 21:01:18 +0800
committercamusecao2020-11-06 21:01:18 +0800
commit3b472c2931e698a64544c14ec3eda4fb7c8e0d52 (patch)
tree2317ee8ed5b89ba9170d544e3719b8eeba39ff74
downloadaur-3b472c2931e698a64544c14ec3eda4fb7c8e0d52.tar.gz
init
-rw-r--r--.SRCINFO24
-rwxr-xr-xPKGBUILD38
-rwxr-xr-xcutetranslation.desktop7
3 files changed, 69 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..6834431aa19
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,24 @@
+pkgbase = cutetranslation
+ pkgdesc = 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 = gnome-screenshot
+ optdepends = libxtst
+ source = https://github.com/jiangzc/CuteTranslation/archive/v0.4.3-2.tar.gz
+ source = cutetranslation.desktop
+ md5sums = 218ec0212bd656ea3d175fd29b6f2db0
+ md5sums = 53dc6fbd71cc3e365405d42820ea9ab5
+
+pkgname = cutetranslation
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100755
index 00000000000..6b03c558fd0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: CamuseCao camusecao@gmail.com
+pkgname=cutetranslation
+pkgver=0.4.3
+pkgrel=2
+pkgdesc="Linux 系统上基于 X11 的一款取词翻译软件,帮助用户翻译多种语言的文字。"
+arch=('x86_64')
+url="https://github.com/jiangzc/CuteTranslation"
+license=('GPL3')
+depends=('tidy' 'nodejs' 'qt5-multimedia' 'gnome-screenshot')
+makedepends=('git' 'xcb-util' 'qt5-base' 'qt5-x11extras' 'qt5-multimedia')
+# 'libxtst'
+optdepends=('libxtst')
+conflicts=()
+replaces=()
+backup=()
+source=("$url/archive/v$pkgver-$pkgrel.tar.gz" "$pkgname.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
+}
+
+build() {
+ cd $srcdir/CuteTranslation-$pkgver-$pkgrel
+ mkdir -p build && cd build
+ qmake ../ && make -j4
+}
+
+package() {
+ cd $srcdir/CuteTranslation-$pkgver-$pkgrel
+ cp ./build/CuteTranslation ./template
+ install -Dm644 ./template/CuteTranslation.svg ${pkgdir}/usr/share/icons/CuteTranslation.svg
+ install -Dm644 $srcdir/$pkgname.desktop $pkgdir/usr/share/applications/$pkgname.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