File igerman98.spec of Package igerman98
#
# spec file for package igerman98
#
# Copyright (c) 2014 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/
#
Name: igerman98
Version: 20131206
Release: 0
Summary: German Spell Check Dictionaries
License: GPL-2.0 and LGPL-2.1
Group: Productivity/Text/Spell
# According to Documentation/Copyright we can distribute program under GPL-2.0
# or GPL-3.0. We have choosed GPL-2.0. More over, aspell/de_all_phonet.dat.in
# is LGPL-2.1, so adding it to license string.
Url: http://www.j3e.de/ispell/igerman98/dict/
BuildRequires: aspell
BuildRequires: hunspell
BuildRequires: ispell
Source0: %{name}-%{version}.tar.bz2
Source1: Nwordlist.tgz
Source2: fix8bit.c
Source3: austrian.el
Source4: german.el
Source5: swiss.el
Patch0: %{name}-ispell-sort.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%define aspell_dict_dir %(aspell dump config dict-dir)
%define ispell_dict_dir %(ispell -vv|grep LIBDIR|sed \"s/.*\=//;s/^ //g\" |tr -d \\")
%define ispell_emacs_lib_dir /usr/lib/ispell/emacs
%define hunspell_dict_dir /usr/share/myspell/
%description
A meta package for German, Swiss, and Austrian dictionaries for the ispell,
aspell and myspell spell checkers.
Authors:
--------
Björn JACKE
Daniel NABER
Werner LEMBERG
László NÉMETH
Jan SCHREIBER
Roland ROSENFELD
Till BERGER
Franz Michael BAUMANN
many other contributors ...
%package doc
Summary: Documentation for German dictionaries
License: GPL-2.0+
Group: Productivity/Text/Spell
%if 0%{?suse_version} >= 1120
BuildArch: noarch
%endif
%description doc
Documentation for German, Swiss, and Austrian dictionaries for the ispell,
aspell and myspell spell checkers.
%package -n aspell-de
Summary: A German Dictionary for ASpell
License: GPL-2.0+
Group: Productivity/Text/Spell
Provides: locale(aspell:de)
Requires: aspell >= 0.60
%description -n aspell-de
A German dictionary for the ASpell spell checker.
%package -n ispell-ngerman
Summary: New German ispell dictionary
License: BSD-3-Clause
Group: Productivity/Text/Spell
Provides: ispell_dictionary
Provides: locale(ispell:de;de_DE)
%description -n ispell-ngerman
This package includes a ready German dictionary for ispell. A short
usage description is given in /usr/share/doc/packages/ispell/README of
the package ispell.
%package -n ispell-nswiss
Summary: New Swiss ispell dictionary
License: GPL-2.0+
Group: Productivity/Text/Spell
Provides: ispell_dictionary
Provides: locale(ispell:de_CH)
%description -n ispell-nswiss
This package includes a ready Swiss dictionary for ispell according
the new spelling rules. The name of the dictionary is nswiss to be able
to distinguish it from those of the German packages. A short usage
description is given in /usr/share/doc/packages/ispell/README of the
package ispell.
%package -n ispell-naustrian
Summary: New Austrian ispell dictionary
License: GPL-2.0+
Group: Productivity/Text/Spell
Provides: ispell_dictionary
Provides: locale(ispell:de_AT)
%description -n ispell-naustrian
This package includes a ready Austrian dictionary for ispell according
the new spelling rules. The name of the dictionary is naustrian to be able
to distinguish it from those of the German packages. A short usage
description is given in /usr/share/doc/packages/ispell/README of the
package ispell.
%prep
%setup -q -a1
%patch0 -p1
%build
# prepare ispell dictionary
cp %{S:2} .
gcc -O2 -o fix8bit fix8bit.c
mv ispell/de_DE.aff.in ispell/de_DE.aff.in-bj
./fix8bit -8 < ispell/de_DE.aff.in-bj > ispell/de_DE.aff.in
for l in DE AT CH; do
make ispell/de_$l.{aff,hash}
make aspell/de_$l.rws
make hunspell/de_$l.{dic,aff}
done
make ligature/rmligs
# aspell -- creating extra dictionary with Novell jargon
/usr/bin/word-list-compress c < Nwordlist > Nwordlist.cwl
/usr/bin/word-list-compress d < Nwordlist.cwl | aspell --lang=de_DE --local-data-dir=./aspell/ create master ./deNovellwords
for i in aspell/*.multi; do echo "add deNovellwords" >> $i; done
%install
mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}
# aspell
mkdir -p $RPM_BUILD_ROOT%{aspell_dict_dir}
install -m 644 aspell/*.{rws,dat,alias,multi} $RPM_BUILD_ROOT%{aspell_dict_dir}
install -m 644 ./deNovellwords $RPM_BUILD_ROOT%{aspell_dict_dir}
echo "add de_DE.multi" > $RPM_BUILD_ROOT%{aspell_dict_dir}/deutsch.alias
echo "add de_DE.multi" > $RPM_BUILD_ROOT%{aspell_dict_dir}/german.alias
echo "add de_CH.multi" > $RPM_BUILD_ROOT%{aspell_dict_dir}/swiss.alias
# ispell
mkdir -p $RPM_BUILD_ROOT%{ispell_dict_dir}
install -m 644 ispell/de_??.{aff,hash} $RPM_BUILD_ROOT%{ispell_dict_dir}
mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -m 755 ligature/rmligs $RPM_BUILD_ROOT%{_bindir}
gzip ligature/rmligs.1
mkdir -p $RPM_BUILD_ROOT%{_mandir}/man1
install -m 644 ligature/rmligs.1.gz $RPM_BUILD_ROOT%{_mandir}/man1
mkdir -p $RPM_BUILD_ROOT%{ispell_emacs_lib_dir}
install -m 644 %{S:3} %{S:4} %{S:5} $RPM_BUILD_ROOT%{ispell_emacs_lib_dir}
for ext in aff hash; do
ln -s %{ispell_dict_dir}/de_DE.$ext $RPM_BUILD_ROOT%{ispell_dict_dir}/german.$ext
ln -s %{ispell_dict_dir}/de_CH.$ext $RPM_BUILD_ROOT%{ispell_dict_dir}/swiss.$ext
ln -s %{ispell_dict_dir}/de_AT.$ext $RPM_BUILD_ROOT%{ispell_dict_dir}/austrian.$ext
done
%files doc
%defattr(-,root,root)
%doc Documentation/*
%files -n aspell-de
%defattr(-,root,root)
%{aspell_dict_dir}/*.rws
%{aspell_dict_dir}/*.multi
%{aspell_dict_dir}/*.alias
%{aspell_dict_dir}/*.dat
%{aspell_dict_dir}/deNovellwords
%files -n ispell-ngerman
%defattr(-,root,root)
%{ispell_dict_dir}/de_DE.aff
%{ispell_dict_dir}/de_DE.hash
%{ispell_dict_dir}/german.aff
%{ispell_dict_dir}/german.hash
%{ispell_emacs_lib_dir}/german.el
%{_bindir}/rmligs
%{_mandir}/man1/rmligs.1.gz
%files -n ispell-nswiss
%defattr(-,root,root)
%{ispell_dict_dir}/de_CH.aff
%{ispell_dict_dir}/de_CH.hash
%{ispell_dict_dir}/swiss.aff
%{ispell_dict_dir}/swiss.hash
%{ispell_emacs_lib_dir}/swiss.el
%files -n ispell-naustrian
%defattr(-,root,root)
%{ispell_dict_dir}/de_AT.aff
%{ispell_dict_dir}/de_AT.hash
%{ispell_dict_dir}/austrian.aff
%{ispell_dict_dir}/austrian.hash
%{ispell_emacs_lib_dir}/austrian.el
%changelog