File edict.spec of Package edict

#
# spec file for package edict
#
# Copyright (c) 2011 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:           edict
License:        Distributable in unmodified form
Group:          System/I18n/Japanese
Provides:       locale(ja)
Version:        20060807
Release:        124
Url:            http://www.csse.monash.edu.au/~jwb/edict.html
# I collected most of the dictionaries in EDICT format
# available at Jim Breen's site into the following tarball:
Source0:        edict-20060807.tar.bz2
Source10:       COPYRIGHT-KANJIDIC-JACK-HALPERN
Source11:       jack-halpern-copyright-mbox
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        The Japanese Dictionary Files for Jim Breen's EDICT Project

%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 
%setup -q
cp ${RPM_SOURCE_DIR}/COPYRIGHT-KANJIDIC-JACK-HALPERN .

%build

%install
mkdir -p $RPM_BUILD_ROOT/usr/share/edict
%define UNICODE 1
EUC_DICTIONARIES="\
    edict \
    enamdict \
    kanjidic \
    kanjd212 \
    edicth \
    classical \
    compdic \
    j_places \
    geodic \
    pandpdic \
    lingdic \
    aviation \
    concrete \
    findic \
    mktdic \
    compverb \
    4jwords \
    ediclsd3 \
    engscidic \
    lawgledt \
    stardict "
UTF8_DICTIONARIES=""
%if %UNICODE
    mv buddhdicu buddhdic
    UTF8_DICTIONARIES="buddhdic"
%else
    EUC_DICTIONARIES="$EUC_DICTIONARIES buddhdic"
%endif
DOCUMENTATION="*.doc *.txt *.euc *.html *.inf"
%if %UNICODE 
    for i in $EUC_DICTIONARIES $DOCUMENTATION
    do
	iconv -f EUC-JP -t UTF-8 < $i > $i.tmp ;
	mv $i.tmp $i
    done
%endif 
for i in $EUC_DICTIONARIES $UTF8_DICTIONARIES
do
    install -m 644 $i $RPM_BUILD_ROOT/usr/share/edict
done
%if %UNICODE
    rename .euc .utf8 *.euc
%endif

%files
%defattr(-, root, root)
%doc COPYRIGHT-KANJIDIC-JACK-HALPERN
%doc Copyright licence.html licence.txt
%dir /usr/share/edict/
# EDICT, English/Japanese (68264 entries) dictionary:
/usr/share/edict/edict
%doc edict_doc.html
%doc edict_doc.txt
# The ENAMDICT file is in the same format as the EDICT file
# but it consists entirely of proper names. 
# Version V2000-01 of the file contains 203k names.
/usr/share/edict/enamdict
%doc enamdict_doc.html
%doc enamdict_doc.txt
# And now the Kanji files
/usr/share/edict/kanjidic
/usr/share/edict/kanjd212
%doc kanjidic.doc
%doc kanjidic_doc.html
%doc kanjd212.doc
%doc kanjd212_doc.html
# The EDICTH file is in the same format as the main EDICT file, but
# contains entries with kanji from the JIS X 0212-1990 Supplementary
# standard.
/usr/share/edict/edicth
%doc edicth.doc
# Glenn Rosenthal has compiled a short dictionary of classical Japanese.
/usr/share/edict/classical
%doc classical.*
# The COMPDIC file, which is a glossary of terminology in the computing
# and telecommunications industries. It is in EUC and in the usual EDICT
# format. 
/usr/share/edict/compdic
%doc compdic_doc.html
# The J_PLACES file of Japanese place-names, culled from the MPT's WWW
# page and turned into EDICT-format entries (78,437 entries).
/usr/share/edict/j_places
%doc j_places.inf
# The GEODIC file of geological terminology. This file has about 1,300
# entries and has material prepared by Bruce Bain and Leslie Oberman.
/usr/share/edict/geodic
%doc geodic.doc
# Jim Minor's Pulp & Paper Industry Glossary file (375 entries).
/usr/share/edict/pandpdic
%doc pandpgls.doc
# Francis Bond's J/E Linguistics Dictionary file (2882 entries) 
/usr/share/edict/lingdic
%doc lingdic.txt
# Ron Schei's E/J Aviation Dictionary File (738 entries) 
/usr/share/edict/aviation
%doc aviation.txt
# Gururaj Rao's Concrete Terminology Glossary - Nov 1997 (1060 entries) 
/usr/share/edict/concrete
%doc concrete.doc
# The FINDIC file comprises Kevin Seaver's glossary of financial terms
# converted into EDICT format. About 600 entries.
/usr/share/edict/findic
%doc findic.doc
# The MKTDIC file is the EDICT formatted compilation of Adam Rice's
# business & marketing glossary lists from the Honyaku WWW pages.
/usr/share/edict/mktdic
%doc mktdic.doc
# The COMPVERB file of over 1,100 Japanese compund verbs, as found in
# Tagashira and Hoff's "Handbook of Japanese Compound Verbs." (EDICT
# format)
/usr/share/edict/compverb
%doc compverb.doc
# The 4JWORDS file of "yojijukugo" compiled by Kanji Haitani. These are
# the 4-kanji ideomatic expressions and proverbs which are very popular
# in Japanese. Kanji's list has about 350 of these.
/usr/share/edict/4jwords
%doc 4jwords.doc
# Files of the Japanese/English Life Science, i.e. bio-medical, Dictionary project.
/usr/share/edict/ediclsd3
%doc ediclsd3-readme-e.*
%doc ediclsd3-readme-j.*
%doc ediclsd3.inf
# The ENGSCIDIC file is an EDICT-format version of what appears to be a
# freeware file of terms mostly to do with engineering and physical sciences.
/usr/share/edict/engscidic
%doc engscidich.html
# Files of the University of Washington Japanese-English Legal Glossary
/usr/share/edict/lawgledt
%doc lawgldoc.*
# Raphael Garrouty's compilation of constellation names (107 entries)
/usr/share/edict/stardict
# Files of Buddhism words and phrases, extracted from the
# Digital Dictionary of Buddhism (DDB). Approximately 17,000 entries in EDICT format.
# (there is an UTF-8 encoded version as well, I don't yet use it because
# I'm afraid that some of the EDICT interface programs can't handle UTF-8 yet:
/usr/share/edict/buddhdic
%doc buddhdic.txt

%changelog