File fcitx-unikey.spec of Package fcitx-unikey
#
# spec file for package fcitx-unikey
#
# Copyright (c) 2010 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: fcitx-unikey
Version: 0.2.0
Release: 0
License: GPL-3.0+
Summary: Vietnamese unikey support for Fcitx
Url: https://github.com/fcitx/fcitx-unikey
Group: System/I18n/Chinese
Source: %{name}-%{version}.tar.bz2
# fix-for-opensuse wengxt@gmail.com - fix qt 4.7 builds
Patch1: fcitx-unikey-0.2.0-compat-qt474.patch
BuildRequires: cmake
BuildRequires: fcitx-devel >= 4.2.3
BuildRequires: fdupes
BuildRequires: gcc-c++
BuildRequires: intltool
%if 0%{?suse_version} >= 1220
BuildRequires: libqt4-devel
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
fcitx-unikey provides support for Vietnamese unikey IM.
%prep
%setup -q
%if 0%{?suse_version} <= 1210
%patch1 -p1
%endif
%build
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIB_INSTALL_DIR=%{_libdir} ..
make %{?_smp_mflags}
%install
cd build
make DESTDIR=%{buildroot} install
cd ..
%find_lang %{name}
%if 0%{?suse_version}
%fdupes %{buildroot}
%else
fdupes -n -q -r %{buildroot}
%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f %{name}.lang
%defattr(-,root,root)
%doc COPYING
%{_libdir}/fcitx/%{name}.so
%if 0%{?suse_version} >= 1220
%{_libdir}/fcitx/qt/libfcitx-unikey-macro-editor.so
%endif
%{_datadir}/fcitx/
%{_datadir}/icons/hicolor/*/apps/%{name}.png
%changelog