Add scriptlets for pam-config

OBS-URL: https://build.opensuse.org/package/show/KDE:Frameworks5/pam_kwallet?expand=0&rev=34
This commit is contained in:
Fabian Vogt 2017-08-02 09:11:37 +00:00 committed by Git OBS Bridge
parent d3c7676b1e
commit d90f30f862
2 changed files with 12 additions and 1 deletions

View File

@ -1,4 +1,4 @@
pam_kwallet
requires "pam_kwallet = <version>"
supplements "packageand(pam_kwallet:pam-<targettype>)"
post "%{_sbindir}/pam-config -a --kwallet5 || :"

View File

@ -32,6 +32,7 @@ BuildRequires: pam-devel
BuildRequires: socat
BuildRequires: xz
Requires: %{name}-common = %{version}
Requires(postun): coreutils pam pam-config
%description
This PAM module allows you to automatically open your kwallet
@ -57,6 +58,16 @@ module.
%install
%kf5_makeinstall -C build
# 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.
%post
%{_sbindir}/pam-config -a --kwallet5 || :
%postun
if [ "$1" = "0" ]; then
%{_sbindir}/pam-config -d --kwallet5 || :
fi
%files
%defattr(-,root,root)
%doc COPYING*