%global packname munsell %global rlibdir %{_datadir}/R/library # ggplot2 uses this, making a loop. %global with_loop 0 Name: R-%{packname} Version: 0.4.3 Release: 1%{?dist} Summary: Utilities for Using Munsell Colours License: MIT 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: R-colorspace, R-methods # Suggests: R-ggplot2, R-testthat # LinkingTo: # Enhances: BuildArch: noarch Requires: R-core Requires: R-colorspace Requires: R-methods Suggests: R-ggplot2 BuildRequires: R-devel BuildRequires: tex(latex) BuildRequires: R-colorspace BuildRequires: R-methods BuildRequires: R-testthat %if %{with_loop} BuildRequires: R-ggplot2 %endif %description Provides easy access to, and manipulation of, the Munsell colours. Provides a mapping between Munsell's original notation (e.g. "5R 5/10") and hexadecimal strings suitable for use directly in R graphics. Also provides utilities to explore slices through the Munsell colour tree, to transform Munsell colours and display colour palettes. %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_loop} %{_bindir}/R CMD check %{packname} %else _R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname} --no-examples %endif %files %dir %{rlibdir}/%{packname} %doc %{rlibdir}/%{packname}/html %{rlibdir}/%{packname}/DESCRIPTION %doc %{rlibdir}/%{packname}/NEWS.md %license %{rlibdir}/%{packname}/LICENSE %{rlibdir}/%{packname}/INDEX %{rlibdir}/%{packname}/NAMESPACE %{rlibdir}/%{packname}/Meta %{rlibdir}/%{packname}/R %{rlibdir}/%{packname}/help %{rlibdir}/%{packname}/raw %changelog * Thu Apr 26 2018 Elliott Sales de Andrade - 0.4.3-1 - initial package for Fedora