Blob Blame Raw
Name: mythes-nl
Summary: Dutch thesaurus
%define upstreamid 20090608
Version: 0.%{upstreamid}
Release: 1%{?dist}
Source: http://www.opentaal.org/opentaalbank/thesaurus/download/thes_nl_v2.zip
Group: Applications/Text
URL: http://www.opentaal.org/opentaalbank/thesaurus
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
License: LGPLv2+
BuildArch: noarch

%description
Dutch thesaurus.

%prep
%setup -q -c

%build
iconv -f ISO-8859-1 -t UTF-8 README_th_nl_v2.txt > README_th_nl_v2.txt.new
touch -r README_th_nl_v2.txt README_th_nl_v2.txt.new
mv -f README_th_nl_v2.txt.new README_th_nl_v2.txt

%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/mythes
cp -p th_nl_v2.dat $RPM_BUILD_ROOT/%{_datadir}/mythes/th_nl_NL_v2.dat
cp -p th_nl_v2.idx $RPM_BUILD_ROOT/%{_datadir}/mythes/th_nl_NL_v2.idx

pushd $RPM_BUILD_ROOT/%{_datadir}/mythes/
nl_NL_aliases="nl_BE"
for lang in $nl_NL_aliases; do
        ln -s th_nl_NL_v2.dat "th_"$lang"_v2.dat"
        ln -s th_nl_NL_v2.idx "th_"$lang"_v2.idx"
done

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc README_th_nl_v2.txt
%dir %{_datadir}/mythes
%{_datadir}/mythes/*

%changelog
* Mon Jun 08 2009 Caolan McNamara <caolanm@redhat.com> - 0.20090608-1
- latest version

* Wed Mar 25 2009 Caolan McNamara <caolanm@redhat.com> - 0.20090325-1
- initial version