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.2.0
Release:          1%{?dist}
Summary:          Prepare Reproducible Example Code via the Clipboard

License:          MIT
URL:    {packname}/index.html

# Here's the R view of the dependencies world:
# Depends:
# Imports:   R-callr >= 2.0.0, R-clipr >= 0.4.0, R-rlang, R-rmarkdown, R-tools, R-utils, R-whisker, R-withr
# Suggests:  R-covr, R-devtools, R-fortunes, R-knitr, R-miniUI, R-rprojroot, R-rstudioapi, R-shiny, R-styler, R-testthat >= 2.0.0
# LinkingTo:
# Enhances:

BuildArch:        noarch
Requires:         pandoc >= 1.12.3
Requires:         R-core
Requires:         R-callr >= 2.0.0
Requires:         R-clipr >= 0.4.0
Requires:         R-rlang
Requires:         R-rmarkdown
Requires:         R-tools
Requires:         R-utils
Requires:         R-whisker
Requires:         R-withr
Suggests:         R-devtools
Suggests:         R-fortunes
Suggests:         R-knitr
Suggests:         R-miniUI
Suggests:         R-rstudioapi
Suggests:         R-shiny
Suggests:         R-styler
BuildRequires:    R-devel
BuildRequires:    tex(latex)
BuildRequires:    pandoc >= 1.12.3
BuildRequires:    R-callr >= 2.0.0
BuildRequires:    R-clipr >= 0.4.0
BuildRequires:    R-rlang
BuildRequires:    R-rmarkdown
BuildRequires:    R-tools
BuildRequires:    R-utils
BuildRequires:    R-whisker
BuildRequires:    R-withr
BuildRequires:    R-testthat >= 2.0.0
%if %{with_suggests}
BuildRequires:    R-devtools
BuildRequires:    R-fortunes
BuildRequires:    R-knitr
BuildRequires:    R-miniUI
BuildRequires:    R-rstudioapi
BuildRequires:    R-shiny
BuildRequires:    R-styler

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. The user's clipboard is the default
source of input code and the default target for rendered output. 'reprex'
also extracts clean, runnable R code from various common formats, such as
copy/paste from an R session.

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

# Don't need coverage; it's not packaged either.
sed -i 's/covr, //g' %{packname}/DESCRIPTION


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

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

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

* Sun Jul 01 2018 Elliott Sales de Andrade <> - 0.2.0-1
- Update to latest version
- Enable more tests

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