%global packname stringdist
%global rlibdir %{_libdir}/R/library
Name: R-%{packname}
Version: 0.9.4.7
Release: 2%{?dist}
Summary: Approximate String Matching and String Distance Functions
License: GPLv3
URL: https://cran.r-project.org/web/packages/%{packname}/index.html
Source0: https://cran.r-project.org/src/contrib/%{packname}_%{version}.tar.gz
# Here's the R view of the dependencies world:
# Depends:
# Imports: R-parallel
# Suggests: R-testthat
# LinkingTo:
# Enhances:
Requires: R-parallel
Requires: R-testthat
BuildRequires: R-devel tex(latex)
BuildRequires: R-parallel
BuildRequires: R-testthat
%description
Implements an approximate string matching version of R's native 'match'
function. Can calculate various string distances based on edits
(Damerau-Levenshtein, Hamming, Levenshtein, optimal sting alignment),
qgrams (q- gram, cosine, jaccard distance) or heuristic metrics (Jaro,
Jaro-Winkler). An implementation of soundex is provided as well. Distances
can be computed between character vectors while taking proper care of
encoding or between integer vectors representing generic sequences.
%prep
%setup -q -c -n %{packname}
%build
%install
mkdir -p %{buildroot}%{rlibdir}
%{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname}
test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so)
rm -f %{buildroot}%{rlibdir}/R.css
%check
%{_bindir}/R CMD check %{packname}
%files
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/html
%{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/NEWS
%doc %{rlibdir}/%{packname}/CITATION
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%dir %{rlibdir}/%{packname}/libs
%{rlibdir}/%{packname}/libs/%{packname}.so
%changelog
* Fri May 18 2018 Tom Callaway <spot@fedoraproject.org> - 0.9.4.7-2
- rebuild for R 3.5.0
* Sat Mar 17 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.9.4.7-1
- initial package for Fedora