aboutsummarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO21
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD49
-rwxr-xr-xsogou-autostart6
4 files changed, 80 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..5d96426a8e8f
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = fcitx-sogoupinyin
+ pkgdesc = Sogou Pinyin for Linux
+ pkgver = 1.2.0.0056
+ pkgrel = 1
+ url = http://pinyin.sogou.com/linux/
+ arch = x86_64
+ arch = i686
+ license = custom
+ depends = fcitx
+ depends = opencc
+ depends = libidn
+ depends = fcitx-qt4
+ depends = lsb-release
+ depends = xorg-xprop
+ source = http://download.ime.sogou.com/1432523940/sogoupinyin_1.2.0.0056_amd64.deb
+ source = sogou-autostart
+ md5sums = 47cd879b6b340391705f9a4e389045d9
+ md5sums = 60b1dcd637c932cf4f3bfaed797f5401
+
+pkgname = fcitx-sogoupinyin
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..f7d6f3c1adea
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+/pkg
+/src
+/*.tar.xz
+/*.deb
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..a115a5b42e0e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+# Maintainer: Vanitas <ssbianjp [AT] gmail.com>
+# Contributor: Jove Yu <yushijun110 [AT] gmail.com>
+# Contributor: csslayer <wengxt [AT] gmail.com>
+# Contributor: Felix Yan <felixonmars [AT] gmail.com>
+
+pkgname=fcitx-sogoupinyin
+pkgver=1.2.0.0056
+pkgrel=1
+pkgdesc="Sogou Pinyin for Linux"
+arch=('x86_64' 'i686')
+url="http://pinyin.sogou.com/linux/"
+license=('custom')
+depends=('fcitx' 'opencc' 'libidn' 'fcitx-qt4' 'lsb-release' 'xorg-xprop')
+
+if [ "${CARCH}" = "i686" ]; then
+ _LIB_DIR=i386-linux-gnu
+ _ARCH=i386
+ _time=1432524151
+ md5sums=('2b096a3440b55b2a018c166013774422'
+ '60b1dcd637c932cf4f3bfaed797f5401')
+else
+ _LIB_DIR=x86_64-linux-gnu
+ _ARCH=amd64
+ _time=1432523940
+ md5sums=('47cd879b6b340391705f9a4e389045d9'
+ '60b1dcd637c932cf4f3bfaed797f5401')
+fi
+
+source=("http://download.ime.sogou.com/${_time}/sogoupinyin_${pkgver}_${_ARCH}.deb"
+ "sogou-autostart")
+
+package(){
+ cd ${srcdir}
+
+ tar xJvf data.tar.xz -C "${pkgdir}"
+
+ mv "$pkgdir"/usr/lib/{$_LIB_DIR/,}fcitx
+ rmdir "$pkgdir/usr/lib/${_LIB_DIR}"
+
+ rm -r "$pkgdir"/usr/share/keyrings
+
+ ln -s /usr/lib/libopencc.so "$pkgdir"/usr/lib/libopencc.so.1
+
+ install -m755 sogou-autostart "$pkgdir"/usr/bin
+
+ rm "$pkgdir"/etc/xdg/autostart/fcitx-ui-sogou-qimpanel.desktop
+ cp "$pkgdir"/usr/share/applications/fcitx-ui-sogou-qimpanel.desktop "$pkgdir"/etc/xdg/autostart/fcitx-ui-sogou-qimpanel.desktop
+ sed -i 's/sogou-qimpanel\ %U/sogou-autostart/g' "$pkgdir"/etc/xdg/autostart/fcitx-ui-sogou-qimpanel.desktop
+}
diff --git a/sogou-autostart b/sogou-autostart
new file mode 100755
index 000000000000..de28e1dd6b5a
--- /dev/null
+++ b/sogou-autostart
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# sleep for a little while to avoid duplicate startup
+sleep 10
+
+sogou-qimpanel