File OpenOffice_org-hyphen.spec of Package OpenOffice_org-hyphen

#
# spec file for package OpenOffice_org-hyphen (Version 20080929)
#
# Copyright (c) 2008 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/
#

# norootforbuild


Name:           OpenOffice_org-hyphen
BuildRequires:  recode
License:        GPL v2 or later; LaTeX Public License (LPPL); LGPL v2.1 or later; Public Domain, Freeware
Group:          Productivity/Office/Dictionary
Version:        20080929
Release:        2
AutoReqProv:    on
Summary:        Hyphen Dictionaries for OpenOffice.org
Provides:       OpenOffice_org:/usr/lib/ooo-2.0/share/dict/ooo/hyph_en_US.dic
Provides:       locale(OpenOffice_org:bg)
Provides:       locale(OpenOffice_org:cs)
Provides:       locale(OpenOffice_org:da)
Provides:       locale(OpenOffice_org:de_DE)
Provides:       locale(OpenOffice_org:de_CH)
Provides:       locale(OpenOffice_org:el)
Provides:       locale(OpenOffice_org:en_CA)
Provides:       locale(OpenOffice_org:en_GB)
Provides:       locale(OpenOffice_org:en_US)
Provides:       locale(OpenOffice_org:es)
Provides:       locale(OpenOffice_org:et)
Provides:       locale(OpenOffice_org:fi)
Provides:       locale(OpenOffice_org:fr_BE)
Provides:       locale(OpenOffice_org:fr_FR)
Provides:       locale(OpenOffice_org:ga)
Provides:       locale(OpenOffice_org:hr)
Provides:       locale(OpenOffice_org:hu)
Provides:       locale(OpenOffice_org:id)
Provides:       locale(OpenOffice_org:is)
Provides:       locale(OpenOffice_org:it)
Provides:       locale(OpenOffice_org:lt)
Provides:       locale(OpenOffice_org:lv)
Provides:       locale(OpenOffice_org:nb)
Provides:       locale(OpenOffice_org:nl)
Provides:       locale(OpenOffice_org:nn)
Provides:       locale(OpenOffice_org:plL)
Provides:       locale(OpenOffice_org:pt_BR)
Provides:       locale(OpenOffice_org:pt_PT)
Provides:       locale(OpenOffice_org:ro)
Provides:       locale(OpenOffice_org:ru)
Provides:       locale(OpenOffice_org:sk)
Provides:       locale(OpenOffice_org:sv)
Provides:       locale(OpenOffice_org:uk)
Url:            http://wiki.services.openoffice.org/wiki/Dictionaries
# Extra source for Bulgarian dictionary because of missing license in
# the version in the version available on the OOo site
# http://sourceforge.net/projects/bgoffice
Source0:        hyph_bg_BG.tar.bz2
Source1:        hyph_cs_CZ.tar.bz2
Source2:        hyph_da_DK.tar.bz2
Source3:        hyph_de_DE.tar.bz2
Source4:        hyph_de_CH.tar.bz2
Source5:        hyph_el_GR.tar.bz2
Source6:        hyph_en_CA.tar.bz2
Source7:        hyph_en_GB.tar.bz2
Source8:        hyph_en_US.tar.bz2
Source9:        hyph_es_ES.tar.bz2
Source10:       hyph_et_EE.tar.bz2
Source11:       hyph_fi_FI.tar.bz2
Source12:       hyph_fr_BE.tar.bz2
Source13:       hyph_fr_FR_2-0.tar.bz2
Source14:       hyph_ga_IE.tar.bz2
Source15:       hyph_hr_HR.tar.bz2
Source16:       hyph_hu_HU.tar.bz2
Source17:       hyph_id_ID.tar.bz2
Source18:       hyph_is_IS.tar.bz2
Source19:       hyph_it_IT.tar.bz2
Source20:       hyph_lt_LT.tar.bz2
Source21:       hyph_lv_LV.tar.bz2
Source22:       hyph_nb_NO.tar.bz2
Source23:       hyph_nl_NL.tar.bz2
Source24:       hyph_nn_NO.tar.bz2
Source25:       hyph_pl_PL.tar.bz2
Source26:       hyph_pt_BR.tar.bz2
Source27:       hyph_pt_PT.tar.bz2
Source28:       hyph_ro_RO.tar.bz2
Source29:       hyph_ru_RU.tar.bz2
Source30:       hyph_sk_SK.tar.bz2
Source31:       hyph_sl_SI.tar.bz2
Source32:       hyph_sv_SE.tar.bz2
Source33:       hyph_uk_UA.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
These dictionaries help you to hyphenate texts and words in the
OpenOffice.org office suite.



%prep
%setup -T -c
# unpack sources
for archive in %{S:0}  %{S:1}  %{S:2}  %{S:3}  %{S:4} \
	       %{S:5}  %{S:6}  %{S:7}  %{S:8}  %{S:9} \
	      %{S:10} %{S:11} %{S:12} %{S:13} %{S:14} \
	      %{S:15} %{S:16} %{S:17} %{S:18} %{S:19} \
	      %{S:20} %{S:21} %{S:22} %{S:23} %{S:24} \
	      %{S:25} %{S:26} %{S:27} %{S:28} %{S:29} \
	      %{S:30} %{S:31} %{S:32} %{S:33} ; do
  name="${archive##*/}"
  name="${name%.tar.bz2}"
  install -m 755 -d $name
  tar -xjf "$archive" -C "$name"
done
#
# French
mv hyph_fr_FR_2-0 hyph_fr_FR
#
# fix permissions
find . -type f -exec chmod 644 {} \;

%build

%install
rm -rf $RPM_BUILD_ROOT
install -m 755 -d $RPM_BUILD_ROOT%{_datadir}/ooo/hyphen
install -m 755 -d $RPM_BUILD_ROOT%{_docdir}/%{name}
for dir in * ; do
  lang=`echo ${dir:5:2}`
  country=`echo ${dir:8:2}`
  install -m 644 $dir/hyph_${lang}_${country}.dic \
		 $RPM_BUILD_ROOT%{_datadir}/ooo/hyphen/hyph_${lang}_${country}.dic
  # fix README encoding and install below the doc dir
  install -m 755 -d $RPM_BUILD_ROOT%{_docdir}/%{name}/hyph_${lang}_${country}
  coding=`LC_CTYPE="${lang}_${country}" locale -k LC_CTYPE | grep charmap | sed "s|charmap=\"\(.*\)\"\$|\1|"`
  for file in $dir/*.txt ; do
    test -f $file || continue
    recode utf8..utf16 <$file >/dev/null 2>&1 || recode $coding..utf8 $file
    install -m 644 $file $RPM_BUILD_ROOT%{_docdir}/%{name}/hyph_${lang}_${country}
  done
done

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-, root, root)
%doc %{_docdir}/%{name}
%dir %{_datadir}/ooo
%dir %{_datadir}/ooo/hyphen
%{_datadir}/ooo/hyphen/*

%changelog
* Thu Nov 13 2008 ro@suse.de
- drop obsolete trigger and postun scripts
  ooinstdict does not exist any more
* Mon Sep 29 2008 pmladek@suse.cz
- updated: French, Norwegian Bokmaal, Norwegian Nynorsk
* Mon Apr 14 2008 lmichnovic@suse.cz
- updated bg_BG, hu_HU, it_IT
* Thu Jul 19 2007 pmladek@suse.cz
- split from the OpenOffice_org package
- source package version 20070719
- updated: German, Swiss, Hungarian, Polish
- added: Slovenian
openSUSE Build Service is sponsored by