File fcitx-configtool.spec of Package fcitx-configtool

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


%if 0%{?suse_version} < 1140
%define		pkgname	fcitx-config-gtk2
%else
%define		pkgname fcitx-config-gtk3
%endif

Name:           fcitx-configtool
Version:        0.4.6
Release:        0
Summary:        GTK GUI config tool for FCITX
License:        GPL-2.0+
Group:          System/I18n/Chinese
Url:            http://code.google.com/p/fcitx
%if 0%{?suse_version}
BuildRequires:  dbus-1-glib-devel
%if 0%{?suse_version} <= 1140
BuildRequires:  libunique-devel
%else
BuildRequires:  libunique1-devel
%endif
%else
BuildRequires:  dbus-glib-devel
BuildRequires:  unique-devel
%endif
BuildRequires:  fcitx-devel
BuildRequires:  gtk2-devel
%if 0%{?suse_version} >= 1140 || 0%{?fedora_version}
BuildRequires:  gtk3-devel
%endif
#Source:         http://fcitx.googlecode.com/files/%{name}-%{version}.tar.xz
Source:         %{name}-%{version}.tar.bz2
BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  intltool
BuildRequires:  iso-codes-devel
BuildRequires:  libtool
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       locale(libgnome:ko;zh_CN;zh_SG)

%description
fcitx-config Gtk based configure tool for fcitx.

KDE Version see fcitx-config-kde4 or kcm-fcitx.

%package -n %{pkgname}
Summary:        GTK GUI Config tool for FCITX
Group:          System/I18n/Chinese
Provides:       fcitx-config-gtk = %{version}
Obsoletes:      fcitx-config-gtk < %{version}

%description -n %{pkgname}
fcitx-config GTK based configure tool for fcitx.

KDE Version see fcitx-config-kde4 or kcm-fcitx.

%prep
%setup -q

%build
mkdir -pv build
pushd build
cmake   -DCMAKE_INSTALL_PREFIX=%{_prefix} \
        -DLIB_INSTALL_DIR=%{_libdir} \
        ..
make

%install
pushd build
%make_install
popd

%find_lang %{name}

%files -n %{pkgname} -f %{name}.lang
%defattr(-,root,root)
%{_bindir}/*

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%changelog
openSUSE Build Service is sponsored by