Blob Blame History Raw
%global packname  reprex
%global rlibdir  %{_datadir}/R/library

# Not all available yet.
%global with_suggests 0

Name:             R-%{packname}
Version:          0.1.2
Release:          1%{?dist}
Summary:          Prepare Reproducible Example Code for Sharing

License:          MIT
URL:    {packname}/index.html
# Skip a broken test that's also skipped in upstream master.
Patch0001:        Skip-broken-test.patch

# Here's the R view of the dependencies world:
# Depends:
# Imports:   R-callr, R-knitr, R-rmarkdown, R-tools, R-utils, R-whisker
# Suggests:  R-covr, R-devtools, R-formatR, R-fortunes, R-miniUI, R-rstudioapi, R-shiny, R-shinyjs, R-testthat
# LinkingTo:
# Enhances:

BuildArch:        noarch
Requires:         R-core
Requires:         R-callr
Requires:         R-knitr
Requires:         R-rmarkdown
Requires:         R-tools
Requires:         R-utils
Requires:         R-whisker
Suggests:         R-covr
Suggests:         R-devtools
Suggests:         R-formatR
Suggests:         R-fortunes
Suggests:         R-miniUI
Suggests:         R-rstudioapi
Suggests:         R-shiny
Suggests:         R-shinyjs
Suggests:         R-testthat
BuildRequires:    R-devel
BuildRequires:    tex(latex)
BuildRequires:    R-callr
BuildRequires:    R-knitr
BuildRequires:    R-rmarkdown
BuildRequires:    R-tools
BuildRequires:    R-utils
BuildRequires:    R-whisker
BuildRequires:    R-testthat
%if %{with_suggests}
BuildRequires:    R-devtools
BuildRequires:    R-formatR
BuildRequires:    R-fortunes
BuildRequires:    R-miniUI
BuildRequires:    R-rstudioapi
BuildRequires:    R-shiny
BuildRequires:    R-shinyjs

Convenience wrapper that uses the 'rmarkdown' package to render small
snippets of code to target formats that include both code and output. The
goal is to encourage the sharing of small, reproducible, and runnable
examples on code-oriented websites, such as <> and
<>, or in email. 'reprex' also extracts clean, runnable
R code from various common formats, such as copy/paste from an R session.

%setup -q -c -n %{packname}

pushd %{packname}
%patch0001 -p1


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

%if %{with_suggests}
%{_bindir}/R CMD check %{packname}
_R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname}

%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/html
%doc %{rlibdir}/%{packname}/
%license %{rlibdir}/%{packname}/LICENSE

* Tue Apr 24 2018 Elliott Sales de Andrade <> - 0.1.2-1
- initial package for Fedora