File kde3-sim.spec of Package kde3-sim

#
# spec file for package sim (Version 0.9.4.3)
#
# 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/
#

%define _prefix=/opt/kde3

Name:           kde3-sim
BuildRequires:  flex kdelibs3-devel zip cmake qt3-devel gcc-c++
Version:        0.9.5.3209
Release:        152
Summary:        Plugins-based instant messenger for several protocols
# the GPL-2.0 license of qjpegio.cpp may cause the entire package to be licensed
# under GPL-2.0
License:        GPL-2.0
Group:          Productivity/Networking/Instant Messenger
Url:            http://sim-im.org
Source0:        sim-%{version}.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Patch3:         sim-fix_compiler_warnings.diff
Patch4:         fix-memset-call.patch
Patch5:         sim-0.9.4.3-double-message-fix.patch
Patch6:         kde3-sim-libxml2-new-buffer.patch
Provides:       sim = %{version}
Obsoletes:      sim = %{version}

%description
SIM - Multiprotocol Instant Messenger

SIM (Simple Instant Messenger) is a plugins-based open- source instant
messenger that supports various protocols (ICQ, Jabber, AIM, MSN, YIM).
It uses the QT library and works on X11 with optional KDE-support.

SIM has a lot of features, many of them are listed at:
http://sim-icq.sourceforge.net/

%prep
%setup -q -n sim-%{version}
#%patch3
%patch4 -p1
#%patch5 -p1
%if %suse_version > 1220
%patch6 -p1
%endif

%build
. /etc/opt/kde3/common_options

mkdir simkde
pushd simkde
export QTDIR=/usr/lib/qt3
cmake %_builddir/sim-%version \
	-DCMAKE_C_FLAGS:STRING="%optflags -Wl,--add-needed" \
	-DCMAKE_CXX_FLAGS:STRING="%optflags -Wl,--add-needed" \
        -DCMAKE_INSTALL_PREFIX=/opt/kde3 \
        -DCMAKE_INSTALL_DIR=/opt/kde3 \
        -DCMAKE_SKIP_RPATH=YES \
        -DUSE_GCC_VISIBILITY=1 \
%if %_lib=="lib64"
        -DLIB_SUFFIX=64 \
%endif
        -DENABLE_KDE3=1

make %{?_smp_mflags}
popd

%install
. /etc/opt/kde3/common_options
pushd simkde
%makeinstall
popd
%find_lang sim
%suse_update_desktop_file -G "Instant Messenger" sim-im Network InstantMessaging
kde_post_install

%files -f sim.lang
%defattr(-,root,root)
%doc COPYING AUTHORS AUTHORS.sim README
/opt/kde3/bin/sim-im
/opt/kde3/bin/simctrl
/opt/kde3/%_lib/*
/opt/kde3/%_lib/sim-im/*
%dir /opt/kde3/%_lib/sim-im
%dir /opt/kde3/share/apps/sim-im
%dir /opt/kde3/share/apps/sim-im/icons
%dir /opt/kde3/share/apps/sim-im/pict
%dir /opt/kde3/share/apps/sim-im/sounds
%dir /opt/kde3/share/apps/sim-im/styles
%dir /opt/kde3/share/icons/hicolor/72x72
%dir /opt/kde3/share/icons/hicolor/72x72/apps
%dir /opt/kde3/share/locale/sw
%dir /opt/kde3/share/locale/sw/LC_MESSAGES
/opt/kde3/share/applications/kde/sim-im.desktop
/opt/kde3/share/apps/sim-im/icons/*
/opt/kde3/share/apps/sim-im/pict/*
/opt/kde3/share/apps/sim-im/sounds/*
/opt/kde3/share/apps/sim-im/styles/*
/opt/kde3/share/icons/hicolor/16x16/apps/sim.png
/opt/kde3/share/icons/hicolor/32x32/apps/sim.png
/opt/kde3/share/icons/hicolor/48x48/apps/sim.png
/opt/kde3/share/icons/hicolor/64x64/apps/sim.png
/opt/kde3/share/icons/hicolor/72x72/apps/sim.png
/opt/kde3/share/services/simctrl.desktop

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%changelog
openSUSE Build Service is sponsored by