%bcond_with bootstrap %global packname formatR %global packver 1.13 %global rlibdir %{_datadir}/R/library Name: R-%{packname} Version: %{packver} Release: %autorelease -e 1.riscv64 Summary: Format R Code Automatically # Automatically converted from old format: GPLv2+ - review is highly recommended. License: GPL-2.0-or-later URL: https://CRAN.R-project.org/package=%{packname} Source0: https://cran.r-project.org/src/contrib/%{packname}_%{packver}.tar.gz # Here's the R view of the dependencies world: # Depends: # Imports: # Suggests: R-codetools, R-shiny, R-testit, R-rmarkdown, R-knitr # LinkingTo: # Enhances: BuildArch: noarch BuildRequires: R-devel BuildRequires: tex(latex) %if %{without bootstrap} BuildRequires: R-rstudioapi BuildRequires: R-shiny BuildRequires: R-testit BuildRequires: R-rmarkdown BuildRequires: R-knitr %endif %description Provides a function tidy_source() to format R source code. Spaces and indent will be added to the code automatically, and comments will be preserved under certain conditions, so that R code will be more human-readable and tidy. There is also a Shiny app as a user interface in this package (see tidy_app()). %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 %check %if %{without bootstrap} %{_bindir}/R CMD check --ignore-vignettes %{packname} %endif %files %dir %{rlibdir}/%{packname} %doc %{rlibdir}/%{packname}/doc %doc %{rlibdir}/%{packname}/html %{rlibdir}/%{packname}/DESCRIPTION %doc %{rlibdir}/%{packname}/NEWS.Rd %{rlibdir}/%{packname}/INDEX %{rlibdir}/%{packname}/NAMESPACE %{rlibdir}/%{packname}/Meta %{rlibdir}/%{packname}/R %{rlibdir}/%{packname}/help %{rlibdir}/%{packname}/format %{rlibdir}/%{packname}/shiny %changelog %autochangelog