File skim.spec of Package skim

#
# spec file for package skim (Version 1.4.5)
#
# Copyright (c) 2009 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


Name:           skim
BuildRequires:  kdelibs3-devel scim-devel scons
%if %suse_version < 1010
BuildRequires:  kdelibs3-doc python-devel
%endif
License:        GPL v2 or later
Group:          System/I18n/Chinese
Summary:        KDE integration for SCIM
Version:        1.4.5
Release:        262
AutoReqProv:    on
Provides:       locale(kdebase3:ja;ko;zh)
Url:            http://www.scim-im.org
# CVS repository:
# cvs -d:pserver:anonymous@scim.cvs.sourceforge.net:/cvsroot/scim login 
# cvs -z3 -d:pserver:anonymous@scim.cvs.sourceforge.net:/cvsroot/scim co skim
# or:
# cvs -z3 -d:ext:mfabian@scim.cvs.sourceforge.net:/cvsroot/scim co skim
Source0:        skim-1.4.5.tar.bz2
Patch1:         scimkdeconfig.kcfg.patch
Patch2:         use-system-scons.patch
Patch3:         scons.patch
Patch4:         scons-11.2-fix.diff
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
KDE integration for SCIM



Authors:
--------
    liuspider <liuspider@users.sourceforge.net>

%prep
%define scons_options_basic prefix=/opt/kde3
%ifarch x86_64 ppc64 s390x
%define scons_options %scons_options_basic libsuffix=64
%else
%define scons_options %scons_options_basic
%endif
%setup -q
%patch1 -p1
%if %suse_version > 1100
%patch2 -p1
%endif
%patch3 -p1 
%if %suse_version > 1110
%patch4 -p1 
%endif

%build
# disable as-needed to fix build
export SUSE_ASNEEDED=0
export CFLAGS="$RPM_OPT_FLAGS"
export CXXFLAGS="$RPM_OPT_FLAGS"
rm -rf cache/
./configure %scons_options
%if %suse_version > 1100
scons
%else
./scons 
%endif

%install
. /etc/opt/kde3/common_options
%if %suse_version > 1100
scons DESTDIR=%{buildroot} install
%else
./scons DESTDIR=%{buildroot} install
%endif
%find_lang skim
%suse_update_desktop_file %name Utility DesktopSettings
kde_post_install
#rm -rf $RPM_BUILD_ROOT/opt/kde3/share/doc/HTML/skim

%post
%run_ldconfig

%postun
%run_ldconfig

%files -f skim.lang
%defattr(-,root,root)
%doc AUTHORS ChangeLog COPYING README TODO NEWS
/opt/kde3/bin/*
/opt/kde3/%_lib/lib*
/opt/kde3/%_lib/kde3/*
/opt/kde3/share/appl*/*/*
/opt/kde3/share/apps/*
/opt/kde3/share/autostart/*
/opt/kde3/share/icons/*/*/*/skim*
/opt/kde3/share/config.kcfg/*.kcfg
/opt/kde3/share/services/*
/opt/kde3/share/servicetypes/*
%_libdir/scim-*
/opt/kde3/include/*
%dir /opt/kde3/%_lib/pkgconfig/
/opt/kde3/%_lib/pkgconfig/*

%changelog
openSUSE Build Service is sponsored by