File edict.spec of Package edict

#
# spec file for package edict (Version 20060807)
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

# norootforbuild

Name:           edict
License:        Other License(s), see package
Group:          System/I18n/Japanese
Autoreqprov:    on
Provides:       locale(ja)
Version:        20060807
Release:        1
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
BuildArchitectures: 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.



Authors:
--------
    Jim Breen  <j.breen@csse.monash.edu.au>

%prep 
%setup -q
cp ${RPM_SOURCE_DIR}/COPYRIGHT-KANJIDIC-JACK-HALPERN .

%build

%install
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
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

%clean 
[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;

%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 -n edict
* Mon Aug 07 2006 - mfabian@suse.de
- update to latest versions. Updated dictionaries are
  edict, enamdict, kanjdic, kanjd212, and compdic.
* Wed Mar 01 2006 - mfabian@suse.de
- add "Provides: locale(ja)".
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Feb 09 2005 - mfabian@suse.de
- updated edict to EDICT 10DEC04 V04-003
- updated enamdict to ENAMDICT 05JAN05 V2005-01
- remove jddict, it has a problematic license.
* Wed Dec 08 2004 - mfabian@suse.de
- update license files contained in the package documentation
  to the latest versions and reword "Copyright" file according to
  Jim Breen's "Sample Acknowledgement"
  http://www.csse.monash.edu.au/groups/edrdg/sample.html
- updated edict to EDICT 14AUG04 V04-002.
- updated kanjidic to 14AUG2004.
* Tue Aug 10 2004 - mfabian@suse.de
- updated edict to EDICT 07JUN04 V04-001
- updated enamdict to ENAMDICT 13APR04 V2004-01
- updated kanjidic to 11MAR2004
- add COPYRIGHT-KANJIDIC-JACK-HALPERN file.
* Tue Feb 24 2004 - hmacht@suse.de
- building as non-root
* Mon Aug 25 2003 - mfabian@suse.de
- updated all dictionaries to their latest version:
- edict updated to EDICT 19AUG03 V03-004
- enamdict updated to ENAMDICT 19AUG03 V2003-02
- kanjidic updated to 21JUL2003
- use UTF-8 versions of dictionaries when available,
  convert all others to UTF-8 with iconv.
* Fri Jun 13 2003 - mfabian@suse.de
- add %%dir /usr/share/edict/ to file list.
* Fri May 16 2003 - mfabian@suse.de
- don't install files which are not packaged.
* Sun Feb 16 2003 - mfabian@suse.de
- updated all dictionaries to their latest version:
- edict updated to EDICT 04FEB03 V03-001
- enamdict updated to ENAMDICT 06DEC02 V2002-03
- compdic updated to COMPDIC 24OCT02 V02-001
- added buddhdic (Buddhistic terms)
* Sat Aug 10 2002 - mfabian@suse.de
- updated all dictionaries to their latest version:
- edict updated to EDICT 25APR02 V02-001
- enamdict updated to ENAMDICT 11JUL02 V2002-02
* Mon Mar 18 2002 - mfabian@suse.de
- updated all dictionaries to their latest version:
- compdic updated to COMPDIC 04DEC01 V01-002
- edict updated to EDICT 28NOV01 V01-002
- enamdict updated to ENAMDICT 22JUN01 V2001-01
- kanjidic updated to 06FEB2002
- aviation updated
- added a few dictionaries
- ediclsd3 (EDICLSD3 24JAN97/Life Sciences Dictionary File)
- engscidic (engineering and physical sciences)
- lawgledt (University of Washington Japanese-English
  Legal Glossary)
- stardict (26JAN01 V01-001/Dictionary of Constellations)
* Mon Oct 30 2000 - mfabian@suse.de
- added rpm group tag
* Mon Sep 11 2000 - mfabian@suse.de
- remove %%{?suse_update_config}, it is not needed and makes the
  build fail on 6.4K-i386
* Fri Sep 08 2000 - mfabian@suse.de
- new package edict-20000827
openSUSE Build Service is sponsored by