[arch-commits] Commit in languagetool/trunk (PKGBUILD languagetool.sh)

Andrzej Giniewicz aginiewicz at nymeria.archlinux.org
Tue Apr 2 18:01:40 UTC 2013


    Date: Tuesday, April 2, 2013 @ 20:01:39
  Author: aginiewicz
Revision: 87534

upgpkg: languagetool 2.1-1

update to languagetool 2.1, added server to script

Modified:
  languagetool/trunk/PKGBUILD
  languagetool/trunk/languagetool.sh

-----------------+
 PKGBUILD        |   26 ++++++++++++--------------
 languagetool.sh |   21 +++++++++++++++++----
 2 files changed, 29 insertions(+), 18 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2013-04-02 17:43:50 UTC (rev 87533)
+++ PKGBUILD	2013-04-02 18:01:39 UTC (rev 87534)
@@ -4,7 +4,7 @@
 # Contributor: Panagiotis Papadopoulos pano_90 (AT) gmx (DOT) net
 
 pkgname=languagetool
-pkgver=2.0
+pkgver=2.1
 pkgrel=1
 pkgdesc="An open source language checker"
 arch=('any')
@@ -12,27 +12,25 @@
 license=("LGPL")
 depends=('java-runtime-headless>=6')
 makedepends=('unzip')
-optdepends=('hunspell: needed for spell checking of some languages'
-            'java-runtime: needed for the GUI version'
+optdepends=('java-runtime: needed for the GUI version'
             'libxtst: needed for the GUI version'
             'gtk2: needed for the GUI version')
-install=languagetool.install
-source=(http://www.languagetool.org/download/LanguageTool-stable.zip?$pkgver languagetool.sh)
-noextract=(LanguageTool-stable.zip?$pkgver)
-md5sums=('ca4d318fd07472e1ca46a3817dac5b74'
-         '17a63e5abaf8a0ed201137bc9569895e')
+install=$pkgname.install
+source=($pkgname-$pkgver.zip::"http://www.languagetool.org/download/LanguageTool-stable.zip?$pkgver" "$pkgname.sh")
+noextract=($pkgname-$pkgver.zip)
+md5sums=('b8a04d5f62803691b8e26882401753f7'
+         '9d3c008ad6c0e150a29ea0be8e32a7fe')
 
 package() {
   cd "$srcdir"
   install -d "$pkgdir"/usr/{bin,share/java/$pkgname}
-  unzip -q LanguageTool-stable.zip?$pkgver -d "$pkgdir"/usr/share
+  unzip -q $pkgname-$pkgver.zip -d "$pkgdir"/usr/share
   cd "$pkgdir"/usr/share/
-  mv LanguageTool $pkgname
+  mv LanguageTool-$pkgver $pkgname
   cd $pkgname
-  rm libhunspell-linux* hunspell-darwin* hunspell-win*
-  ln -s /usr/lib/libhunspell-1.3.so libhunspell-linux-x86-32.so
-  ln -s /usr/lib/libhunspell-1.3.so libhunspell-linux-x86-64.so
   mv *.jar "$pkgdir"/usr/share/java/$pkgname
-  install -m755 "$srcdir"/languagetool.sh "$pkgdir"/usr/bin/$pkgname
+  mv libs/*.jar "$pkgdir"/usr/share/java/$pkgname
+  rm -rf libs
+  install -m755 "$srcdir"/$pkgname.sh "$pkgdir"/usr/bin/$pkgname
 }
 

Modified: languagetool.sh
===================================================================
--- languagetool.sh	2013-04-02 17:43:50 UTC (rev 87533)
+++ languagetool.sh	2013-04-02 18:01:39 UTC (rev 87534)
@@ -2,11 +2,15 @@
 
 file_present=false
 asked_for_help=false
+start_server=false
 
 for arg in "$@"; do
   if [[ $arg != -* ]]; then
     file_present=true
   fi
+  if [[ $arg == --config* ]]; then
+    start_server=true
+  fi
   if [[ $arg == -h ]]; then
     asked_for_help=true
   fi
@@ -19,8 +23,10 @@
 for name in /usr/share/java/languagetool/*.jar ; do
   CP=$CP:$name
 done
-CLI_command='org.languagetool.Main'
+
+CLI_command='org.languagetool.commandline.Main'
 GUI_command='org.languagetool.gui.Main'
+SRV_command='org.languagetool.server.HTTPSServer'
 
 if $asked_for_help; then
   echo "Command-line interface (CLI) help:"
@@ -28,11 +34,18 @@
   echo
   echo "Graphical user interface (GUI) help:"
   "$JAVA_HOME/bin/java" -cp $CP $GUI_command -h | sed "s/java org.languagetool.gui.Main/languagetool/"
+  echo
+  echo "HTTPS server help:"
+  "$JAVA_HOME/bin/java" -cp $CP $SRV_command -h | sed "s/HTTPSServer/languagetool/"
 else
-  if $file_present; then
-    "$JAVA_HOME/bin/java" -cp $CP $CLI_command "$@"
+  if $start_server; then
+    "$JAVA_HOME/bin/java" -cp $CP $SRV_command "$@"
   else
-    "$JAVA_HOME/bin/java" -cp $CP $GUI_command "$@"
+    if $file_present; then
+      "$JAVA_HOME/bin/java" -cp $CP $CLI_command "$@"
+    else
+      "$JAVA_HOME/bin/java" -cp $CP $GUI_command "$@"
+    fi
   fi
 fi
 




More information about the arch-commits mailing list