summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorSaren Arterius2016-12-16 23:57:49 +0800
committerSaren Arterius2016-12-16 23:57:49 +0800
commit60fbd4aa4b1d78c6e48d32366c4e1f554f785fab (patch)
tree2025379c9fb764b8d55c3a90c6789a2438d09864 /PKGBUILD
downloadaur-60fbd4aa4b1d78c6e48d32366c4e1f554f785fab.tar.gz
first commit
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD42
1 files changed, 42 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c4202abaceed
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,42 @@
+pkgname=pyf9-git
+_pkgname=PyF9
+pkgver=r6.d2556d5
+pkgrel=2
+pkgdesc="Chinese IME in testing."
+arch=('i686' 'x86_64')
+url="https://github.com/Saren-Arterius/PyF9"
+depends=('xdotool' 'python-pillow' 'python-xlib' 'tk' 'xorg-xauth')
+makedepends=('firefox' 'npm' 'xorg-server-xvfb' 'wget')
+source=('git+https://github.com/Saren-Arterius/PyF9.git' 'pyf9.desktop')
+sha256sums=('SKIP' 'a65cbaf96d480b154d257eeead5c1941079b0e5c257ba22c6e35a93b5628207f')
+
+pkgver() {
+ cd "${_pkgname}"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+build() {
+ echo Downloading image assets...
+ cd "${_pkgname}/assets/"
+ after_p=$(printf "\x$(printf %x 113)")
+ arr=$(seq 0 9); arr+=(s)
+ for i in ${arr[@]}; do
+ wget -q "https://hk.dictionary.yahoo.com/static/MasterView/assets/${after_p}9/grx/${after_p}9_${i}.png" -O f9_${i}.png
+ done
+ rm please_grab_shit_from_their_website.sha1sum
+ cd ../../
+
+ echo Scrapping DB data... This might take up to few minutes
+ cd "${_pkgname}/db-scrapper/"
+ npm install
+ npm start
+}
+
+package() {
+ mkdir -p ${pkgdir}/opt/${_pkgname}
+ install -Dm644 "pyf9.desktop" "${pkgdir}/usr/share/applications/pyf9.desktop"
+ cd "${_pkgname}"
+ install -Dm755 "main.py" "${pkgdir}/opt/${_pkgname}/pyf9"
+ install -Dm644 "pyxhook.py" "${pkgdir}/opt/${_pkgname}/pyxhook.py"
+ cp -r assets "${pkgdir}/opt/${_pkgname}"
+}