From 167362b0e57cc9af6877982bac92ec0cd7b43622 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sun, 10 Jun 2018 00:18:44 -0400 Subject: [PATCH] Initial import (#1586367). --- .gitignore | 1 + R-hunspell.spec | 116 ++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 3 -- sources | 1 + 4 files changed, 118 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 R-hunspell.spec delete mode 100644 README.md create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e679b77 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/hunspell_2.9.tar.gz diff --git a/R-hunspell.spec b/R-hunspell.spec new file mode 100644 index 0000000..9110c30 --- /dev/null +++ b/R-hunspell.spec @@ -0,0 +1,116 @@ +%global packname hunspell +%global rlibdir %{_libdir}/R/library + +# Dependency loops. +%global with_suggests 0 +# Some examples use network to download stuff. +%bcond_with network 0 + +Name: R-%{packname} +Version: 2.9 +Release: 1%{?dist} +Summary: High-Performance Stemmer, Tokenizer, and Spell Checker + +License: GPLv2 or LGPLv2 or MPLv1.1 +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-Rcpp, R-digest +# Suggests: R-spelling, R-testthat, R-pdftools, R-janeaustenr, R-wordcloud2, R-knitr, R-rmarkdown +# LinkingTo: +# Enhances: + +Requires: R-Rcpp +Requires: R-digest +Suggests: R-spelling +Suggests: R-testthat +Suggests: R-pdftools +Suggests: R-janeaustenr +Suggests: R-wordcloud2 +Suggests: R-knitr +Suggests: R-rmarkdown +BuildRequires: R-devel +BuildRequires: tex(latex) +BuildRequires: R-Rcpp-devel +BuildRequires: R-digest +BuildRequires: R-knitr +BuildRequires: R-rmarkdown +BuildRequires: R-testthat +BuildRequires: R-pdftools +%if %{with_suggests} +BuildRequires: R-spelling +BuildRequires: R-janeaustenr +BuildRequires: R-wordcloud2 +%endif + +# Not currently possible to unbundle at the moment. +# https://github.com/ropensci/hunspell/issues/34 +Provides: bundled(hunspell) = 1.6.1 + +%description +Low level spell checker and morphological analyzer based on the famous +'hunspell' library . The package can analyze +or check individual words as well as parse text, latex, html or xml +documents. For a more user-friendly interface use the 'spelling' package +which builds on this package to automate checking of files, documentation +and vignettes in all common formats. + + +%prep +%setup -q -c -n %{packname} + +# Fix executable bits. +chmod -x %{packname}/inst/dict/*.{aff,dic} + + +%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 +# Can't run spell check with dependency loop. +%if !%{with_suggests} +rm %{packname}/tests/spelling.R +%endif + +export LANG=C.UTF-8 +# Skip vignettes using the network. +%if !%{with network} +ARGS="--no-examples --no-vignettes" +%endif +%if %{with_suggests} +%{_bindir}/R CMD check %{packname} $ARGS +%else +_R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname} $ARGS +%endif + + +%files +%dir %{rlibdir}/%{packname} +%doc %{rlibdir}/%{packname}/doc +%doc %{rlibdir}/%{packname}/html +%{rlibdir}/%{packname}/DESCRIPTION +%doc %{rlibdir}/%{packname}/NEWS +%doc %{rlibdir}/%{packname}/AUTHORS +%{rlibdir}/%{packname}/INDEX +%{rlibdir}/%{packname}/NAMESPACE +%{rlibdir}/%{packname}/Meta +%{rlibdir}/%{packname}/R +%{rlibdir}/%{packname}/help +%{rlibdir}/%{packname}/dict +%{rlibdir}/%{packname}/WORDLIST +%dir %{rlibdir}/%{packname}/libs +%{rlibdir}/%{packname}/libs/%{packname}.so + + +%changelog +* Tue Jun 05 2018 Elliott Sales de Andrade - 2.9-1 +- initial package for Fedora diff --git a/README.md b/README.md deleted file mode 100644 index ecbe866..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# R-hunspell - -The R-hunspell package \ No newline at end of file diff --git a/sources b/sources new file mode 100644 index 0000000..532efe0 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (hunspell_2.9.tar.gz) = ddd0e378772c034bc8f1fa7bb89a9f8597f379e8aa8f7b4abef4c6ce0f8e07cacc063db9de70f154ba431e659b2143ab1479a397f3d26f0fce80e934aaad2df9