File edict-emacs.spec of Package edict-emacs
#
# spec file for package edict-emacs
#
# 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-emacs
BuildRequires: emacs-nox
Summary: edict.el, an Emacs Front-End for EDICT
Version: 0.9.8
Release: 958
Group: Productivity/Editors/Emacs
Requires: emacs edict
License: GPL v2 or later
Url: http://turnbull.sk.tsukuba.ac.jp/
Source: http://turnbull.sk.tsukuba.ac.jp/Tools/XEmacs/packages/edict/edict-1.06-src.tar.gz
Source1: suse-start.el
Patch0: edict-utf-8.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
The original edict.el was written by Per Hammarlund. It is an interface
to the EDICT Japanese-English dictionary compiled by Jim Breen at
Monash University. Using the region and a couple of keystrokes,
edict.el looks up the Japanese key and returns all the EDICT entries
containing that key in a pop-up buffer. English is even easier: you
just point anywhere in the word you want to look up.
Bob Kerns added a morphology engine, which reduces a highly inflected
Japanese word to a list of dictionary forms (for example itta -> (iku,
iu)), all of which are looked up.
%prep
%setup -n mule
%patch0 -p1 -b .edict-utf-8
mv edict/* .
cp -p $RPM_SOURCE_DIR/suse-start.el .
%build
%define emacs_sitelisp_dir /usr/share/emacs/site-lisp
%define emacs_package_dir /usr/share/emacs/site-lisp/edict
%define emacs_infodir %{_infodir}
make -f Makefile.FSF lispdir=%{emacs_sitelisp_dir} infodir=%{emacs_infodir}
%install
mkdir -p $RPM_BUILD_ROOT%{emacs_package_dir}
install -m 644 *.el *.elc $RPM_BUILD_ROOT%{emacs_package_dir}
{
echo ";; %{emacs_sitelisp_dir}/suse-start-edict.el"
echo ""
echo "(add-to-list 'load-path \"%{emacs_package_dir}\")"
echo ""
cat suse-start.el
echo ""
echo ";; %{emacs_sitelisp_dir}/suse-start-edict.el ends here"
} > %{buildroot}%{emacs_sitelisp_dir}/suse-start-edict.el
%files
%defattr(-,root,root)
%doc *.096 TODO COPYING ChangeLog README TODO
%{emacs_package_dir}
%config %{emacs_sitelisp_dir}/suse-start-edict.el
%changelog