File scim-qtimm.spec of Package scim-qtimm
#
# spec file for package scim-qtimm (Version 0.9.4)
#
# 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/
#
# norootforbuild
%if %suse_version > 1120
%bcond_with skim
%else
%bcond_without skim
%endif
Name: scim-qtimm
BuildRequires: gcc-c++ qt3-devel scim-devel
%if %{with skim}
BuildRequires: kdelibs3-devel skim
%endif
License: GPLv2+
Group: System/I18n/Chinese
AutoReqProv: on
# bug437293
%ifarch ppc64
Obsoletes: scim-qtimm-64bit
%endif
#
Supplements: packageand(scim:qt3)
Summary: Qt input module plugin for SCIM
Version: 0.9.4
Release: 274
Url: http://www.scim-im.org/
# CVS repository:
# cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/scim login
# cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/scim co scim-qtimm
Source0: scim-qtimm-%version.tar.bz2
Source1: baselibs.conf
Patch1: disable-debug.diff
Patch3: bugzilla-116220-keyboard-layout.patch
Patch4: bugzilla-206547-scim-qtimm-crash.patch
Patch5: fix-build.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
Qt input module plugin for SCIM
Authors:
--------
Liu Cougar <liuspider@users.sourceforge.net>
%prep
%setup -q
%patch1 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
chmod -R u+w .
%if %{with skim}
rm -f config.cache
rm -f configure
. /etc/opt/kde3/common_options
%if %suse_version > 1020
update_admin
%else
update_admin --no-unsermake
%endif
%endif
# hack to build with older distros
%if %suse_version < 1100
sed -i -e'/supplements/d' $RPM_SOURCE_DIR/baselibs.conf
%endif
%build
%if %{with skim}
. /etc/opt/kde3/common_options
%endif
export QTDIR=/usr/lib/qt3
export KDEDIR=/opt/kde3
%if %{with skim}
./configure $configkde \
%ifarch x86_64 ppc64 s309x
--enable-libsuffix=64 \
%endif
--enable-tests \
--enable-scim-debug
%else
%configure \
%ifarch x86_64 ppc64 s309x
--enable-libsuffix=64 \
%endif
--enable-tests \
--enable-scim-debug \
--disable-skim-support
%endif
make
%install
export QTDIR=/usr/lib/qt3
%if %{with skim}
. /etc/opt/kde3/common_options
%else
export INSTALL_TARGET=install
%endif
export QTDIR=/usr/lib/qt3
make DESTDIR=$RPM_BUILD_ROOT $INSTALL_TARGET
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
install -m 755 tests/edittest $RPM_BUILD_ROOT/%{_bindir}
%find_lang %{name}
pushd $RPM_BUILD_ROOT/usr/lib/qt3/plugins/inputmethods/
if [ %_lib = lib64 ]; then
mv libqscim.so libqscim.lib64.so
mv libqscim.la libqscim.lib64.la
else
:
fi
popd
rm $RPM_BUILD_ROOT/usr/lib/qt3/plugins/inputmethods/*la
%clean
#rm -rf $RPM_BUILD_ROOT
%files -f %{name}.lang
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING README TODO NEWS THANKS
%dir /usr/lib/qt3/plugins/inputmethods/
/usr/lib/qt3/plugins/inputmethods/*.so
%{_bindir}/*
%changelog