Name:           @PACKAGE_NAME@
Version:        @VERSION@
%if %{?_release:1}0
Release:        %{_release}%{?dist}
%else
Release:        1%{?dist}
%endif
Summary:        One-time passcode support using open standards

License:        ASL 2.0
URL:            https://github.com/google/google-authenticator
Source0:        %{name}-%{version}.tar.gz
BuildRequires:  gcc
BuildRequires:  pam-devel
BuildRequires:  libtool


%description
The Google Authenticator package contains a pluggable authentication
module (PAM) which allows login using one-time passcodes conforming to
the open standards developed by the Initiative for Open Authentication
(OATH) (which is unrelated to OAuth).

Passcode generators are available (separately) for several mobile
platforms.

These implementations support the HMAC-Based One-time Password (HOTP)
algorithm specified in RFC 4226 and the Time-based One-time Password
(TOTP) algorithm specified in RFC 6238.

%prep
%setup -q

%build
%configure --libdir=/%{_lib}
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT
rm $RPM_BUILD_ROOT/%{_lib}/security/pam_google_authenticator.la

%files
/%{_lib}/security/pam_google_authenticator.so
%{_bindir}/%{name}
%{_defaultdocdir}/%{name}/README.md
%{_defaultdocdir}/%{name}/totp.html
%{_defaultdocdir}/%{name}/FILEFORMAT
%{_mandir}/man1/*
%{_mandir}/man8/*


%changelog
* Fri Aug 18 2017 Niels Basjes <niels@basjes.nl> - 1.04
- Added installing man pages
* Wed Jan 13 2016 Dan Molik <dan@d3fy.net> - 1.01
- A new and updated build for google-authenticator
