File R-stringdist.spec of Package R-stringdist

#
# spec file for package R-stringdist
#
# 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  stringdist
%global rlibdir   %{_libdir}/R/library
Name:           R-%{packname}
Version:        0.9.5.5
Release:        0
Summary:        Approximate String Matching and String Distance Functions
License:        MIT
Group:          Development/Libraries/Other
URL:            https://cran.r-project.org/web/packages/stringdist/
Source0:        %{packname}_%{version}.tar.gz
BuildRequires:  R-base-devel
BuildRequires:  R-parallel
BuildRequires:  fdupes
BuildRequires:  gcc
BuildRequires:  texinfo
BuildRequires:  tex(inconsolata.sty)
Requires:       R-base

%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 stringdist

%files
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/html
%doc %{rlibdir}/%{packname}/doc
%doc %{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/NEWS
%license %{rlibdir}/%{packname}/CITATION
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/include
%{rlibdir}/%{packname}/libs
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/tinytest
%{rlibdir}/%{packname}/help

%changelog
openSUSE Build Service is sponsored by