File kopete.spec of Package kopete

# spec file for package kopete
# Copyright (c) 2018 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

%bcond_without	lang

Name:           kopete
Version:        18.04.0
Release:        0
%define kf5_version 5.26.0
# Latest stable Applications (e.g. 16.08 in KA, but 16.11.80 in KUA)
%{!?_kapp_version: %global _kapp_version %(echo %{version}| awk -F. '{print $1"."$2}')}
Summary:        Instant Messenger
License:        GPL-2.0+
Group:          Productivity/Networking/Instant Messenger
Source0:        %{name}-%{version}.tar.xz
Patch:          fix-build-with-gcc48.patch
BuildRequires:  alsa-devel
BuildRequires:  cmake(Qt5Core)
BuildRequires:  cmake(Qt5Widgets)
BuildRequires:  cmake(Qt5Xml)
BuildRequires:  cmake(Qt5Sql)
BuildRequires:  cmake(Qt5Test)
BuildRequires:  cmake(KF5Config)
BuildRequires:  cmake(KF5Contacts)
BuildRequires:  cmake(KF5CoreAddons)
BuildRequires:  cmake(KF5Crash)
BuildRequires:  cmake(KF5DBusAddons)
BuildRequires:  cmake(KF5DNSSD)
BuildRequires:  cmake(KF5DocTools)
BuildRequires:  cmake(KF5Emoticons)
BuildRequires:  cmake(KF5I18n)
BuildRequires:  cmake(KF5IdentityManagement)
BuildRequires:  cmake(KF5KCMUtils)
BuildRequires:  cmake(KF5KHtml)
BuildRequires:  cmake(KF5NotifyConfig)
BuildRequires:  cmake(KF5Parts)
BuildRequires:  cmake(KF5TextEditor)
BuildRequires:  cmake(KF5Wallet)
BuildRequires:  cmake(KF5KDELibs4Support)
BuildRequires:  cmake(KF5Libkleo)
BuildRequires:  extra-cmake-modules
BuildRequires:  giflib-devel
BuildRequires:  libgadu-devel
BuildRequires:  libidn-devel
BuildRequires:  libjasper-devel
BuildRequires:  libqca-qt5-devel
BuildRequires:  libv4l-devel
BuildRequires:  libxml2-devel
BuildRequires:  libxslt-devel
BuildRequires:  meanwhile-devel
%if 0%{?is_opensuse} || !0%{?sle_version}
BuildRequires:  mediastreamer2-devel
BuildRequires:  openslp-devel
BuildRequires:  pkgconfig
BuildRequires:  speex-devel
BuildRequires:  sqlite-devel
BuildRequires:  phonon4qt5-devel
BuildRequires:  pkgconfig(expat)
BuildRequires:  pkgconfig(libotr) >= 4.0.0
BuildRequires:  pkgconfig(libsrtp)
%if 0%{?is_opensuse} || !0%{?sle_version}
BuildRequires:  pkgconfig(ortp) >= 0.22
BuildRequires:  update-desktop-files
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Kopete is the KDE instant messenger and supports multiple protocols.

%package devel
Summary:        Instant Messenger - Development Files
Group:          Productivity/Networking/Instant Messenger
Requires:       kopete >= %{version}

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

%if %{with_lang}

%setup -q
%if 0%{?suse_version} < 1500
%patch -p1

  %cmake_kf5 -d build

%kf5_makeinstall -C build
%suse_update_desktop_file org.kde.kopete          Network  InstantMessaging
%if %{with lang}
  %find_lang %{name} --with-man --all-name

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


%files devel

%if %{with lang}
%files lang -f %{name}.lang
%license COPYING*