Blame R-reprex.spec

612c66
%global packname  reprex
612c66
%global rlibdir  %{_datadir}/R/library
612c66
612c66
# Not all available yet.
612c66
%global with_suggests 0
612c66
612c66
Name:             R-%{packname}
f0000e
Version:          0.2.0
612c66
Release:          1%{?dist}
f0000e
Summary:          Prepare Reproducible Example Code via the Clipboard
612c66
612c66
License:          MIT
f0000e
URL:              https://cran.r-project.org/web/packages/%{packname}/index.html
f0000e
Source0:          https://cran.r-project.org/src/contrib/%{packname}_%{version}.tar.gz
612c66
612c66
# Here's the R view of the dependencies world:
612c66
# Depends:
f0000e
# Imports:   R-callr >= 2.0.0, R-clipr >= 0.4.0, R-rlang, R-rmarkdown, R-tools, R-utils, R-whisker, R-withr
f0000e
# Suggests:  R-covr, R-devtools, R-fortunes, R-knitr, R-miniUI, R-rprojroot, R-rstudioapi, R-shiny, R-styler, R-testthat >= 2.0.0
612c66
# LinkingTo:
612c66
# Enhances:
612c66
612c66
BuildArch:        noarch
f0000e
Requires:         pandoc >= 1.12.3
612c66
Requires:         R-core
f0000e
Requires:         R-callr >= 2.0.0
f0000e
Requires:         R-clipr >= 0.4.0
f0000e
Requires:         R-rlang
612c66
Requires:         R-rmarkdown
612c66
Requires:         R-tools
612c66
Requires:         R-utils
612c66
Requires:         R-whisker
f0000e
Requires:         R-withr
612c66
Suggests:         R-devtools
612c66
Suggests:         R-fortunes
f0000e
Suggests:         R-knitr
612c66
Suggests:         R-miniUI
612c66
Suggests:         R-rstudioapi
612c66
Suggests:         R-shiny
f0000e
Suggests:         R-styler
612c66
BuildRequires:    R-devel
612c66
BuildRequires:    tex(latex)
f0000e
BuildRequires:    pandoc >= 1.12.3
f0000e
BuildRequires:    R-callr >= 2.0.0
f0000e
BuildRequires:    R-clipr >= 0.4.0
f0000e
BuildRequires:    R-rlang
612c66
BuildRequires:    R-rmarkdown
612c66
BuildRequires:    R-tools
612c66
BuildRequires:    R-utils
612c66
BuildRequires:    R-whisker
f0000e
BuildRequires:    R-withr
f0000e
BuildRequires:    R-testthat >= 2.0.0
612c66
%if %{with_suggests}
612c66
BuildRequires:    R-devtools
612c66
BuildRequires:    R-fortunes
f0000e
BuildRequires:    R-knitr
612c66
BuildRequires:    R-miniUI
612c66
BuildRequires:    R-rstudioapi
612c66
BuildRequires:    R-shiny
f0000e
BuildRequires:    R-styler
612c66
%endif
612c66
612c66
%description
612c66
Convenience wrapper that uses the 'rmarkdown' package to render small
612c66
snippets of code to target formats that include both code and output. The
612c66
goal is to encourage the sharing of small, reproducible, and runnable
f0000e
examples on code-oriented websites, such as <https://stackoverflow.com>
f0000e
and <https://github.com>, or in email. The user's clipboard is the default
f0000e
source of input code and the default target for rendered output. 'reprex'
f0000e
also extracts clean, runnable R code from various common formats, such as
f0000e
copy/paste from an R session.
612c66
612c66
612c66
%prep
612c66
%setup -q -c -n %{packname}
612c66
f0000e
# Don't need coverage; it's not packaged either.
f0000e
sed -i 's/covr, //g' %{packname}/DESCRIPTION
612c66
612c66
612c66
%build
612c66
612c66
612c66
%install
612c66
mkdir -p %{buildroot}%{rlibdir}
612c66
%{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname}
612c66
test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so)
612c66
rm -f %{buildroot}%{rlibdir}/R.css
612c66
612c66
612c66
%check
f0000e
export NOT_CRAN=true
612c66
%if %{with_suggests}
612c66
%{_bindir}/R CMD check %{packname}
612c66
%else
612c66
_R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname}
612c66
%endif
612c66
612c66
612c66
%files
612c66
%dir %{rlibdir}/%{packname}
f0000e
%doc %{rlibdir}/%{packname}/doc
612c66
%doc %{rlibdir}/%{packname}/html
612c66
%{rlibdir}/%{packname}/DESCRIPTION
612c66
%doc %{rlibdir}/%{packname}/NEWS.md
612c66
%license %{rlibdir}/%{packname}/LICENSE
612c66
%{rlibdir}/%{packname}/INDEX
612c66
%{rlibdir}/%{packname}/NAMESPACE
612c66
%{rlibdir}/%{packname}/Meta
612c66
%{rlibdir}/%{packname}/R
612c66
%{rlibdir}/%{packname}/help
f0000e
%{rlibdir}/%{packname}/addins
612c66
%{rlibdir}/%{packname}/rstudio
612c66
%{rlibdir}/%{packname}/templates
612c66
612c66
612c66
%changelog
f0000e
* Sun Jul 01 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.2.0-1
f0000e
- Update to latest version
f0000e
- Enable more tests
f0000e
612c66
* Tue Apr 24 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.1.2-1
612c66
- initial package for Fedora