Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release-src > by-pkgid > 9e7acea0e742f6cc4257ce87519c4e0f > files > 13

jortho-1.0-1.mga5.src.rpm

Name:           jortho
Version:        1.0
Release:        %mkrel 1
Summary:        A spell checker for Java
Group:          Development/Java
License:        GPLv2+
URL:            http://jortho.sourceforge.net/
Source0:        http://downloads.sourceforge.net/project/jortho/JOrtho%20Library/1.0/JOrtho_%{version}.zip
Source1:        jortho-template.pom
Source2:        http://downloads.sourceforge.net/project/jortho/Dictionaries/2013-03/dictionary_en_2013_03.zip
Source3:        http://downloads.sourceforge.net/project/jortho/Dictionaries/2013-03/dictionary_de_2013_03.zip
Source4:        http://downloads.sourceforge.net/project/jortho/Dictionaries/2013-03/dictionary_fr_2013_03.zip
Source5:        http://downloads.sourceforge.net/project/jortho/Dictionaries/2013-03/dictionary_es_2013_03.zip
Source6:        http://downloads.sourceforge.net/project/jortho/Dictionaries/2013-03/dictionary_ar_2013_03.zip
Source7:        http://downloads.sourceforge.net/project/jortho/Dictionaries/2013-03/dictionary_nl_2013_03.zip
Source8:        http://downloads.sourceforge.net/project/jortho/Dictionaries/2013-03/dictionary_pl_2013_03.zip
Source9:        http://downloads.sourceforge.net/project/jortho/Dictionaries/2013-03/dictionary_ru_2013_03.zip
Source10:       http://downloads.sourceforge.net/project/jortho/Dictionaries/2013-03/dictionary_it_2013_03.zip

Patch0:         0001-Load-data-from-system-wide-location.patch

BuildArch:      noarch

BuildRequires:  maven-local

%description
JOrtho is a spell checker for Java. The library works with any
JTextComponent from the Swing framework and checks as you type.
The dictionary is based on the free Wiktionary.org, and is
applicable for multiple languages. You can select the
spell checking language via a context menu. The features
of JOrtho are the highlighting of potentially wrongly spelled words,
a context menu with suggestions for correct forms of the word
and a context menu with option to change the checking language.
At the moment there are eight languages for spell checking available:
English, German, French, Spanish, Italian, Russian, Polish, and Arabic.

%package        javadoc
Summary:        API documentation for %{name}
Group:          Documentation

%description    javadoc
This package contains the API documentation for %{name}.

%package        dictionary-en
Summary:        English dictionary for JOrtho
Group:          Development/Java
Requires:       %{name} = %{version}-%{release}

%description    dictionary-en
English dictionary for Jortho.

%package        dictionary-de
Summary:        German dictionary for JOrtho
Group:          Development/Java
Requires:       %{name} = %{version}-%{release}

%description    dictionary-de
German dictionary for Jortho.

%package        dictionary-ar
Summary:        Arabic dictionary for JOrtho
Group:          Development/Java
Requires:       %{name} = %{version}-%{release}

%description    dictionary-ar
Arabic dictionary for Jortho.

%package        dictionary-ru
Summary:        Russian dictionary for JOrtho
Group:          Development/Java
Requires:       %{name} = %{version}-%{release}

%description    dictionary-ru
Russian dictionary for Jortho.

%package        dictionary-pl
Summary:        Polish dictionary for JOrtho
Group:          Development/Java
Requires:       %{name} = %{version}-%{release}

%description    dictionary-pl
Polish dictionary for Jortho.

%package        dictionary-nl
Summary:        Dutch dictionary for JOrtho
Group:          Development/Java
Requires:       %{name} = %{version}-%{release}

%description    dictionary-nl
Dutch dictionary for Jortho.

%package        dictionary-es
Summary:        Spanish dictionary for JOrtho
Group:          Development/Java
Requires:       %{name} = %{version}-%{release}

%description    dictionary-es
Spanish dictionary for Jortho.

%package        dictionary-it
Summary:        Italian dictionary for JOrtho
Group:          Development/Java
Requires:       %{name} = %{version}-%{release}

%description    dictionary-it
Italian dictionary for Jortho.

%package        dictionary-fr
Summary:        French dictionary for JOrtho
Group:          Development/Java
Requires:       %{name} = %{version}-%{release}

%description    dictionary-fr
French dictionary for Jortho.

%prep
%setup -q -c

find . -name "*.jar" -delete
find . -name "*.class" -delete
find . -name "*.zip" -delete

pushd src
%patch0 -p1
popd

mkdir dicts
pushd dicts
for dict in %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %{SOURCE7} \
            %{SOURCE8} %{SOURCE9} %{SOURCE10}; do
    unzip -o "$dict"
done
popd

sed 's/@VERSION@/%{version}/g' %{SOURCE1} > pom.xml

%mvn_file : %{name}

%build
%mvn_build

%install
%mvn_install

mkdir -p %{buildroot}%{_datadir}/%{name}
install -pm 0644 src/dictionaries.cnf %{buildroot}%{_datadir}/%{name}/

pushd dicts
for dict in en de it fr ru nl pl ar es; do
    install -pm 0644 "dictionary_${dict}.ortho" %{buildroot}%{_datadir}/%{name}/
done
popd

%files -f .mfiles
%doc license.txt manual.html
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/dictionaries.cnf
%{_datadir}/%{name}/dictionary_en.ortho

%files dictionary-de
%{_datadir}/%{name}/dictionary_de.ortho

%files dictionary-ar
%{_datadir}/%{name}/dictionary_ar.ortho

%files dictionary-ru
%{_datadir}/%{name}/dictionary_ru.ortho

%files dictionary-pl
%{_datadir}/%{name}/dictionary_pl.ortho

%files dictionary-nl
%{_datadir}/%{name}/dictionary_nl.ortho

%files dictionary-es
%{_datadir}/%{name}/dictionary_es.ortho

%files dictionary-it
%{_datadir}/%{name}/dictionary_it.ortho

%files dictionary-fr
%{_datadir}/%{name}/dictionary_fr.ortho

%files javadoc -f .mfiles-javadoc
%doc license.txt


%changelog
* Thu Feb 19 2015 daviddavid <daviddavid> 1.0-1.mga5
+ Revision: 815885
- imported package jortho
- based from Fedora's package