File scim-anthy.spec of Package scim-anthy

#
# spec file for package scim-anthy
#
# Copyright (c) 2013 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/
#


%if 0%{?suse_version} >= 1140
%define scim_gtk3 1
%else
%define scim_gtk3 0
%endif

Name:           scim-anthy
Version:        1.2.7
Release:        0
Summary:        Anthy Input Method Engine for SCIM
License:        LGPL-2.1+
Group:          System/I18n/Japanese
Url:            http://sourceforge.jp/projects/scim-imengine/
Source0:        scim-anthy-%{version}.tar.bz2
Source1:        icons.tar.gz
Patch3:         %{name}-gtk3-abuild.patch
Patch355863:    bnc355863-add-Eisu_toggle-to-default-keybindings.patch
Patch4:         remove-intl.patch
BuildRequires:  anthy-devel
BuildRequires:  gcc-c++
BuildRequires:  gettext-tools
BuildRequires:  libtool
BuildRequires:  scim-devel
BuildRequires:  update-desktop-files
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Anthy Input Method Engine for SCIM

%prep
%define scim_binary_version %(pkg-config --variable=scim_binary_version scim)
%define build_setup     1
%setup -q
%if 0%{?scim_gtk3}
%patch3 -p1
tar -xzvf %{SOURCE1}
cp -r icons/* data/
%endif
%patch355863 -p1
%patch4 -p1

%build
libtoolize --force
autoreconf --force --install --verbose
%configure \
            --disable-static \
	    --enable-debug
make %{?_smp_mflags}

%install
%makeinstall
rm -f %{buildroot}/%{_libdir}/scim-1.0/%{scim_binary_version}/IMEngine/anthy.{a,la}
rm -f %{buildroot}/%{_libdir}/scim-1.0/%{scim_binary_version}/SetupUI/anthy-imengine-setup.{a,la}
%find_lang scim-anthy

%files -f scim-anthy.lang
%defattr(-, root, root)
%doc AUTHORS COPYING NEWS README ChangeLog
%dir %{_libdir}/scim-1.0/
%dir %{_libdir}/scim-1.0/%{scim_binary_version}/
%dir %{_libdir}/scim-1.0/%{scim_binary_version}/IMEngine/
%{_libdir}/scim-1.0/%{scim_binary_version}/IMEngine/anthy.so
%if %{build_setup}
%dir %{_libdir}/scim-1.0/%{scim_binary_version}/SetupUI/
%{_libdir}/scim-1.0/%{scim_binary_version}/SetupUI/anthy-imengine-setup.so
%endif
%{_libdir}/scim-1.0/1.?.?/Helper/anthy-imengine-helper.*
%dir %{_datadir}/scim/icons/
%{_datadir}/scim/icons/scim-anthy*.png
%dir %{_datadir}/scim/Anthy/
%{_datadir}/scim/Anthy/*

%changelog
openSUSE Build Service is sponsored by