File ibus-qt.spec of Package ibus-qt

#
# spec file for package ibus-qt
#
# Copyright (c) 2011 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-qt
Version:        1.3.1
Release:        1
Summary:        Qt IBus library and Qt input method plugin
License:        GPL-2.0+
Group:          System Environment/Libraries
Url:            http://code.google.com/p/ibus/
Source0:        http://ibus.googlecode.com/files/%{name}-%{version}-Source.tar.gz

BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  cmake doxygen fdupes
BuildRequires:  libqt4-devel
BuildRequires:  dbus-1-devel >= 1.2
BuildRequires:  ibus-devel >= 1.2
BuildRequires:  libicu-devel >= 4.0
Requires:       ibus >= 1.2
Requires:       libqt4
Supplements:    packageand(ibus:libqt4)

%description
Qt IBus library and Qt input method plugin.

%package devel
License:        GPL-2.0+
Summary:        Development tools for ibus qt
Group:          Development/Libraries/C and C++
Requires:       %{name} = %{version}-%{release}

%description devel
The ibus-qt-devel package contains the header files for ibus qt library.

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

%build
cmake \
    -DCMAKE_INSTALL_PREFIX=%{_usr} \
    -DLIBDIR=%{_libdir}
make

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
%fdupes -s $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/usr/share/doc/packages/%{name}
mv $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version} $RPM_BUILD_ROOT/usr/share/doc/packages/%{name}
rm -rf $RPM_BUILD_ROOT/usr/share/doc/%{name}-%{version}
# INSTALL contains generic build instructions, remove it
rm $RPM_BUILD_ROOT/usr/share/doc/packages/%{name}/%{name}-%{version}/INSTALL

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%{_libdir}/libibus-qt.so.*
%{_libdir}/qt4/plugins/inputmethods/libqtim-ibus.so

%files devel
%defattr(-,root,root,-)
%dir %{_docdir}/%{name}
%{_includedir}/*
%{_libdir}/libibus-qt.so
%{_docdir}/%{name}/

%changelog
openSUSE Build Service is sponsored by