File pam_kwallet.spec of Package pam_kwallet

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

Name:           pam_kwallet
Version:        0.0.1~git20140517
Release:        0
Summary:        KWallet PAM module
License:        LGPL-2.1+
Group:          System/GUI/KDE
Source0:        pam-kwallet-%{version}.tar.xz
# PATCH-FIX-OPENSUSE 0001-openSUSE-adjustements.patch -- adjust hardcoded paths to the one we're using in openSUSE
Patch0:         0001-openSUSE-adjustements.patch
BuildRequires:  cmake >= 2.8
BuildRequires:  kde4-filesystem
BuildRequires:  pam-devel
BuildRequires:  gcc-c++
BuildRequires:  libgcrypt-devel >= 1.5.0
PreReq:         pam-config >= 0.87
Requires:       socat
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

KDE creature for your desktop

%setup -q -n pam-kwallet-%{version}
%patch0 -p1
sed -i 's|/lib/${CMAKE_LIBRARY_ARCHITECTURE}|/%{_lib}|g' CMakeLists.txt

  %cmake_kde4 -d build

  %kde4_makeinstall -C build

%{_sbindir}/pam-config --service xdm -a --kwallet || true

if [ "$1" == "0" ]; then
  %{_sbindir}/pam-config --service xdm -d --kwallet || true

%attr(555,root,root) /%{_lib}/security/