%global __brp_check_rpaths %{nil} %global packname spellcheckr %global packver 0.1.2 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 0.1.2 Release: 3%{?dist}%{?buildtag} Summary: Correct the Spelling of a Given Word in the English Language License: GPL-2 | GPL-3 URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel >= 2.10 Requires: R-core >= 2.10 BuildArch: noarch BuildRequires: R-CRAN-data.table BuildRequires: R-CRAN-dplyr BuildRequires: R-CRAN-stringr Requires: R-CRAN-data.table Requires: R-CRAN-dplyr Requires: R-CRAN-stringr %description Corrects the spelling of a given word in English using a modification of Peter Norvig's spell correct algorithm (see ) which handles up to three edits. The algorithm tries to find the spelling with maximum probability of intended correction out of all possible candidate corrections from the original word. %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 %files %{rlibdir}/%{packname}