File javadict.spec of Package javadict

# spec file for package javadict (Version 1.1)
# Copyright (c) 2009 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

# norootforbuild
# icecream 0

Name:           javadict
BuildRequires:  edict java2-devel-packages xjdic-indices
License:        GPL v2 or later
Group:          Productivity/Office/Dictionary
Requires:       edict, jre1.1.x, xjdic-indices
AutoReqProv:    on
Version:        1.1
Release:        755
Patch0:         javadict-fontsetup.patch
Patch1:         javadict-java.patch
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        Japanese-English Dictionary Lookup Tool Featuring Handwriting Recognition

JavaDict is a Japanese-English dictionary and character dictionary
browser (for Jim Breen's EDICT dictionary) featuring handwriting
recognition-based character lookup.

It is portable, easy to use, and primarily intended for use by
English-speaking students of Japanese (or Japanese-speaking students of

    Todd David Rudick <>

%setup -c %{name}-%{version} -n %{name}-%{version}
%patch0 -p1
%patch1 -p0
find . -type d | xargs chmod 755
# clean up precompiled classes
rm *.class

javac -target 1.4 -source 1.4 *.java
mkdir javadict
mv *.class javadict
cat <<EOF > manifest
Manifest-Version: 1.0
Main-Class: javadict/JavaDict
# sic!, see jar -help
jar -cvfm javadict.jar manifest javadict/*
rm -rf javadict
rm *.java
# fix permissions
chmod a-x *.gif

[ "$RPM_BUILD_ROOT" != "/" ] && [ -d $RPM_BUILD_ROOT ] && rm -rf $RPM_BUILD_ROOT;
# install startscript:
mkdir -p $RPM_BUILD_ROOT/usr/bin
install -p -m 755 %{SOURCE1} $RPM_BUILD_ROOT/usr/bin/javadict
# install Java stuff:
mkdir -p $RPM_BUILD_ROOT/usr/lib/javadict
cp -a  ./* $RPM_BUILD_ROOT/usr/lib/javadict
# remove docs in installed tree (because they will also be in
# %{_defaultdocdir}/%{packagename}:
for i in COPYING READ.ME README.html docs/
    rm -rf $RPM_BUILD_ROOT/$i
# make symbolic links to the dictionaries from the "edict" package:
for i in enamdict edict jddict.v02 pandpdic geodic lingdic concrete \
         classical aviation j_places kanjidic compverb mktdic compdic \
         kanjd212 edicth 4jwords findic
    test -e /usr/share/edict/$i-euc || continue
    ln -s -f /usr/share/edict/$i-euc $RPM_BUILD_ROOT/usr/lib/javadict/$i

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

%doc COPYING READ.ME README.html docs/
%dir /usr/lib/javadict/

* Thu Aug 09 2007
- build from source (fixes #227446)
- fix build with java 1.5
* Fri Dec 15 2006
- Bugzilla #227445: move javadict from /usr/X11R6/bin to /usr/bin.
- use sazanami fonts instead of kochi fonts in font setup.
* Wed Jan 25 2006
- converted neededforbuild to BuildRequires
* Sun Feb 13 2005
- only create links to existing dicts
* Fri Feb 06 2004
- building as non-root (#norootforbuild)
* Mon Sep 08 2003
- require "xjdic-indices" and add it to neededforbuild becaue
  javadict can only work with EUC-JP encoded dictionaries and
  needs "xjdic-indices" to generate them from the UTF-8
  encoded dictionaries in edict.rpm.
* Tue Jul 01 2003
- use "export LC_ALL=ja_JP.eucJP" in the start script as a
  workaround because javadict doesn't work well in ja_JP.UTF-8.
- patch the file to use fonts which work
  on SuSE Linux. This file is not used automatically, but the
  documentation mentions it and recommends to copy it to
  to the /usr/lib/java/lib directory, therefore it should better
  be correct just in case anybody really does this.
* Fri Jun 13 2003
- add edict to "# neededforbuild" to be able to create symlinks
  to edict
- fix "directory not owned by any package"
* Sun Jun 30 2002
- fix directory permissions
* Thu Nov 22 2001
- changed Requires from java to more universal jre1.1.x
* Mon May 07 2001
- bzip2 source
* Mon Apr 09 2001
- fixed group tag
* Tue Sep 26 2000
- new package javadict 1.1
openSUSE Build Service is sponsored by