File pam-ssh-agent.spec of Package pam-ssh-agent

Name:           pam-ssh-agent
Version:        0.9.5~0
Release:        0
Summary:        A PAM module for authenticating using ssh-agent
License:        MIT
Url:            https://github.com/nresare/pam-ssh-agent
Source0:        %{name}-%{version}.tar.zst
Source1:        vendor.tar.zst
BuildRequires:  cargo
BuildRequires:  cargo-packaging
BuildRequires:  pkgconfig(pam)
ExclusiveArch:  %{rust_tier1_arches}

%description
A PAM module for authenticating using ssh-agent

%prep
# The number passed to -a (a stands for "after") should be equivalent to the Source tag number
# of the vendor tarball, 1 in this case (from Source1).
%autosetup -p1 -a1
# Remove exec bits to prevent an issue in fedora shebang checking. Uncomment only if required.
# find vendor -type f -name \*.rs -exec chmod -x '{}' \;

%build
%{cargo_build}

%install
install -m644 -D %{_builddir}/%{name}-%{version}/target/release/libpam_ssh_agent.so %{buildroot}/%{_libdir}/security/pam_ssh_agent.so

%check
%{cargo_test}

%files
%{_libdir}/security/pam_ssh_agent.so

%changelog
openSUSE Build Service is sponsored by