myspell-dictionaries/myspell-dictionaries.spec.in

202 lines
7.1 KiB
RPMSpec
Raw Normal View History

#
# spec file for package myspell-dictionaries
#
# 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_COMMENT@
## Generate: sh update.sh
###################################################################
Name: myspell-dictionaries
Version: @VERSION@
Release: 0
Summary: A Source Package for Dictionaries Used by MySpell
License: AGPL-3.0 and BSD-2-Clause and BSD-3-Clause and BSD-4-Clause and CC-BY-SA-1.0 and CC-BY-SA-3.0 and GFDL-1.1 and GPL-2.0 and GPL-2.0+ and GPL-3.0 and GPL-3.0+ and LGPL-2.0 and LGPL-2.1 and LGPL-2.1+ and LGPL-3.0 and LGPL-3.0+ and MPL-1.1
Group: Productivity/Text/Spell
Url: http://cgit.freedesktop.org/libreoffice/dictionaries/
Source0: dictionaries.tar.xz
BuildRequires: dos2unix
BuildRequires: recode
BuildRequires: unzip
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
Obsoletes: myspell-african
Obsoletes: myspell-albanian
Obsoletes: myspell-american
Obsoletes: myspell-arabic
Obsoletes: myspell-armenian
Obsoletes: myspell-assamese
Obsoletes: myspell-asturian
Obsoletes: myspell-australian
Obsoletes: myspell-austrian
Obsoletes: myspell-belarusian
Obsoletes: myspell-bengali
Obsoletes: myspell-brazilian
Obsoletes: myspell-breton
Obsoletes: myspell-british
Obsoletes: myspell-bulgarian
Obsoletes: myspell-canadian
Obsoletes: myspell-catalan
Obsoletes: myspell-chichewa
Obsoletes: myspell-coptic
Obsoletes: myspell-croatian
Obsoletes: myspell-czech
Obsoletes: myspell-danish
Obsoletes: myspell-dutch
Obsoletes: myspell-esperanto
Obsoletes: myspell-estonian
Obsoletes: myspell-faroese
Obsoletes: myspell-french
Obsoletes: myspell-friulian
Obsoletes: myspell-gaelic-scots
Obsoletes: myspell-galician
Obsoletes: myspell-german
Obsoletes: myspell-greek
Obsoletes: myspell-gujarati
Obsoletes: myspell-haitian
Obsoletes: myspell-hebrew
Obsoletes: myspell-hindi
Obsoletes: myspell-hungarian
Obsoletes: myspell-icelandic
Obsoletes: myspell-indonese
Obsoletes: myspell-irish
Obsoletes: myspell-italian
Obsoletes: myspell-kazakh
Obsoletes: myspell-khmer
Obsoletes: myspell-kichwa
Obsoletes: myspell-kikuyu
Obsoletes: myspell-kinyarwanda
Obsoletes: myspell-kiswahili
Obsoletes: myspell-korean
Obsoletes: myspell-kurdish
Obsoletes: myspell-latin
Obsoletes: myspell-latvian
Obsoletes: myspell-lithuanian
Obsoletes: myspell-lower-sorbian
Obsoletes: myspell-macedonian
Obsoletes: myspell-maithili
Obsoletes: myspell-malagasy
Obsoletes: myspell-malay
Obsoletes: myspell-malayalam
Obsoletes: myspell-maory
Obsoletes: myspell-marathi
Obsoletes: myspell-mexican
Obsoletes: myspell-ndebele
Obsoletes: myspell-new-zealand
Obsoletes: myspell-norsk-bokmaal
Obsoletes: myspell-norsk-nynorsk
Obsoletes: myspell-nswiss
Obsoletes: myspell-occitan-lengadocian
Obsoletes: myspell-persian
Obsoletes: myspell-polish
Obsoletes: myspell-portuguese
Obsoletes: myspell-romanian
Obsoletes: myspell-russian
Obsoletes: myspell-serbian-cyrillic
Obsoletes: myspell-serbian-latin
Obsoletes: myspell-setswana
Obsoletes: myspell-sinhala
Obsoletes: myspell-slovak
Obsoletes: myspell-slovene
Obsoletes: myspell-sotho-northern
Obsoletes: myspell-south-african-english
Obsoletes: myspell-spanish
Obsoletes: myspell-spanish-argentine
Obsoletes: myspell-spanish-bolivian
Obsoletes: myspell-spanish-chilean
Obsoletes: myspell-spanish-colombian
Obsoletes: myspell-spanish-costa-rican
Obsoletes: myspell-spanish-dominican
Obsoletes: myspell-spanish-ecuadorian
Obsoletes: myspell-spanish-guatemalan
Obsoletes: myspell-spanish-honduran
Obsoletes: myspell-spanish-nicaraguan
Obsoletes: myspell-spanish-panamanian
Obsoletes: myspell-spanish-paraguayan
Obsoletes: myspell-spanish-peruvian
Obsoletes: myspell-spanish-puerto-rican
Obsoletes: myspell-spanish-salvadorean
Obsoletes: myspell-spanish-uruguayan
Obsoletes: myspell-spanish-venezuelan
Obsoletes: myspell-swati
Obsoletes: myspell-swedish
Obsoletes: myspell-swedish-finland
Obsoletes: myspell-tagalog
Obsoletes: myspell-thai
Obsoletes: myspell-tsonga
Obsoletes: myspell-ukrainian
Obsoletes: myspell-valencian
Obsoletes: myspell-venda
Obsoletes: myspell-vietnamese
Obsoletes: myspell-welsh
Obsoletes: myspell-xhosa
Obsoletes: myspell-yiddish
Obsoletes: myspell-zulu
%description
This source package contains dictionaries for MySpell.
The MySpell spell-checker is used by the OpenOffice.org office suite,
the Mozilla Composer, and the Mozilla Mail message composition window.
@METADATA@
%prep
%setup -q -n dictionaries
%build
%install
install -m 755 -d %{buildroot}%{_datadir}/hunspell/
install -m 755 -d %{buildroot}%{_datadir}/hyphen/
install -m 755 -d %{buildroot}%{_datadir}/mythes/
for dir in @LANG_DIRS@ ; do
# install files
dic_files=`find $dir -maxdepth 1 -name '*.dic' -a ! -name 'hyph*' -o -name '*.aff'`
hyph_files=`find $dir -maxdepth 1 -name 'hyph*.dic'`
th_files=`find $dir -maxdepth 1 -name 'th*.dat'`
doc_files=`find $dir -maxdepth 1 -type f | grep '.txt\|.xcu\|.xml\|.png\|.tex\|^[^.]*$' || true`
if [ ! -z "$dic_files" ]; then # see zu_ZA
cp -P `echo $dic_files | tr '\n' ' '` %{buildroot}%{_datadir}/hunspell/
fi
if [ ! -z "$hyph_files" ]; then
cp -P `echo $hyph_files | tr '\n' ' '` %{buildroot}%{_datadir}/hyphen/
fi
if [ ! -z "$th_files" ]; then
cp -P `echo $th_files | tr '\n' ' '` %{buildroot}%{_datadir}/mythes/
fi
install -m 755 -d %{buildroot}%{_docdir}/myspell-$dir
dos2unix -q $doc_files
install -m 644 `echo $doc_files | tr '\n' ' '` %{buildroot}%{_docdir}/myspell-$dir
# create file list
dic_files=`echo "$dic_files" | sed 's@^.*/@%{_datadir}/hunspell/@'`
hyph_files=`echo "$hyph_files" | sed 's@^.*/@%{_datadir}/hyphen/@'`
th_files=`echo "$th_files" | sed 's@^.*/@%{_datadir}/mythes/@'`
echo '%%defattr(-,root,root,-)' > $dir.list
echo "$dic_files" >> $dir.list
echo "$hyph_files" >> $dir.list
echo "$th_files" >> $dir.list
echo "%{_docdir}/myspell-$dir" >> $dir.list
done
%files
%defattr(-,root,root)
%dir %{_datadir}/hunspell/
%dir %{_datadir}/hyphen/
%dir %{_datadir}/mythes/
@FILES@
%changelog