File kcm-fcitx.spec of Package kcm-fcitx

# spec file for package kcm-fcitx
# 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

%define		pkgname	fcitx-config-kde4

Name:           kcm-fcitx
Version:        0.4.3
Release:        0
Summary:        KDE control module for Fcitx
License:        GPL-2.0+
Group:          System/I18n/Chinese
Source1:        input-keyboard.svg
Obsoletes:      %{name} < 0.2.0
Provides:       %{name} = %{version}
BuildRequires:  fcitx-devel
%if 0%{?suse_version}
BuildRequires:  libkde4-devel
BuildRequires:  rsvg-view
%if 0%{?suse_version} <= 1140 
BuildRequires:  libunique-devel
BuildRequires:  libunique1-devel
BuildRequires:  kdelibs-devel
BuildRequires:  libX11-devel
BuildRequires:  librsvg2
BuildRequires:  unique-devel
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  hicolor-icon-theme
BuildRequires:  intltool
BuildRequires:  libtool
BuildRequires:  xz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

KDE control module for Fcitx. 

You can config fcitx through "Configue Desktop" - "Locale" - Fcitx now.

%package -n %{pkgname}
Summary:        KDE control module for Fcitx
Group:          System/I18n/Chinese
%if 0%{?suse_version}
Provides:       locale(kdebase4:ko;zh_CN;zh_SG)
Supplements:    packageand(fcitx:kdebase4)
Requires:       kde-runtime
Requires:       qt-x11

%description -n %{pkgname}
KDE control module for Fcitx.

You can config fcitx through "Configure Desktop" - "Locale" - Fcitx now.

%setup -q -n %{name}-%{version}

%{__mkdir} -pv build
pushd build

cmake .. -DCMAKE_INSTALL_PREFIX=%{_prefix} -DLIB_INSTALL_DIR=%{_libdir}


pushd build

make DESTDIR=%{buildroot} install


sed -i "s/Categories=Qt;KDE;Utility/Categories=Qt;KDE;Utility;DesktopUtility;/" %{buildroot}%{_datadir}/applications/kde4/kbd-layout-viewer.desktop

ICONSIZE="16 22 32 48 64 128 256"
for i in $ICONSIZE; do
    mkdir -pv %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/devices/
    rsvg-convert -h $i -w $i %{SOURCE1} -o %{buildroot}%{_datadir}/icons/hicolor/${i}x${i}/devices/input-keyboard.png

%find_lang kcm_fcitx

%if 0%{?suse_version}

%post -n %{pkgname} -p /sbin/ldconfig

%postun -n %{pkgname} -p /sbin/ldconfig

%files -n %{pkgname} -f kcm_fcitx.lang
%if 0%{?fedora_version}

openSUSE Build Service is sponsored by