diff options
author | Andrzej Giniewicz | 2015-07-07 20:19:33 +0200 |
---|---|---|
committer | Andrzej Giniewicz | 2015-07-07 20:19:33 +0200 |
commit | 5585e390aa2488d1c3e6e98f78e3c0131799a98a (patch) | |
tree | 183653341256655a63de3fc34b370089df7b32d3 | |
download | aur-5585e390aa2488d1c3e6e98f78e3c0131799a98a.tar.gz |
Initiam import
-rw-r--r-- | .SRCINFO | 21 | ||||
-rw-r--r-- | PKGBUILD | 36 | ||||
-rw-r--r-- | languagetool.patch | 36 | ||||
-rw-r--r-- | license.txt | 79 | ||||
-rw-r--r-- | vimdoc.install | 14 |
5 files changed, 186 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f80360d0e2fe --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,21 @@ +pkgbase = vim-languagetool + pkgdesc = Grammar checker for English, French, German (etc.) in Vim + pkgver = 1.28 + pkgrel = 1 + url = http://www.vim.org/scripts/script.php?script_id=3223 + install = vimdoc.install + arch = any + groups = vim-plugins + license = custom + makedepends = unzip + depends = vim + depends = languagetool + source = LanguageTool.zip::http://www.vim.org/scripts/download_script.php?src_id=21514 + source = languagetool.patch + source = license.txt + md5sums = 640007d33b5e04e2e94c5ab2d8595f58 + md5sums = d3571275436ba49afd5693c89dff001b + md5sums = f49a1270c8ead84829517d3a625e1d83 + +pkgname = vim-languagetool + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..87ff0ecbb170 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +#Maintainer: giniu < gginiu@gmail.com > + +pkgname=vim-languagetool +pkgver=1.28 +_scriptid=3223 +_srcid=21514 +pkgrel=1 +pkgdesc="Grammar checker for English, French, German (etc.) in Vim" +arch=(any) +url="http://www.vim.org/scripts/script.php?script_id=${_scriptid}" +license=('custom') +depends=('vim' 'languagetool') +makedepends=('unzip') +groups=('vim-plugins') +install=vimdoc.install + +source=(LanguageTool.zip::http://www.vim.org/scripts/download_script.php?src_id=${_srcid} + languagetool.patch license.txt) +md5sums=('640007d33b5e04e2e94c5ab2d8595f58' + 'd3571275436ba49afd5693c89dff001b' + 'f49a1270c8ead84829517d3a625e1d83') + +build() { + cd "${srcdir}" + + patch -p0 < languagetool.patch +} + +package() { + cd "${srcdir}" + + install -Dm755 doc/LanguageTool.txt "${pkgdir}"/usr/share/vim/vimfiles/doc/LanguageTool.txt + install -Dm755 plugin/LanguageTool.vim "${pkgdir}"/usr/share/vim/vimfiles/plugin/LanguageTool.vim + install -Dm755 license.txt "${pkgdir}"/usr/share/licenses/${pkgname}/license.txt +} + diff --git a/languagetool.patch b/languagetool.patch new file mode 100644 index 000000000000..8ac62f6ba6b0 --- /dev/null +++ b/languagetool.patch @@ -0,0 +1,36 @@ +--- plugin/LanguageTool.vim.orig 2014-05-01 16:10:07.000000000 +0200 ++++ plugin/LanguageTool.vim 2014-05-01 16:11:27.000000000 +0200 +@@ -156,23 +156,6 @@ + endif + endif + endif +- +- let s:languagetool_jar = exists("g:languagetool_jar") +- \ ? g:languagetool_jar +- \ : $HOME . '/languagetool-2.4.1/languagetool-commandline.jar' +- +- if !filereadable(s:languagetool_jar) +- " Hmmm, can't find the jar file. Try again with expand() in case user +- " set it up as: let g:languagetool_jar = '$HOME/.../languagetool-commandline.jar' +- let l:languagetool_jar = expand(s:languagetool_jar) +- if !filereadable(expand(l:languagetool_jar)) +- echomsg "LanguageTool cannot be found at: " . s:languagetool_jar +- echomsg "You need to install LanguageTool and/or set up g:languagetool_jar" +- echomsg "to indicate the location of the languagetool-commandline.jar file." +- return -1 +- endif +- let s:languagetool_jar = l:languagetool_jar +- endif + return 0 + endfunction + +@@ -236,8 +219,7 @@ + let l:range = a:line1 . ',' . a:line2 + silent exe l:range . 'w!' . l:tmpfilename + +- let l:languagetool_cmd = 'java' +- \ . ' -jar ' . s:languagetool_jar ++ let l:languagetool_cmd = 'languagetool' + \ . ' -c ' . s:languagetool_encoding + \ . ' -d ' . s:languagetool_disable_rules + \ . ' -l ' . s:languagetool_lang diff --git a/license.txt b/license.txt new file mode 100644 index 000000000000..48ec986c981e --- /dev/null +++ b/license.txt @@ -0,0 +1,79 @@ +LANGUAGETOOL.VIM LICENSE + +I) There are no restrictions on distributing unmodified copies of LanguageTool.vim except + that they must include this license text. You can also distribute + unmodified parts of LanguageTool.vim, likewise unrestricted except that they must + include this license text. You are also allowed to include executables + that you made from the unmodified LanguageTool.vim sources, plus your own usage + examples and LanguageTool.vim scripts. + +II) It is allowed to distribute a modified (or extended) version of LanguageTool.vim, + including executables and/or source code, when the following four + conditions are met: + 1) This license text must be included unmodified. + 2) The modified LanguageTool.vim must be distributed in one of the following five ways: + a) If you make changes to LanguageTool.vim yourself, you must clearly describe in + the distribution how to contact you. When the maintainer asks you + (in any way) for a copy of the modified LanguageTool.vim you distributed, you + must make your changes, including source code, available to the + maintainer without fee. The maintainer reserves the right to + include your changes in the official version of LanguageTool.vim. What the + maintainer will do with your changes and under what license they + will be distributed is negotiable. If there has been no negotiation + then this license, or a later version, also applies to your changes. + The current maintainer is Dominique Pellé <dominique.pelle@gmail.com>. If this + changes it will be announced in appropriate places (most likely + http://www.vim.org/scripts/script.php?script_id=3223). When it is completely + impossible to contact the maintainer, the obligation to send him + your changes ceases. Once the maintainer has confirmed that he has + received your changes they will not have to be sent again. + b) If you have received a modified LanguageTool.vim that was distributed as + mentioned under a) you are allowed to further distribute it + unmodified, as mentioned at I). If you make additional changes the + text under a) applies to those changes. + c) Provide all the changes, including source code, with every copy of + the modified LanguageTool.vim you distribute. This may be done in the form of a + context diff. You can choose what license to use for new code you + add. The changes and their license must not restrict others from + making their own changes to the official version of LanguageTool.vim. + d) When you have a modified LanguageTool.vim which includes changes as mentioned + under c), you can distribute it without the source code for the + changes if the following three conditions are met: + - The license that applies to the changes permits you to distribute + the changes to the LanguageTool.vim maintainer without fee or restriction, and + permits the LanguageTool.vim maintainer to include the changes in the official + version of LanguageTool.vim without fee or restriction. + - You keep the changes for at least three years after last + distributing the corresponding modified LanguageTool.vim. When the maintainer + or someone who you distributed the modified LanguageTool.vim to asks you (in + any way) for the changes within this period, you must make them + available to him. + - You clearly describe in the distribution how to contact you. This + contact information must remain valid for at least three years + after last distributing the corresponding modified LanguageTool.vim, or as long + as possible. + e) When the GNU General Public License (GPL) applies to the changes, + you can distribute the modified LanguageTool.vim under the GNU GPL version 2 or + any later version. + 3) A message must be added, at least in the output of the ":help LanguageTool" + command, such that the user of the modified LanguageTool.vim + is able to see that it was modified. When distributing as mentioned + under 2)e) adding the message is only required for as far as this does + not conflict with the license used for the changes. + 4) The contact information as required under 2)a) and 2)d) must not be + removed or changed, except that the person himself can make + corrections. + +III) If you distribute a modified version of LanguageTool.vim, you are encouraged to use + the LanguageTool.vim license for your changes and make them available to the + maintainer, including the source code. The preferred way to do this is + by e-mail or by uploading the files to a server and e-mailing the URL. + If the number of changes is small (e.g., a modified Makefile) e-mailing a + context diff will do. The e-mail address to be used is + <dominique.pelle@gmail.com> + +IV) It is not allowed to remove this license from the distribution of the LanguageTool.vim + sources, parts of it or from a modified version. You may use this + license for previous LanguageTool.vim releases instead of the license that they came + with, at your option. + diff --git a/vimdoc.install b/vimdoc.install new file mode 100644 index 000000000000..4bf6316dd78c --- /dev/null +++ b/vimdoc.install @@ -0,0 +1,14 @@ +post_install() { + 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_upgrade() { + post_install $1 +} + +post_remove() { + post_install +} |