2024-02-07 19:01:36 +01:00
|
|
|
#
|
|
|
|
# spec file for package pam_kwallet6
|
|
|
|
#
|
2024-03-13 17:58:36 +01:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2024-02-07 19:01:36 +01:00
|
|
|
#
|
|
|
|
# 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 https://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2024-02-25 13:05:26 +01:00
|
|
|
%define kf6_version 6.0.0
|
|
|
|
%define qt6_version 6.6.0
|
2024-02-07 19:01:36 +01:00
|
|
|
|
|
|
|
%define rname kwallet-pam
|
|
|
|
|
|
|
|
%bcond_without released
|
|
|
|
Name: pam_kwallet6
|
2024-03-26 23:05:15 +01:00
|
|
|
Version: 6.0.3
|
2024-02-07 19:01:36 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: A PAM Module for KWallet signing
|
|
|
|
License: GPL-2.0-or-later AND LGPL-2.1-only AND GPL-3.0-only
|
|
|
|
URL: https://www.kde.org/
|
2024-03-06 16:50:28 +01:00
|
|
|
Source: https://download.kde.org/stable/plasma/%{version}/%{rname}-%{version}.tar.xz
|
2024-02-07 19:01:36 +01:00
|
|
|
%if %{with released}
|
2024-03-06 16:50:28 +01:00
|
|
|
Source1: https://download.kde.org/stable/plasma/%{version}/%{rname}-%{version}.tar.xz.sig
|
2024-02-07 19:01:36 +01:00
|
|
|
Source2: plasma.keyring
|
|
|
|
%endif
|
|
|
|
Source3: baselibs.conf
|
2024-03-15 09:37:53 +01:00
|
|
|
# PATCH-FEATURE-OPENSUSE
|
|
|
|
Patch1: 0001-Allow-specifing-KWALLETD_BIN_PATH-manually.patch
|
|
|
|
Patch2: 0002-Use-GNUInstallDirs-instead-of-KDEInstallDirs.patch
|
2024-02-07 19:01:36 +01:00
|
|
|
BuildRequires: kf6-extra-cmake-modules >= %{kf6_version}
|
|
|
|
BuildRequires: pam-devel
|
|
|
|
BuildRequires: pkgconfig
|
|
|
|
BuildRequires: socat
|
|
|
|
BuildRequires: pkgconfig(libgcrypt) >= 1.5.0
|
|
|
|
# PAM modules need to be available for all archs of PAM on the system, otherwise pam-config
|
|
|
|
# will not enable it.
|
|
|
|
# Technically there can be different suffixes than just -32bit, but that's the most common.
|
|
|
|
# Expressing a hard dependency the other way around in baselibs.conf is not possible.
|
|
|
|
Requires: (%{name}-32bit if pam-32bit)
|
|
|
|
Requires: pam_kwallet6-common = %{version}
|
|
|
|
Requires(post): coreutils
|
|
|
|
Requires(post): pam
|
|
|
|
Requires(post): pam-config
|
2024-03-26 23:05:15 +01:00
|
|
|
Requires(postun):coreutils
|
|
|
|
Requires(postun):pam
|
|
|
|
Requires(postun):pam-config
|
2024-03-05 09:08:06 +01:00
|
|
|
Provides: pam_kwallet = %{version}
|
|
|
|
Obsoletes: pam_kwallet < %{version}
|
2024-02-07 19:01:36 +01:00
|
|
|
|
|
|
|
%description
|
|
|
|
This PAM module allows you to automatically open your kwallet
|
|
|
|
when signing into your account.
|
|
|
|
|
|
|
|
%package common
|
|
|
|
Summary: Support files for the KWallet PAM module
|
|
|
|
Requires: kwalletd6
|
|
|
|
Requires: socat
|
2024-03-05 09:08:06 +01:00
|
|
|
Provides: pam_kwallet-common = %{version}
|
|
|
|
Obsoletes: pam_kwallet-common < %{version}
|
2024-02-07 19:01:36 +01:00
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
%description common
|
|
|
|
This package contains support files used by the KWallet PAM
|
|
|
|
module.
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -p1 -n %{rname}-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
# Before usrmerge, the PAM module goes into /lib*/security/
|
2024-03-15 09:37:53 +01:00
|
|
|
%cmake_kf6 -DKWALLETD_BIN_PATH=%{_kf6_bindir}/kwalletd6 \
|
|
|
|
-DCMAKE_INSTALL_LIBEXECDIR=%{_libexecdir} \
|
2024-02-07 19:01:36 +01:00
|
|
|
%if 0%{?suse_version} < 1550
|
2024-03-15 09:37:53 +01:00
|
|
|
-DCMAKE_INSTALL_LIBDIR=/%{_lib}
|
2024-02-07 19:01:36 +01:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%kf6_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%kf6_install
|
|
|
|
|
2024-03-15 09:37:53 +01:00
|
|
|
# Try to enable it in %post already, but it might not work at this time.
|
|
|
|
# Due to boo#728586 it is necessary to duplicate this in the 32bit variant,
|
|
|
|
# so you need to edit baselibs.conf if you change this.
|
2024-02-07 19:01:36 +01:00
|
|
|
%post
|
|
|
|
%{_sbindir}/pam-config -a --kwallet5 || :
|
|
|
|
|
|
|
|
%postun
|
|
|
|
if [ "$1" = "0" ]; then
|
|
|
|
%{_sbindir}/pam-config -d --kwallet5 || :
|
|
|
|
fi
|
|
|
|
|
2024-03-15 09:37:53 +01:00
|
|
|
# Enable this in posttrans to win over the old package's %postun
|
|
|
|
# and to run once the modules are installed for all archs (boo#728586).
|
|
|
|
%posttrans
|
|
|
|
%{_sbindir}/pam-config -a --kwallet5 || :
|
|
|
|
|
2024-02-07 19:01:36 +01:00
|
|
|
%post common
|
|
|
|
%{systemd_user_post plasma-kwallet-pam.service}
|
|
|
|
|
|
|
|
%preun common
|
|
|
|
%{systemd_user_preun plasma-kwallet-pam.service}
|
|
|
|
|
|
|
|
%postun common
|
|
|
|
%{systemd_user_postun plasma-kwallet-pam.service}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%license LICENSES/*
|
2024-03-05 13:37:54 +01:00
|
|
|
# Yes, it's still called pam_kwallet5. Not sure whether that's intentional,
|
|
|
|
# but it means PAM config doesn't need migration which is nice.
|
2024-02-07 19:01:36 +01:00
|
|
|
%if 0%{?suse_version} >= 1550
|
|
|
|
%{_pam_moduledir}/pam_kwallet5.so
|
|
|
|
%else
|
|
|
|
/%{_lib}/security/pam_kwallet5.so
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%files common
|
|
|
|
%license LICENSES/*
|
|
|
|
%config %{_kf6_configdir}/autostart/pam_kwallet_init.desktop
|
|
|
|
%{_libexecdir}/pam_kwallet_init
|
|
|
|
%{_userunitdir}/plasma-kwallet-pam.service
|
|
|
|
|
|
|
|
%changelog
|