File ibus-pinyin.spec of Package ibus-pinyin

#
# spec file for package ibus-pinyin
#
# Copyright (c) 2014 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:           ibus-pinyin
Version:        1.5.0
Release:        0
Summary:        The PinYin engine for IBus platform
License:        GPL-2.0+
Group:          System/I18n/Chinese
Provides:       locale(ibus:zh)
Url:            http://code.google.com/p/ibus/
Source0:        http://ibus.googlecode.com/files/%{name}-%{version}.tar.gz
# PATCH-FIX-FEDORA ibus-pinyin-support-set-content-type-method.patch bnc#847718
Patch1:         ibus-pinyin-support-set-content-type-method.patch
# PATCH-FIX-FEDORA ibus-pinyin-fixes-lua-compile.patch fcrozat@suse.com -- fix build with lua 5.2
Patch2:         ibus-pinyin-fixes-lua-compile.patch
BuildRequires:  boost-devel
BuildRequires:  gcc-c++
BuildRequires:  gettext-devel
BuildRequires:  ibus-devel >= 1.4.99
BuildRequires:  intltool
BuildRequires:  libuuid-devel
BuildRequires:  lua-devel >= 5.1
BuildRequires:  python >= 2.5
BuildRequires:  pyzy-devel >= 1.0
BuildRequires:  sqlite3
BuildRequires:  sqlite3-devel
BuildRequires:  update-desktop-files
Requires:       ibus >= 1.4.99
Requires:       opencc
Requires:       python-xdg
Requires:       pyzy-db-android
Requires:       pyzy-db-open-phrase

%description
PinYin engine for IBus platform. It provides a Chinese PinYin input method.


%description -l zh_CN
IBus 输入平台的拼音输入法支持引擎,本软件包为 IBus 提供中文拼音输入支持。

%prep
%setup -q
%patch1 -p1
%patch2 -p1

%build
%configure --disable-static \
	   --libexecdir=%{_prefix}/%{_lib}/ibus

# make -C po update-gmo
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=${RPM_BUILD_ROOT} install

%find_lang %{name} 

%suse_update_desktop_file ibus-setup-pinyin Utility DesktopUtility System
%suse_update_desktop_file ibus-setup-bopomofo Utility DesktopUtility System

%files -f %{name}.lang
%defattr(-,root,root,-)
%doc AUTHORS COPYING README
%{_datadir}/ibus-pinyin
%{_datadir}/applications/ibus-*.desktop
%dir %{_datadir}/ibus
%dir %{_datadir}/ibus/component
%{_datadir}/ibus/component/*
%dir %{_libdir}/ibus
%{_libdir}/ibus/ibus-engine-pinyin
%{_libdir}/ibus/ibus-setup-pinyin

%changelog