File novel-pinyin.spec of Package novel-pinyin
#
# spec file for package novel-pinyin
#
# Copyright (c) 2012 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/
#
%define scim_gtk3 1
Name: novel-pinyin
Version: 0.2.4
Release: 0
Summary: A Simplified Chinese Input Method
License: GPL-2.0+
Group: System/I18n/Chinese
Url: http://novel-pinyin.sf.net
Source0: novel-pinyin-%{version}.tar.bz2
Patch2: novel-pinyin-fixes-train-factor.patch
Patch3: bnc528583.patch
Patch4: gtk-2.12+-gtktooltips-migration.patch
BuildRequires: db-devel
BuildRequires: gcc-c++
BuildRequires: intltool
BuildRequires: scim-devel
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %{ix86} x86_64
%define scim_moduledir %(pkg-config --variable=moduledir scim)
%description
A Simplified Chinese Sentence-Based Pinyin Input Method Engine Based On
Markov Model.
%prep
%setup -q
%patch2 -p1
%patch3 -p1
%if 0%{?scim_gtk3}
%patch4 -p1
%endif
find . -type f | xargs chmod u+w
%build
%configure
make %{_smp_mflags}
%install
%makeinstall
rm -f %{buildroot}%{scim_moduledir}/IMEngine/novel_pinyin.*a
rm -f %{buildroot}%{scim_moduledir}/SetupUI/novel-pinyin-imengine-setup.*a
%find_lang novel-pinyin
%files -f novel-pinyin.lang
%defattr(-, root, root)
%{scim_moduledir}/IMEngine/novel_pinyin.so
%{scim_moduledir}/SetupUI/novel-pinyin-imengine-setup.so
%{_datadir}/scim/icons/novel-pinyin.png
%dir %{_datadir}/scim/novel-pinyin
%{_datadir}/scim/novel-pinyin/bigram.db
%{_datadir}/scim/novel-pinyin/gb_char.bin
%{_datadir}/scim/novel-pinyin/gbk_char.bin
%{_datadir}/scim/novel-pinyin/pinyin_index.bin
%{_datadir}/scim/novel-pinyin/special_table
%changelog