File edict.spec of Package edict
#
# spec file for package edict
#
# Copyright (c) 2018 SUSE LINUX 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: edict
Version: 20180305
Release: 0
Summary: The Japanese Dictionary Files from the EDRDG project
License: CC-BY-SA-3.0 AND CC-BY-SA-4.0
Group: System/I18n/Japanese
Url: http://www.edrdg.org/jmdict/edict.html
# The files change daily, so we do not include their full URL here,
# but do see download_dicts.sh.
Source: JMdict.gz
Source2: edict.gz
Source3: edict2u.gz
Source4: enamdict.gz
Source5: compdic.gz
Source6: kanjidic2.xml.gz
Source7: kanjidic.gz
Source8: kanjd212.gz
Source9: kradfile.gz
Source10: radkfile.gz
Source97: download_dicts.sh
Source98: http://www.edrdg.org/edrdg/licence.html
Source99: http://www.kanji.org/kanji/dictionaries/skip_permission.htm
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Provides: locale(ja)
%description
The EDICT file is the outcome of a voluntary project to produce a
freely available Japanese-English Dictionary in machine readable form.
This project has been under way since early 1991, beginning with the
small original file included with the MOKE (Mark's Own Kanji Editor)
Japanese word processing package. It had reached a size of nearly
103,000 entries when it was split into two files: EDICT containing the
"normal" dictionary entries, and ENAMDICT containing names. Both files
are used by a number of software packages and thousands of users
worldwide. The EDICT file now has over 60,000 entries and the ENAMDICT
file has over 160,000 entries.
Meanwhile, there are also some additional dictionary files for special
purposes, COMPDIC, for example, for words from the computing and
communication field.
%prep
# Make %%doc work
cp "%_sourcedir"/*.htm* .
%build
%install
d="%buildroot/%_datadir/edict"
mkdir -p "$d"
pushd "%_sourcedir/"
# Copy files which are in UTF-8 or XML directly
for i in JMdict.gz edict2u.gz kanjidic2.xml.gz; do
gzip -cd "$i" >"$d/${i%.gz}"
done
# Transcode EUC-JP files
for i in compdic.gz edict.gz enamdict.gz kanjd212.gz kanjidic.gz kradfile.gz radkfile.gz; do
gzip -cd "$i" | iconv -f euc-jp -t utf-8 >"$d/${i%.gz}"
done
popd
%files
%defattr(-, root, root)
%doc licence.html skip_permission.htm
%_datadir/edict/
%changelog