File gjiten.spec of Package gjiten

# spec file for package gjiten
# Copyright (c) 2020 SUSE LLC
# 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

Name:           gjiten
Version:        2.6
Release:        0
Summary:        Japanese Dictionary Browser for GNOME/GTK+
License:        GPL-2.0-or-later
Group:          Productivity/Office/Dictionary

# CVS version is here:
#  cvs login
#  (empty password)
#  cvs checkout gjiten
Source:         %url/%name-%version.tar.gz

Patch0:         %name.patch
Patch1:         %name-desktop.patch
Patch2:         configure-set-foreign.patch
Patch3:         stop-using-gnome-common.patch
Patch4:         skip-validation.patch
Patch5:         gjiten-automake-fix.diff
Patch6:         stop-using-libgnome-ui.patch
Patch7:         switch-to-GtkBuilder.patch
Patch8:         port-to-GSettings.patch
Patch9:         bugzilla-348100-empty-radicals-window.patch

BuildRequires:  autoconf-archive
BuildRequires:  edict
BuildRequires:  intltool
BuildRequires:  libtool
BuildRequires:  libxslt
BuildRequires:  perl-XML-Parser
BuildRequires:  pkgconfig
BuildRequires:  sgml-skel
BuildRequires:  update-desktop-files
BuildRequires:  w3m
BuildRequires:  xmlto
BuildRequires:  pkgconfig(gmodule-export-2.0)
BuildRequires:  pkgconfig(gsettings-desktop-schemas)
BuildRequires:  pkgconfig(gtk+-2.0) >= 2.14
Requires:       edict
Provides:       locale(libgnome:ja)

Gjiten is a GNOME-based Japanese dictionary program. It uses the
JMdict/edict word dictionary, KANJIDIC kanji dictionary, and some of
the xjdic code. Any combination of stroke count, radicals, and search
key can be used for Kanji lookups. It requires a working X input
method (such as ibus) for Japanese input.

%autosetup -p1


ln -fsv "%_datadir/edict/radkfile" "$b/%_datadir/%name/radkfile.utf8"
mkdir "$b/%_datadir/%name/dics"
for i in %_datadir/edict/*; do
	ln -s "$i" "$b/%_datadir/%name/dics/"
# Drop legacy GNOME 1 content
rm -rf %{buildroot}%_datadir/application-registry/
%find_lang %name
%suse_update_desktop_file %name Office Dictionary

%files -f %name.lang

openSUSE Build Service is sponsored by