summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD35
-rw-r--r--thesaurus-query.install20
3 files changed, 72 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..1027db69124b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = vim-thesaurus_query
+ pkgdesc = Multi-language Thesaurus Query and Replacement plugin for Vim
+ pkgver = 0.4.0
+ pkgrel = 1
+ url = https://github.com/Ron89/thesaurus_query.vim
+ install = thesaurus-query.install
+ arch = any
+ groups = vim-plugins
+ license = Apache License, Version 2.0
+ depends = vim
+ depends = python
+ depends = python2>=2.7.0
+ source = thesaurus_query.vim-0.4.0.tar.gz::https://github.com/Ron89/thesaurus_query.vim/archive/v0.4.0.tar.gz
+ sha512sums = 29f0b2bd28933e519900a2c4e9d91765fd006023cfa39934a1b23108bc9d21f71986d35bcd9540d0d1853a9171399b862bf7daa6946875bb06ba6ee9f76ccc73
+
+pkgname = vim-thesaurus_query
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..daa823fb0627
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: HE Chong <chong.he.1989@gmail.com>
+pkgname=vim-thesaurus_query
+pkgver=0.4.0
+pkgrel=1
+pkgdesc="Multi-language Thesaurus Query and Replacement plugin for Vim"
+arch=('any')
+url="https://github.com/Ron89/thesaurus_query.vim"
+license=('Apache License, Version 2.0')
+groups=('vim-plugins')
+depends=('vim' 'python' 'python2>=2.7.0')
+makedepends=('')
+install='thesaurus-query.install'
+conflicts=('')
+replaces=('')
+provides=('')
+validpgpkeys=()
+
+_source_name='thesaurus_query.vim'
+_source="https://$_gitdomain/$_gituser/$_gitname.git/"
+source=("${_source_name}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
+sha512sums=('29f0b2bd28933e519900a2c4e9d91765fd006023cfa39934a1b23108bc9d21f71986d35bcd9540d0d1853a9171399b862bf7daa6946875bb06ba6ee9f76ccc73')
+
+package() {
+ install -d ${pkgdir}/usr/share/vim/vimfiles/{autoload,autoload/thesaurus_query,plugin,syntax,doc}
+ install -D -m644 ${srcdir}/${_source_name}-${pkgver}/autoload/thesaurus_query.vim \
+ "${pkgdir}/usr/share/vim/vimfiles/autoload/"
+ install -D -m644 ${srcdir}/${_source_name}-${pkgver}/autoload/thesaurus_query/* \
+ "${pkgdir}/usr/share/vim/vimfiles/autoload/thesaurus_query/"
+ install -D -m644 ${srcdir}/${_source_name}-${pkgver}/plugin/thesaurus_query.vim \
+ "${pkgdir}/usr/share/vim/vimfiles/plugin/"
+ install -D -m644 ${srcdir}/${_source_name}-${pkgver}/syntax/* \
+ "${pkgdir}/usr/share/vim/vimfiles/syntax/"
+ install -D -m644 ${srcdir}/${_source_name}-${pkgver}/doc/* \
+ "${pkgdir}/usr/share/vim/vimfiles/doc/"
+}
diff --git a/thesaurus-query.install b/thesaurus-query.install
new file mode 100644
index 000000000000..e46814151bee
--- /dev/null
+++ b/thesaurus-query.install
@@ -0,0 +1,20 @@
+update_helptag() {
+ echo -n "Updating vim help tags..."
+ /usr/bin/vim --noplugins -u NONE -U NONE --cmd ":helptags /usr/share/vim/vimfiles/doc" --cmd ":q" > /dev/null 2>&1
+ echo "done. "
+}
+
+post_install() {
+ update_helptag
+ echo "To use it for thesaurus query:"
+ echo " In normal or visual mode: $(tput bold)<leader>cs$(tput sgr0)"
+ echo " in insert mode with cursor at end of target word: $(tput bold)<c-x><c-u>$(tput sgr0)"
+}
+
+post_upgrade() {
+ update_helptag ${1}
+}
+
+post_remove() {
+ update_helptag
+}