File kopete.spec of Package kopete

#
# spec file for package kopete
#
# Copyright (c) 2016 SUSE LINUX 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:           kopete
Version:        16.08.2
Release:        0
Summary:        Instant Messenger
License:        GPL-2.0+
Group:          Productivity/Networking/Instant Messenger
Source0:        %{name}-%{version}.tar.xz
# PATCH-FIX-UPSTREAM Fix build with mediastreamer >= 2.14 - https://bugs.kde.org/show_bug.cgi?id=368340
Patch1:		ms2-14.patch
BuildRequires:  alsa-devel
BuildRequires:  giflib-devel
BuildRequires:  libgadu-devel
BuildRequires:  libidn-devel
BuildRequires:  libjasper-devel
BuildRequires:  libkdepimlibs4-devel
BuildRequires:  libqca2-devel
BuildRequires:  libqimageblitz-devel
BuildRequires:  libv4l-devel
BuildRequires:  libxml2-devel
BuildRequires:  libxslt-devel
BuildRequires:  meanwhile-devel
BuildRequires:  mediastreamer2-devel
BuildRequires:  openslp-devel
BuildRequires:  pkgconfig
BuildRequires:  speex-devel
BuildRequires:  sqlite-devel
BuildRequires:  pkgconfig(expat)
BuildRequires:  pkgconfig(jsoncpp)
BuildRequires:  pkgconfig(libotr) >= 4.0.0
BuildRequires:  pkgconfig(libsrtp)
BuildRequires:  pkgconfig(ortp) >= 0.22
Recommends:     kdepim4-runtime
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Obsoletes:      libkopete4 < %{version}
Provides:       libkopete4 = %{version}
%{kde4_runtime_requires}
%{kde4_pimlibs_requires}

%description
Kopete is the KDE instant messenger and supports multiple protocols.

%prep
%setup -q
%patch1 -p1

%build
%ifarch ppc ppc64
export RPM_OPT_FLAGS="%{optflags} -mminimal-toc"
%endif
export RPM_OPT_FLAGS="%{optflags} -fPIE -pthread"
export LDFLAGS="-pie"
  %cmake_kde4 -d build -- -DMOZPLUGIN_INSTALL_DIR=%{_libdir}/browser-plugins
  %make_jobs

%install
  %kde4_makeinstall -C build
  %suse_update_desktop_file kopete          Network  InstantMessaging
  %kde_post_install
  
  # Remove all development related files.
  rm -rf %{buildroot}%{_kde4_includedir}
  rm -f  %{buildroot}%{_kde4_libdir}/libkopete*.so
  rm -f  %{buildroot}%{_kde4_libdir}/libkyahoo.so
  rm -f  %{buildroot}%{_kde4_libdir}/liboscar.so

%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%doc COPYING COPYING.DOC README
%{_kde4_bindir}/kopete
%{_kde4_bindir}/kopete_latexconvert.sh
%{_kde4_bindir}/winpopup-*
%{_kde4_bindir}/libjingle-call
%{_kde4_modulesdir}/kcm_kopete_*.so
%{_kde4_modulesdir}/kopete_*.so
%{_kde4_modulesdir}/libchattexteditpart.so
%{_kde4_libdir}/libqgroupwise.so
%{_kde4_libdir}/browser-plugins/skypebuttons.so
%{_kde4_applicationsdir}/kopete.desktop
%{_kde4_datadir}/dbus-1/interfaces/
%{_kde4_htmldir}/en/kopete/
%{_kde4_iconsdir}/hicolor/*/apps/kopete*.*
%{_kde4_iconsdir}/oxygen/*/actions/*
%{_kde4_iconsdir}/oxygen/*/status/*
%{_kde4_appsdir}/kconf_update/
%{_kde4_appsdir}/kopete/
%{_kde4_libdir}/libkopete*.so.*
%{_kde4_libdir}/libkyahoo.so.*
%{_kde4_libdir}/liboscar.so.*
%{_kde4_configkcfgdir}/*
%{_kde4_servicesdir}/*.protocol
%{_kde4_servicesdir}/*.desktop
%{_kde4_servicetypesdir}/*.desktop
%{_kde4_datadir}/sounds/*.ogg
%{_kde4_appsdir}/kopete_contactnotes/
%{_kde4_appsdir}/kopete_groupwise/
%{_kde4_appsdir}/kopete_history/
%{_kde4_appsdir}/kopete_history2/
%{_kde4_appsdir}/kopete_jabber/
%{_kde4_appsdir}/kopete_latex/
%{_kde4_appsdir}/kopete_otr/
%{_kde4_appsdir}/kopete_privacy/
%{_kde4_appsdir}/kopete_skype/
%{_kde4_appsdir}/kopete_statistics/
%{_kde4_appsdir}/kopete_translator/
%{_kde4_appsdir}/kopete_yahoo/
%{_kde4_modulesdir}/plugins/accessible/
%{_kde4_appsdir}/kopeterichtexteditpart/
%{_kde4_servicesdir}/kconfiguredialog/
%{_kde4_configdir}/kopeterc

%changelog
openSUSE Build Service is sponsored by