LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File libreoffice-languagetool.spec of Package libreoffice-languagetool (Project LibreOffice:Stable)

#
# spec file for package libreoffice-languagetool
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


###################################################################
## DO NOT EDIT THIS SPEC FILE
## Generated by:
## perl lo-languagetool-gen-spec libreoffice-languagetool.spec.in lo-languagetool-data
###################################################################
Name:           libreoffice-languagetool
Version:        2.0
Release:        0
#!BuildIgnore:  libreoffice
%define	        ooo_prefix      %{_libdir}
%define	        ooo_home        libreoffice
# ignore cs because of an unlclear license; also unsupported
# ignore sk unknown license; almost empty dictionary
# ignore uk (unsupported)
%define	        langtool_langs  ast br ca da de en es fr gl it km pl nl ro ru sk sv tl zh
Summary:        Language Checker for LibreOffice
License:        Apache-2.0 and BSD-2-Clause and BSD-3-Clause and BSD-4-Clause and CC-BY-3.0 and CC-BY-SA-1.0 and CC-BY-SA-2.0 and CC-BY-SA-3.0 and CPL-1.0 and EPL-1.0 and GPL-2.0 and GPL-2.0+ and GPL-3.0 and LGPL-2.0+ and LGPL-2.1 and LGPL-2.1+ and LGPL-3.0 and MPL-1.1 and MPL-2.0 and SUSE-Public-Domain
Group:          Productivity/Office/Suite
Url:            http://www.languagetool.org/
# svn co https://languagetool.svn.sourceforge.net/svnroot/languagetool languagetool
# cd tags/V_1_4/JLanguageTool
# rm -rf src/main/resources/org/languagetool/resource/be/*  because of unclear licese
# rm -rf src/main/resources/org/languagetool/resource/cs/*  because of unclear licese; also it is not longer supported (only a bachelor's thesis)
# rm -rf src/main/resources/org/languagetool/resource/el/*  because of unclear licese
# rm -rf src/main/resources/org/languagetool/resource/eo/*  because of unclear licese
# rm -rf src/main/resources/org/languagetool/resource/is/*  unused
# rm -rf src/main/resources/org/languagetool/resource/lt/*  unused
# rm -rf src/main/resources/org/languagetool/resource/ml/*  because of unclear licese
# rm -rf src/main/resources/org/languagetool/resource/pt/*  because of unclear licese
# rm -rf src/main/resources/org/languagetool/resource/sl/*  because of unclear licese and looks pretty incomplete
# rm -rf src/main/resources/org/languagetool/resource/uk/*  because of unclear licese
# rm -rf libs/ooo
#    + we use these jars from our libreoffice packages
# rm -rf libs/native-lib
#    + we want to use the system libs; also the sources are missing
# rm -f libs/jna.jar           because of missing source code; needed only for web stuff
# rm -f libs/junit-4.7.jar     because of missing source code and is unused
# rm -f libs/swc-*.jar         because of missing source code; unused???
# FIXME: wanted to remove libs/commons-logging-1.1.1.jar but it was not available on SLED11
#        it is small file (60kB) => it is not worth doing special hacks for SLED11 and other distros
# NOTE: lucene-analyzers-common-4.0.0-BETA.jar, uses the Apache License, v2.0, see the jar file, see http://grepcode.com/snapshot/repo1.maven.org/maven2/org.apache.lucene/lucene-analyzers-common/4.0.0, and http://lucene.apache.org/
# NOTE: lucene-sandbox-4.0.0-BETA.jar, uses the Apache License, v2.0, see the jar file, see http://grepcode.com/snapshot/repo1.maven.org/maven2/org.apache.lucene/lucene-sandbox/4.0.0, and http://lucene.apache.org/
# NOTE: randomizedtesting-runner-1.6.0.jar, uses the Apache License, v2.0, see the jar file, http://grepcode.com/snapshot/repo1.maven.org/maven2/com.carrotsearch.randomizedtesting/randomizedtesting-runner/1.6.0, and http://labs.carrotsearch.com/randomizedtesting.html
# NOTE: jakarta-regexp-1.4.jar uses the Apache License, v2.0, see http://archive.apache.org/dist/jakarta/regexp/jakarta-regexp-1.4.tar.gz
Source0:        languagetool-%{version}.tar.xz
# the following sources are needed to fulfill the license terms
# http://www.versioneye.com/package/com~google~code--lucene-gosen-ipadic
Source1:        lucene-gosen-ipadic-1.2.1-sources.jar
# http://sourceforge.net/projects/junit/files/junit/4.10/
Source2:        junit-4.10-src.jar
# http://pt.sourceforge.jp/projects/sfnet_plog4u/downloads/Wikipedia%20Syntax%20API/wp_api.3.0.3/bliki.3.0.3.zip/
Source3:        bliki-3.0.3.tar.xz
# http://grepcode.com/snapshot/repo1.maven.org/maven2/net.java.dev.jna/jna/3.4.0
Source4:        jna-3.4.0-sources.jar
# swc-*.jar sources found tat http://cs.nyu.edu/rgrimm/xtc/
Source5:        xtc-core-1.15.0.zip
# helper files to generate the spec file
Source100:      libreoffice-languagetool.spec.in
Source101:      lo-languagetool-data
Source102:      lo-languagetool-gen-spec
# PATCH-FIX-OPENSUSE ignore dictionaries that are not installed; it allows to package them separately
Patch0:         languagetool-2.0-package-dicts-separately.patch
# PATCH-FIX-OPENSUSE use the system libreoffice jars
Patch1:         languagetool-2.0-system-lo-jars.patch
# do not use the broken help; LO complains about it when registering extensions
# FIXME: the right fix is to compile the help and produce the .db_, .ht_, and other files
Patch2:         languagetool-2.0-no-broken-help.patch
# LO does not know some language variants and shows ugly entries when editing "Tools/Options/Langauge Settings/Writing Aids/Available Language Modules"
Patch3:         languagetool-2.0-remove-problematic-language-variants.patch
BuildRequires:  ant
BuildRequires:  java-devel
BuildRequires:  libreoffice >= 3.5
BuildRequires:  unzip
BuildRequires:  xz
# dependencies for post install scripts
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       jre >= 1.6
Requires:       libreoffice >= 3.5
# the Czech stuff newer worked; the package was created by mistake
Obsoletes:      OpenOffice_org-LanguageTool-cs < 0.9.9
# compat stuff
Provides:       OpenOffice_org-LanguageTool = %{version}
Obsoletes:      OpenOffice_org-LanguageTool <= %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
This package provides the language checker extension for
LibreOffice. It allows to detect errors that a simple spell checker
cannot detect, e.g. mixing up there/their, no/now etc. It can also
detect some grammar mistakes. It does not include spell checking.

The language checker uses special dictionaries that are provided by the
libreoffice-languagetool-<lang> packages.

%package -n libreoffice-languagetool-ast
Summary:        Asturian Dictionary for LibreOffice Language Tool
License:        GPL-3.0
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:ast)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-ast = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-ast <= %{version}

%description -n libreoffice-languagetool-ast
The Asturian dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-br
Summary:        Breton Dictionary for LibreOffice Language Tool
License:        GPL-3.0 and LGPL-3.0
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:br)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-br = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-br <= %{version}

%description -n libreoffice-languagetool-br
The Breton dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-ca
Summary:        Catalan Dictionary for LibreOffice Language Tool
License:        GPL-3.0 and LGPL-3.0
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:ca)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-ca = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-ca <= %{version}

%description -n libreoffice-languagetool-ca
The Catalan dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-da
Summary:        Danish Dictionary for LibreOffice Language Tool
License:        GPL-2.0 and LGPL-2.1 and MPL-1.1
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:da)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-da = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-da <= %{version}

%description -n libreoffice-languagetool-da
The Danish dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-de
Summary:        German Dictionary for LibreOffice Language Tool
License:        CC-BY-SA-3.0 and GPL-2.0 and GPL-3.0 and BSD-2-Clause
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:de)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-de = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-de <= %{version}

%description -n libreoffice-languagetool-de
The German dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-en
Summary:        English Dictionary for LibreOffice Language Tool
License:        BSD-3-Clause and BSD-4-Clause and GPL-2.0 and LGPL-2.1 and SUSE-Public-Domain
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:en)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-en = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-en <= %{version}

%description -n libreoffice-languagetool-en
The English dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-es
Summary:        Spanish Dictionary for LibreOffice Language Tool
License:        GPL-3.0 and LGPL-3.0
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:es)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-es = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-es <= %{version}

%description -n libreoffice-languagetool-es
The Spanish dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-fr
Summary:        French Dictionary for LibreOffice Language Tool
License:        MPL-2.0
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:fr)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-fr = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-fr <= %{version}

%description -n libreoffice-languagetool-fr
The French dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-gl
Summary:        Galician Dictionary for LibreOffice Language Tool
License:        GPL-2.0 and GPL-3.0
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:gl)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-gl = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-gl <= %{version}

%description -n libreoffice-languagetool-gl
The Galician dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-it
Summary:        Italian Dictionary for LibreOffice Language Tool
License:        CC-BY-SA-2.0 and LGPL-2.0+ and GPL-3.0
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:it)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-it = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-it <= %{version}

%description -n libreoffice-languagetool-it
The Italian dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-km
Summary:        Khmer Dictionary for LibreOffice Language Tool
License:        BSD-2-Clause and CC-BY-SA-3.0
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:km)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-km = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-km <= %{version}

%description -n libreoffice-languagetool-km
The Khmer dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-nl
Summary:        Dutch Dictionary for LibreOffice Language Tool
License:        BSD-3-Clause and CC-BY-3.0 and LGPL-2.1+
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:nl)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-nl = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-nl <= %{version}

%description -n libreoffice-languagetool-nl
The Dutch dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-pl
Summary:        Polish Dictionary for LibreOffice Language Tool
License:        BSD-2-Clause and CC-BY-SA-1.0 and GPL-3.0 and LGPL-3.0 and MPL-2.0
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:pl)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-pl = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-pl <= %{version}

%description -n libreoffice-languagetool-pl
The Polish dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-ro
Summary:        Romanian Dictionary for LibreOffice Language Tool
License:        GPL-2.0 and LGPL-2.1 and LGPL-3.0 and MPL-1.1
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:ro)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-ro = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-ro <= %{version}

%description -n libreoffice-languagetool-ro
The Romanian dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-ru
Summary:        Russian Dictionary for LibreOffice Language Tool
License:        LGPL-3.0
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:ru)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-ru = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-ru <= %{version}

%description -n libreoffice-languagetool-ru
The Russian dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-sk
Summary:        Slovak Dictionary for LibreOffice Language Tool
License:        GPL-2.0 and LGPL-2.1 and LGPL-3.0 and MPL-1.1
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:sk)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-sk = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-sk <= %{version}

%description -n libreoffice-languagetool-sk
The Slovak dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-sv
Summary:        Swedish Dictionary for LibreOffice Language Tool
License:        GPL-2.0+ and LGPL-2.1+ and MPL-1.1
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:sv)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-sv = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-sv <= %{version}

%description -n libreoffice-languagetool-sv
The Swedish dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-tl
Summary:        Tagalog Dictionary for LibreOffice Language Tool
License:        GPL-2.0+ and LGPL-3.0
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:tl)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-tl = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-tl <= %{version}

%description -n libreoffice-languagetool-tl
The Tagalog dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.

%package -n libreoffice-languagetool-zh
Summary:        Chinese Dictionary for LibreOffice Language Tool
License:        Apache-2.0
Group:          Productivity/Office/Dictionary
%if 0%{?suse_version} > 01120
Requires(post):   coreutils
Requires(post):   grep
Requires(post):   libreoffice >= 3.5
Requires(postun): coreutils
Requires(postun): grep
Requires(postun): libreoffice >= 3.5
%endif
%if 0%{?suse_version} && 0%{?suse_version} <= 01120
PreReq:         coreutils
PreReq:         grep
PreReq:         libreoffice >= 3.5
%endif
Requires:       libreoffice-languagetool = %{version}
Provides:       locale(libreoffice-languagetool:zh)
# compat stuff
Provides:       OpenOffice_org-LanguageTool-zh = %{version}
Obsoletes:      OpenOffice_org-LanguageTool-zh <= %{version}

%description -n libreoffice-languagetool-zh
The Chinese dictionary that can be used to check grammar and other more
complex mistakes using the LibreOffice language tool extension.


%prep
%setup -q -n languagetool-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
cp libs/README libs/README-libs.txt

%build
ant -Dsys.lo.dir=%{_libdir}/%ooo_home dist

%install
# skip the check for java bytecode version; it uses some jar files prebuilt with JRE-1.6
# can't be complied with JDK-1.5; the dependency on JRE-1.5 is solved at runtime
export NO_BRP_CHECK_BYTECODE_VERSION="true"
# main package
oxt=$(pwd)/dist/LanguageTool-%{version}.oxt
mkdir -p %{buildroot}%{_datadir}/%ooo_home/share/extensions/languagetool-%{version}
cd %{buildroot}%{_datadir}/%ooo_home/share/extensions/languagetool-%{version}
unzip "$oxt"
cd - >/dev/null 2>&1
# we need to create architecture dependent symlinks even for the main package
# create file list for link-to-ooo-home script
find %{buildroot}%{_datadir}/%ooo_home/share/extensions/languagetool-%{version}/ -type d \
     -printf "%%%%dir %{_datadir}/%ooo_home/share/extensions/languagetool-%{version}/%%P\n" \
     >files-langtool.txt
find %{buildroot}%{_datadir}/%ooo_home/share/extensions/languagetool-%{version}/ -type f \
     -printf "%{_datadir}/%ooo_home/share/extensions/languagetool-%{version}/%%P\n" \
     >>files-langtool.txt
echo "%{_datadir}/%ooo_home/files-langtool.txt" >>files-langtool.txt
# dictionaries
lt_resourcedir_pattern="\/usr\/share\/%ooo_home\/share\/extensions\/languagetool-%version\/org\/languagetool\/resource"
for lang in %langtool_langs ; do
    dict_pattern="$lt_resourcedir_pattern\/$lang\/.*\(\.dict\|\.info\|\.dct\)"
    grep "$dict_pattern" files-langtool.txt >files-langtool-$lang.txt
    grep -v "$dict_pattern" files-langtool.txt >files-langtool.txt.new
    mv files-langtool.txt.new files-langtool.txt
    # add top level diretories which have to be removed on unistall
    echo "%dir %_datadir/%ooo_home/share/extensions/languagetool-%version"                                 >>files-langtool-$lang.txt
    echo "%dir %_datadir/%ooo_home/share/extensions/languagetool-%version/org"                             >>files-langtool-$lang.txt
    echo "%dir %_datadir/%ooo_home/share/extensions/languagetool-%version/org/languagetool"                >>files-langtool-$lang.txt
    echo "%dir %_datadir/%ooo_home/share/extensions/languagetool-%version/org/languagetool/resource"       >>files-langtool-$lang.txt
    echo "%dir %_datadir/%ooo_home/share/extensions/languagetool-%version/org/languagetool/resource/$lang" >>files-langtool-$lang.txt
    # copy the finalized lang filelist for symlinking
    cp files-langtool-$lang.txt %{buildroot}%{_datadir}/%ooo_home
    echo "%{_datadir}/%ooo_home/files-langtool-$lang.txt" >>files-langtool-$lang.txt
    # common README.txt
    echo "%doc README.txt" >>files-langtool-$lang.txt
done
# copy the finalized main filelist for symlinking
cp files-langtool.txt %{buildroot}%{_datadir}/%ooo_home
echo "%{_datadir}/%ooo_home/files-langtool.txt" >>files-langtool.txt

%clean
rm -rf %{buildroot}

%files -f files-langtool.txt
%defattr(-,root,root)
%doc CHANGES.txt COPYING.txt README.txt libs/*.txt libs/build/junit-license.txt
%dir %{_datadir}/%ooo_home
%dir %{_datadir}/%ooo_home/share
%dir %{_datadir}/%ooo_home/share/extensions

%pre
# the initial libreoffice packages symlinked the whole directory a wrong way (bnc#677354)
home_path="%ooo_home/share/extensions/languagetool-%{version}"
for link in "/usr/lib/$home_path" "/usr/lib64/$home_path" ; do
    test -L "$link" && rm "$link" || true
done

%post
# link to the directory where the extenisons is automatically detected
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool.txt || true

%preun
# we will need to remove symlinks that are not longer valid
cp %{_datadir}/%ooo_home/files-langtool.txt %{_datadir}/%ooo_home/files-langtool.txt.postun || true

%postun
# remove symlinks that are not longer valid
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool.txt.postun || true

%posttrans
# the previous versions did not remove the symlinks correctly when updating
for libdir in "%{_prefix}/lib" "%{_prefix}/lib64" ; do
    for extension_dir in "%ooo_home/share/extensions/languagetool-1.2" \
                         "%ooo_home/share/extensions/languagetool-1.4" ; do
        test -d "$libdir/$extension_dir" && rm -rf "$libdir/$extension_dir" || true
    done
done

# ast
%posttrans -n libreoffice-languagetool-ast
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-ast.txt || true

%preun -n libreoffice-languagetool-ast
cp %{_datadir}/%ooo_home/files-langtool-ast.txt %{_datadir}/%ooo_home/files-langtool-ast.txt.postun || true

%postun -n libreoffice-languagetool-ast
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-ast.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-ast.txt.postun 2>/dev/null

# br
%posttrans -n libreoffice-languagetool-br
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-br.txt || true

%preun -n libreoffice-languagetool-br
cp %{_datadir}/%ooo_home/files-langtool-br.txt %{_datadir}/%ooo_home/files-langtool-br.txt.postun || true

%postun -n libreoffice-languagetool-br
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-br.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-br.txt.postun 2>/dev/null

# ca
%posttrans -n libreoffice-languagetool-ca
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-ca.txt || true

%preun -n libreoffice-languagetool-ca
cp %{_datadir}/%ooo_home/files-langtool-ca.txt %{_datadir}/%ooo_home/files-langtool-ca.txt.postun || true

%postun -n libreoffice-languagetool-ca
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-ca.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-ca.txt.postun 2>/dev/null

# da
%posttrans -n libreoffice-languagetool-da
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-da.txt || true

%preun -n libreoffice-languagetool-da
cp %{_datadir}/%ooo_home/files-langtool-da.txt %{_datadir}/%ooo_home/files-langtool-da.txt.postun || true

%postun -n libreoffice-languagetool-da
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-da.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-da.txt.postun 2>/dev/null

# de
%posttrans -n libreoffice-languagetool-de
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-de.txt || true

%preun -n libreoffice-languagetool-de
cp %{_datadir}/%ooo_home/files-langtool-de.txt %{_datadir}/%ooo_home/files-langtool-de.txt.postun || true

%postun -n libreoffice-languagetool-de
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-de.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-de.txt.postun 2>/dev/null

# en
%posttrans -n libreoffice-languagetool-en
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-en.txt || true

%preun -n libreoffice-languagetool-en
cp %{_datadir}/%ooo_home/files-langtool-en.txt %{_datadir}/%ooo_home/files-langtool-en.txt.postun || true

%postun -n libreoffice-languagetool-en
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-en.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-en.txt.postun 2>/dev/null

# es
%posttrans -n libreoffice-languagetool-es
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-es.txt || true

%preun -n libreoffice-languagetool-es
cp %{_datadir}/%ooo_home/files-langtool-es.txt %{_datadir}/%ooo_home/files-langtool-es.txt.postun || true

%postun -n libreoffice-languagetool-es
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-es.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-es.txt.postun 2>/dev/null

# fr
%posttrans -n libreoffice-languagetool-fr
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-fr.txt || true

%preun -n libreoffice-languagetool-fr
cp %{_datadir}/%ooo_home/files-langtool-fr.txt %{_datadir}/%ooo_home/files-langtool-fr.txt.postun || true

%postun -n libreoffice-languagetool-fr
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-fr.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-fr.txt.postun 2>/dev/null

# gl
%posttrans -n libreoffice-languagetool-gl
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-gl.txt || true

%preun -n libreoffice-languagetool-gl
cp %{_datadir}/%ooo_home/files-langtool-gl.txt %{_datadir}/%ooo_home/files-langtool-gl.txt.postun || true

%postun -n libreoffice-languagetool-gl
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-gl.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-gl.txt.postun 2>/dev/null

# it
%posttrans -n libreoffice-languagetool-it
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-it.txt || true

%preun -n libreoffice-languagetool-it
cp %{_datadir}/%ooo_home/files-langtool-it.txt %{_datadir}/%ooo_home/files-langtool-it.txt.postun || true

%postun -n libreoffice-languagetool-it
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-it.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-it.txt.postun 2>/dev/null

# km
%posttrans -n libreoffice-languagetool-km
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-km.txt || true

%preun -n libreoffice-languagetool-km
cp %{_datadir}/%ooo_home/files-langtool-km.txt %{_datadir}/%ooo_home/files-langtool-km.txt.postun || true

%postun -n libreoffice-languagetool-km
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-km.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-km.txt.postun 2>/dev/null

# nl
%posttrans -n libreoffice-languagetool-nl
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-nl.txt || true

%preun -n libreoffice-languagetool-nl
cp %{_datadir}/%ooo_home/files-langtool-nl.txt %{_datadir}/%ooo_home/files-langtool-nl.txt.postun || true

%postun -n libreoffice-languagetool-nl
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-nl.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-nl.txt.postun 2>/dev/null

# pl
%posttrans -n libreoffice-languagetool-pl
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-pl.txt || true

%preun -n libreoffice-languagetool-pl
cp %{_datadir}/%ooo_home/files-langtool-pl.txt %{_datadir}/%ooo_home/files-langtool-pl.txt.postun || true

%postun -n libreoffice-languagetool-pl
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-pl.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-pl.txt.postun 2>/dev/null

# ro
%posttrans -n libreoffice-languagetool-ro
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-ro.txt || true

%preun -n libreoffice-languagetool-ro
cp %{_datadir}/%ooo_home/files-langtool-ro.txt %{_datadir}/%ooo_home/files-langtool-ro.txt.postun || true

%postun -n libreoffice-languagetool-ro
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-ro.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-ro.txt.postun 2>/dev/null

# ru
%posttrans -n libreoffice-languagetool-ru
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-ru.txt || true

%preun -n libreoffice-languagetool-ru
cp %{_datadir}/%ooo_home/files-langtool-ru.txt %{_datadir}/%ooo_home/files-langtool-ru.txt.postun || true

%postun -n libreoffice-languagetool-ru
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-ru.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-ru.txt.postun 2>/dev/null

# sk
%posttrans -n libreoffice-languagetool-sk
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-sk.txt || true

%preun -n libreoffice-languagetool-sk
cp %{_datadir}/%ooo_home/files-langtool-sk.txt %{_datadir}/%ooo_home/files-langtool-sk.txt.postun || true

%postun -n libreoffice-languagetool-sk
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-sk.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-sk.txt.postun 2>/dev/null

# sv
%posttrans -n libreoffice-languagetool-sv
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-sv.txt || true

%preun -n libreoffice-languagetool-sv
cp %{_datadir}/%ooo_home/files-langtool-sv.txt %{_datadir}/%ooo_home/files-langtool-sv.txt.postun || true

%postun -n libreoffice-languagetool-sv
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-sv.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-sv.txt.postun 2>/dev/null

# tl
%posttrans -n libreoffice-languagetool-tl
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-tl.txt || true

%preun -n libreoffice-languagetool-tl
cp %{_datadir}/%ooo_home/files-langtool-tl.txt %{_datadir}/%ooo_home/files-langtool-tl.txt.postun || true

%postun -n libreoffice-languagetool-tl
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-tl.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-tl.txt.postun 2>/dev/null

# zh
%posttrans -n libreoffice-languagetool-zh
%{_datadir}/%ooo_home/link-to-ooo-home %{_datadir}/%ooo_home/files-langtool-zh.txt || true

%preun -n libreoffice-languagetool-zh
cp %{_datadir}/%ooo_home/files-langtool-zh.txt %{_datadir}/%ooo_home/files-langtool-zh.txt.postun || true

%postun -n libreoffice-languagetool-zh
unlink_options=--unlink
grep -q "unlink-dirs" %{_datadir}/%ooo_home/link-to-ooo-home && unlink_options="$unlink_options --unlink-dirs" || true
%{_datadir}/%ooo_home/link-to-ooo-home $unlink_options %{_datadir}/%ooo_home/files-langtool-zh.txt.postun || true
rm -f %{_datadir}/%ooo_home/files-langtool-zh.txt.postun 2>/dev/null


%files -f files-langtool-ast.txt -n libreoffice-languagetool-ast
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/ast/hunspell/LIC*.txt

%files -f files-langtool-br.txt -n libreoffice-languagetool-br
%defattr(-,root,root)

%files -f files-langtool-ca.txt -n libreoffice-languagetool-ca
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/ca/README

%files -f files-langtool-da.txt -n libreoffice-languagetool-da
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/da/hunspell/README*.txt

%files -f files-langtool-de.txt -n libreoffice-languagetool-de
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/de/hunspell/{COPYING*.txt,README*.txt}

%files -f files-langtool-en.txt -n libreoffice-languagetool-en
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/en/{12dicts-readme.html,agid-readme.txt,errors.txt,pos-readme.txt,hunspell/README*.txt,hunspell/license.txt}

%files -f files-langtool-es.txt -n libreoffice-languagetool-es
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/es/{README*,hunspell/README*.txt}

%files -f files-langtool-fr.txt -n libreoffice-languagetool-fr
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/fr/{README*.txt,hunspell/README*.txt}

%files -f files-langtool-gl.txt -n libreoffice-languagetool-gl
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/gl/{LICENSE,README,hunspell/LICENSE*.txt,hunspell/README*.txt}

%files -f files-langtool-it.txt -n libreoffice-languagetool-it
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/it/{readme-morph-it.txt,hunspell/README*.txt}

%files -f files-langtool-km.txt -n libreoffice-languagetool-km
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/km/README*.txt

%files -f files-langtool-nl.txt -n libreoffice-languagetool-nl
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/nl/hunspell/{README*.txt,license*.txt}

%files -f files-langtool-pl.txt -n libreoffice-languagetool-pl
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/pl/hunspell/README*.txt

%files -f files-langtool-ro.txt -n libreoffice-languagetool-ro
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/ro/hunspell/{COPYING*,README*.txt}

%files -f files-langtool-ru.txt -n libreoffice-languagetool-ru
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/ru/hunspell/README*.txt

%files -f files-langtool-sk.txt -n libreoffice-languagetool-sk
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/sk/{README,hunspell/README*.txt}

%files -f files-langtool-sv.txt -n libreoffice-languagetool-sv
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/sv/hunspell/LICENSE*.txt

%files -f files-langtool-tl.txt -n libreoffice-languagetool-tl
%defattr(-,root,root)
%doc src/main/resources/org/languagetool/resource/tl/{README*.txt,hunspell/README*.txt}

%files -f files-langtool-zh.txt -n libreoffice-languagetool-zh
%defattr(-,root,root)


%changelog