88 lines
2.2 KiB
RPMSpec
88 lines
2.2 KiB
RPMSpec
|
%global packname formatR
|
||
|
%global rlibdir %{_datadir}/R/library
|
||
|
|
||
|
# R-shiny is not yet available.
|
||
|
%global with_suggests 0
|
||
|
|
||
|
Name: R-%{packname}
|
||
|
Version: 1.5
|
||
|
Release: 1%{?dist}
|
||
|
Summary: Format R Code Automatically
|
||
|
|
||
|
License: GPLv2+
|
||
|
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:
|
||
|
# Suggests: R-codetools, R-shiny, R-testit, R-rmarkdown, R-knitr
|
||
|
# LinkingTo:
|
||
|
# Enhances:
|
||
|
|
||
|
BuildArch: noarch
|
||
|
Requires: R-core
|
||
|
Suggests: R-codetools
|
||
|
Suggests: R-shiny
|
||
|
Suggests: R-testit
|
||
|
Suggests: R-rmarkdown
|
||
|
Suggests: R-knitr
|
||
|
BuildRequires: R-devel
|
||
|
BuildRequires: tex(latex)
|
||
|
BuildRequires: R-codetools
|
||
|
BuildRequires: R-testit
|
||
|
BuildRequires: R-rmarkdown
|
||
|
BuildRequires: R-knitr
|
||
|
%if %{with_suggests}
|
||
|
BuildRequires: R-shiny
|
||
|
%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 %{with_suggests}
|
||
|
%{_bindir}/R CMD check %{packname}
|
||
|
%else
|
||
|
_R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname}
|
||
|
%endif
|
||
|
|
||
|
|
||
|
%files
|
||
|
%dir %{rlibdir}/%{packname}
|
||
|
%doc %{rlibdir}/%{packname}/doc
|
||
|
%doc %{rlibdir}/%{packname}/html
|
||
|
%{rlibdir}/%{packname}/DESCRIPTION
|
||
|
%doc %{rlibdir}/%{packname}/NEWS
|
||
|
%{rlibdir}/%{packname}/INDEX
|
||
|
%{rlibdir}/%{packname}/NAMESPACE
|
||
|
%{rlibdir}/%{packname}/Meta
|
||
|
%{rlibdir}/%{packname}/R
|
||
|
%{rlibdir}/%{packname}/help
|
||
|
%{rlibdir}/%{packname}/format
|
||
|
%{rlibdir}/%{packname}/shiny
|
||
|
|
||
|
|
||
|
%changelog
|
||
|
* Tue Jun 05 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.5-1
|
||
|
- initial package for Fedora
|