File kscreenlocker.spec of Package kscreenlocker.openSUSE_Backports_SLE-12-SP3

# spec file for package kscreenlocker
# 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

%bcond_without lang
Name:           kscreenlocker
Version:        5.8.7
Release:        0
Summary:        Library and components for secure lock screen architecture
License:        GPL-2.0+
Group:          System/GUI/KDE
# PATCH-FIX-OPENSUSE fix-wayland-version-requirement.diff -- Changes wayland requirement from 1.3 to 1.2.1
Patch0:         fix-wayland-version-requirement.diff
# PATCH-FIX-UPSTREAM 0001-Fixup-protocol-mismatch-between-greeter-and-kcheckpa.patch
Patch100:       0001-Fixup-protocol-mismatch-between-greeter-and-kcheckpa.patch
BuildRequires:  cmake >= 2.8.12
BuildRequires:  extra-cmake-modules >= 1.8.0
BuildRequires:  kf5-filesystem
BuildRequires:  pam-config
BuildRequires:  pam-devel
BuildRequires:  cmake(KF5Crash) >= 5.15.0
BuildRequires:  cmake(KF5Declarative) >= 5.15.0
BuildRequires:  cmake(KF5GlobalAccel) >= 5.15.0
BuildRequires:  cmake(KF5I18n) >= 5.15.0
BuildRequires:  cmake(KF5IdleTime) >= 5.15.0
BuildRequires:  cmake(KF5KCMUtils) >= 5.15.0
BuildRequires:  cmake(KF5Notifications) >= 5.15.0
BuildRequires:  cmake(KF5Solid) >= 5.15.0
BuildRequires:  cmake(KF5TextWidgets) >= 5.15.0
BuildRequires:  cmake(KF5Wayland)
BuildRequires:  cmake(KF5WindowSystem) >= 5.15.0
BuildRequires:  cmake(KF5XmlGui) >= 5.15.0
BuildRequires:  cmake(Qt5Quick) >= 5.5.0
BuildRequires:  cmake(Qt5QuickWidgets) >= 5.5.0
BuildRequires:  cmake(Qt5Test) >= 5.5.0
BuildRequires:  cmake(Qt5Widgets) >= 5.5.0
BuildRequires:  cmake(Qt5X11Extras) >= 5.5.0
BuildRequires:  pkgconfig(wayland-client)
BuildRequires:  pkgconfig(wayland-server)
BuildRequires:  pkgconfig(x11)
BuildRequires:  pkgconfig(xcb)
BuildRequires:  pkgconfig(xcb-keysyms)
BuildRequires:  pkgconfig(xcursor)
BuildRequires:  pkgconfig(xi)
Requires(post): pam-config
%if %{with lang}
Recommends:     %{name}-lang
Obsoletes:      %{name}-lang
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Library and components for secure lock screen architecture.

%package -n libKScreenLocker5
Summary:        Library and components for secure lock screen architecture
Group:          System/GUI/KDE

%description -n libKScreenLocker5
Library and components for secure lock screen architecture.

%package devel
Summary:        Library and components for secure lock screen architecture - development files
Group:          Development/Libraries/C and C++
Requires:       libKScreenLocker5 = %{version}
Requires:       cmake(Qt5Core) >= 5.5.0
Requires:       cmake(Qt5X11Extras) >= 5.5.0

%description devel
Development files for Library and components for secure lock screen architecture.

%setup -q -n %{name}-%{version}
%if 0%{?suse_version} == 1315 && !0%{?is_opensuse}
# SLE12 has a patched 1.2.1 wayland with all features KDE needs from up to 1.7.0
%patch0 -p1
%patch100 -p1

  %cmake_kf5 -d build -- -DKDE4_COMMON_PAM_SERVICE=xdm -DCMAKE_INSTALL_LOCALEDIR=%{_kf5_localedir}

  %kf5_makeinstall -C build
%if %{with lang}

# boo#931296
/usr/sbin/pam-config -d --unix2 || :
/usr/sbin/pam-config -a --unix || :

%post -n libKScreenLocker5 -p /sbin/ldconfig

%postun -n libKScreenLocker5 -p /sbin/ldconfig

%if %{with lang}
%files lang -f %{name}.lang


%files -n libKScreenLocker5

%files devel