File R-argon2.spec of Package R-argon2
#
# spec file for package R-argon2
#
# Copyright (c) 2019 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 https://bugs.opensuse.org/
#
%global packname argon2
%global rlibdir %{_libdir}/R/library
Name: R-%{packname}
Version: 0.2.0
Release: 0
Summary: Secure Password Hashing
License: BSD-2-Clause
Group: Development/Libraries/Other
URL: http://cran.r-project.org/web/packages/%{packname}
Source: http://cran.r-project.org/src/contrib/%{packname}_0.2-0.tar.gz
BuildRequires: R-base-devel
BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: texinfo
%if 0%{?suse_version} <= 1220 && 0%{?suse_version} != 1110
BuildRequires: texlive-fonts-extra
%endif
%if 0%{?suse_version} >= 1500
BuildRequires: tex(inconsolata.sty)
%endif
Requires: R-base
%description
Utilities for secure password hashing via the argon2 algorithm. It is a
relatively new hashing algorithm and is believed to be very secure. The
'argon2' implementation included in the package is the reference
implementation. The package also includes some utilities that should be
useful for digest authentication, including a wrapper of 'blake2b'. For
similar R packages, see sodium and 'bcrypt'. See
<https://en.wikipedia.org/wiki/Argon2> or
<https://eprint.iacr.org/2015/430.pdf> for more information.
%prep
%setup -q -c -n %{packname}
find %{packname}/src \( -name '*.a' -or -name '*.o' -or -name '*.so' -or -name '*.lo' -or -name '*.la' \) -print -delete
%build
%install
mkdir -p %{buildroot}%{rlibdir}
%{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname}
find %{packname}/src \( -name '*.a' -or -name '*.o' -or -name '*.so' -or -name '*.lo' -or -name '*.la' \) -delete
rm -f %{buildroot}%{rlibdir}/R.css
%check
%{_bindir}/R CMD check %{packname}
%files
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/argon2/html
%license %{rlibdir}/%{packname}/CITATION
%license %{rlibdir}/argon2/LICENSE
%license %{rlibdir}/argon2/COPYRIGHTS
%{rlibdir}/argon2/help
%{rlibdir}/argon2/INDEX
%{rlibdir}/argon2/NAMESPACE
%{rlibdir}/argon2/Meta
%{rlibdir}/argon2/libs
%{rlibdir}/argon2/DESCRIPTION
%{rlibdir}/argon2/R
%changelog