File google-authenticator-libpam.spec of Package google-authenticator-libpam

#
# spec file for package google-authenticator-libpam
#
# Copyright (c) 2017 SUSE LINUX 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 http://bugs.opensuse.org/
#


Name:           google-authenticator-libpam
Version:        1.03
Release:        0
Summary:        Google Authenticator PAM module
License:        Apache-2.0
Group:          Productivity/Security
Url:            https://github.com/google/google-authenticator-libpam
Source:         %{name}-%{version}.tar.xz
Source99:       baselibs.conf
BuildRequires:  libtool
BuildRequires:  pam-devel
# libqrencode.so.[23] are dynamically loaded if present in order to show a QR code
# As the library is not linked, it can't be auto-detected. And as it's not mandatory,
# we recommend it only
Recommends:     libqrencode3
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

%description
Integrate GOOGLE Authenticator into your login process for full 2FA.

%prep
%setup -q

%build
./bootstrap.sh
%configure \
    --libdir=/%{_lib} \
    --docdir=%{_docdir}/%{name}
make %{?_smp_mflags}

%install
make %{?_smp_mflags} DESTDIR=%{buildroot} install
find %{buildroot} -type f -name "*.la" -delete -print

%check
make test

%files
%defattr(-,root,root)
%doc README.md LICENSE
/%{_lib}/security/pam_google_authenticator.so
%{_bindir}/google-authenticator
%{_docdir}/%{name}

%changelog