File pam_ssh_agent_auth.spec of Package pam_ssh_agent_auth

#
# spec file for package pam_ssh_agent_auth
#
# Copyright (c) 2025 SUSE LLC
#
# 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/
#
# nodebuginfo


%{!?_pam_moduledir: %define _pam_moduledir /%{_lib}/security}

Name:           pam_ssh_agent_auth
Version:        0.10.4
Release:        0.1
Summary:        Permits PAM authentication via your keyring in a forwarded ssh-agent
License:        OpenSSL
Group:          Development/Tools/Other
URL:            https://github.com/jbeverly/pam_ssh_agent_auth
# source + submodules handled by obs_scm service
Source:         %{name}-%{version}.tar
### 20241107: having issues compiling with gcc14, but this patch helps
Patch0:         gcc14-configure.patch
Patch1:         dot-c.patch
Patch2:         bsd-misc.patch
###
# https://github.com/jbeverly/pam_ssh_agent_auth/compare/master...FlorianFranzen:pam_ssh_agent_auth:just-one-big-cookie.patch
Patch3:         just-one-big-cookie.patch
# https://github.com/jbeverly/pam_ssh_agent_auth/compare/master...raptaAI:pam_ssh_agent_auth:add_ecdsa_sk.patch
# incomplete?
#Patch4:         add_ecdsa_sk.patch
# https://github.com/jbeverly/pam_ssh_agent_auth/pull/35.patch
Patch5:         add-argument-default_ssh_auth_sock-and-some-fixes.patch
# https://github.com/jbeverly/pam_ssh_agent_auth/pull/37.patch
Patch6:         Use-SHA256-instead-of-MD5-for-key-fingerprints.patch
# https://github.com/jbeverly/pam_ssh_agent_auth/pull/43.patch
# patch needs updating, don't care enough atm
#Patch7:         allow-regular-user-usage.patch
#BuildRequires:  gcc13
BuildRequires:  git-core
BuildRequires:  openssl-devel
BuildRequires:  pam-devel
BuildRequires:  perl
BuildRequires:  sed

%description
pam_ssh_agent_auth is a PAM module which permits PAM
authentication via your keyring in a forwarded ssh-agent.

%prep
%autosetup -Sgit_am -N
### 20241107: for gcc14
%patch -p1 -P 0
%patch -P 1
%patch -P 2
#####
%autopatch -m 3

%build
### 20241107: won't be required for gcc14
#export CC=gcc-13
#####
%configure \
  --without-openssl-header-check \
  --with-mantype=man \
  --libexecdir=%{_pam_moduledir}
%make_build

%install
%make_install

%files
%doc README
%license LICENSE.OpenSSL
%{_mandir}/man8/%{name}.8*
%{_pam_moduledir}/%{name}.so

%changelog
openSUSE Build Service is sponsored by