File gjiten.spec of Package gjiten
#
# spec file for package gjiten
#
# 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/
#
# norootforbuild
Name: gjiten
BuildRequires: edict intltool libglade2-devel libgnomeui-devel libtool libxslt perl-XML-Parser
BuildRequires: scrollkeeper sgml-skel update-desktop-files w3m xmlto
%if 0%{?suse_version} >= 1130
BuildRequires: libgnome-keyring-devel
%else
BuildRequires: gnome-keyring-devel
%endif
License: GPLv2+
Group: Productivity/Office/Dictionary
Requires: edict
AutoReqProv: on
Provides: locale(libgnome:ja)
Version: 2.6
Release: 222
Url: http://gjiten.sourceforge.net/
# CVS version is here:
# cvs -d:pserver:anonymous@gjiten.cvs.sourceforge.net:/cvsroot/gjiten login
# (empty password)
# cvs -d:pserver:anonymous@gjiten.cvs.sourceforge.net:/cvsroot/gjiten checkout gjiten
Source0: http://gjiten.sourceforge.net/gjiten-%version.tar.bz2
Patch0: gjiten.patch
Patch1: %name-desktop.patch
Patch3: configure.patch
Patch4: schemas.patch
Patch5: skip-validation.patch
Patch348100: bugzilla-348100-empty-radicals-window.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Summary: Japanese Dictionary Browser for GNOME/GTK+
%define gnome_prefix %(pkg-config --variable=prefix libgnomeui-2.0)
%if "%gnome_prefix" == "/usr"
%define gnome_etc /etc
%gconf_schemas_prereq
%else
%define gnome_etc /etc%gnome_prefix
PreReq: gconf2
%endif
%description
Gjiten is a GNOME-based Japanese dictionary program. It uses some of
the xjdic code written by Jim Breen and his dictionary files. Gjiten
also has a kanji dictionary. Any combination of stroke count, radicals,
and search key can be used for kanji lookups. It requires a working X
input method (such as kinput2) for Japanese input.
Authors:
--------
Botond Botyanszki <boti@beer.com>
%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch348100 -p1
%build
rm -f config.cache
# update config.{guess,sub}
%{?suse_update_config}
if [ ! -f README ] ; then
touch README # for autoconf
fi
#libtoolize --force
#autoreconf -I /opt/gnome/share/aclocal --force --install --verbose
export CFLAGS="$RPM_OPT_FLAGS"
./autogen.sh --prefix=%{gnome_prefix} \
--mandir=%{_mandir} \
--infodir=%{_infodir} \
--with-gnome=%{gnome_prefix} \
--with-gconf-schema-file-dir=%{gnome_etc}/gconf/schemas \
%{_target_cpu}-suse-linux
make
%install
make DESTDIR=$RPM_BUILD_ROOT install
mkdir -p -m 755 $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
cp AUTHORS BUGS COPYING ChangeLog* INSTALL* NEWS* README* TODO \
$RPM_BUILD_ROOT/%{gnome_prefix}/share/doc/gjiten/gjiten-doc.ja.html \
$RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
pushd $RPM_BUILD_ROOT%{_defaultdocdir}/%{name}
for i in $RPM_BUILD_ROOT%{gnome_prefix}/share/gnome/help/gjiten/*
do
ln -sf $( echo $i | sed "s%%^$RPM_BUILD_ROOT%%%%g" ) .
done
popd
%find_lang gjiten
%if %suse_version > 1020
%find_gconf_schemas
cat %{name}.lang %{name}.schemas_list >%{name}.lst
%else
cat %{name}.lang >%{name}.lst
%endif
%suse_update_desktop_file %name Office Dictionary
%if %suse_version > 1020
%pre -f %{name}.schemas_pre
%posttrans -f %{name}.schemas_posttrans
%preun -f %{name}.schemas_preun
%else
%post
export GCONF_CONFIG_SOURCE=`./%{gnome_prefix}/bin/gconftool-2 --get-default-source`
./%{gnome_prefix}/bin/gconftool-2 --makefile-install-rule ./%{gnome_etc}/gconf/schemas/gjiten.schemas >/dev/null
./%{gnome_prefix}/bin/gconftool-2 --makefile-install-rule ./%{gnome_etc}/gconf/schemas/gjiten-dicfiles.schemas >/dev/null
%endif
%clean
#rm -rf $RPM_BUILD_ROOT;
%files -f %{name}.lst
%defattr(-, root, root)
%doc %{_defaultdocdir}/%{name}/
%{gnome_prefix}/bin/*
%dir %{gnome_prefix}/share/application-registry
%{gnome_prefix}/share/application-registry/gjiten.desktop
%{gnome_prefix}/share/applications/gjiten.desktop
%{gnome_prefix}/share/gjiten
%{gnome_prefix}/share/gnome/help/gjiten
%{gnome_prefix}/share/locale/*/LC_MESSAGES/gjiten.mo
%{gnome_prefix}/share/omf/gjiten
%{gnome_prefix}/share/pixmaps/*
%exclude %{gnome_prefix}/share/doc/gjiten/gjiten-doc.ja.html
%if %suse_version <= 1020
%{gnome_etc}/gconf/schemas/*
%endif
%{_mandir}/man1/*
%changelog