File ktp-common-internals.spec of Package ktp-common-internals

#
# spec file for package ktp-common-internals
#
# 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/
#

%bcond_without lang

Name:           ktp-common-internals
Version:        17.04.2
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:        Telepathy common module
License:        LGPL-2.1+
Group:          Development/Libraries/Other
Url:            Real-Time_Communication_and_Collaboration
Source:         %{name}-%{version}.tar.xz
BuildRequires:  doxygen
BuildRequires:  extra-cmake-modules
BuildRequires:  fdupes
BuildRequires:  kaccounts-integration-devel
BuildRequires:  kcmutils-devel
BuildRequires:  kconfig-devel
BuildRequires:  kcoreaddons-devel
BuildRequires:  kf5-filesystem
BuildRequires:  kiconthemes-devel
BuildRequires:  kio-devel
BuildRequires:  knotifications-devel
BuildRequires:  knotifyconfig-devel
BuildRequires:  kpeople5-devel
BuildRequires:  ktexteditor-devel
BuildRequires:  kwallet-devel
BuildRequires:  kwidgetsaddons-devel
BuildRequires:  kwindowsystem-devel
BuildRequires:  libaccounts-glib-devel
BuildRequires:  libaccounts-qt5-devel
BuildRequires:  libgcrypt-devel
BuildRequires:  libsignon-qt5-devel
BuildRequires:  pkgconfig
BuildRequires:  telepathy-accounts-signon
BuildRequires:  telepathy-logger-qt5-devel
BuildRequires:  telepathy-mission-control-devel
BuildRequires:  telepathy-qt5-devel
BuildRequires:  pkgconfig(Qt5Qml) >= 5.2.0
BuildRequires:  pkgconfig(Qt5Sql) >= 5.2.0
BuildRequires:  pkgconfig(Qt5Test) >= 5.2.0
BuildRequires:  pkgconfig(Qt5Widgets) >= 5.2.0
BuildRequires:  pkgconfig(libotr) >= 4.0.0
Requires:       ktp-icons
Requires:       telepathy-accounts-signon
Provides:       libktpcommoninternals6 = %{version}
Provides:       libktpcommoninternals7 = %{version}
Provides:       libktpcommoninternals8 = %{version}
Obsoletes:      libktpcommoninternals6 < %{version}
Obsoletes:      libktpcommoninternals7 < %{version}
Obsoletes:      libktpcommoninternals8 <= %{version}
Obsoletes:      %{name}5 < %{version}
Provides:       %{name}5 = %{version}
Obsoletes:      ktp-kpeople < %{version}
Recommends:     %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
ktp-common-internals is the base library for all the KDE Telepathy packages.

%package devel
Summary:        Telepathy common module
Group:          Development/Libraries/Other
Requires:       %{name} = %{version}
Requires:       extra-cmake-modules
Requires:       kcmutils-devel
Requires:       kwallet-devel
Requires:       pkgconfig
Requires:       telepathy-logger-qt5-devel
Requires:       telepathy-qt5-devel
Requires:       pkgconfig(Qt5Widgets)
Obsoletes:      %{name}5-devel < %{version}
Provides:       %{name}5-devel = %{version}

%description devel
ktp-common-internals is the base library for all the KDE Telepathy packages.

%package -n ktp-icons
Summary:        Icons for KDE Telepathy
Group:          Development/Libraries/Other
Obsoletes:      ktp-icons5 < %{version}
Provides:       ktp-icons5 = %{version}

%description -n ktp-icons
icons for all the KDE Telepathy packages.

%if %{with lang}
%lang_package
%endif

%prep
%setup -q

%build
  %cmake_kf5 -d build
  %make_jobs

%install
  %kf5_makeinstall -C build
  %if %{with lang}
    %find_lang %{name} --with-man --all-name
  %endif

  %fdupes -s %{buildroot}

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

%files
%defattr(-,root,root)
%doc COPYING*
%{_kf5_bindir}/ktp-debugger
%{_kf5_libdir}/libKTpCommonInternals.so.*
%{_kf5_libdir}/libKTpModels.so.*
%{_kf5_libdir}/libKTpWidgets.so.*
%{_kf5_libdir}/libKTpLogger.so.*
%{_kf5_libdir}/libKTpOTR.so.*
%{_kf5_libdir}/libexec/
%{_kf5_plugindir}/
%{_kf5_sharedir}/katepart5/
%{_kf5_qmldir}/
%{_kf5_notifydir}/
%{_kf5_servicesdir}/
%{_kf5_servicetypesdir}/
%{_kf5_sharedir}/config.kcfg/
%{_kf5_sharedir}/dbus-1/services/org.freedesktop.Telepathy.Client.KTp.Proxy.service
%{_kf5_sharedir}/telepathy/

%files -n ktp-icons
%defattr(-,root,root)
%{_kf5_iconsdir}/hicolor/

%files devel
%defattr(-,root,root)
%{_kf5_prefix}/include/KTp/
%{_kf5_libdir}/libKTpCommonInternals.so
%{_kf5_libdir}/libKTpModels.so
%{_kf5_libdir}/libKTpWidgets.so
%{_kf5_libdir}/libKTpLogger.so
%{_kf5_libdir}/libKTpOTR.so
%{_kf5_libdir}/cmake/KTp/

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

%changelog
openSUSE Build Service is sponsored by