File R-crayon.spec of Package R-crayon

%global packname  crayon
%global rlibdir   %{_libdir}/R/library

Name:           R-%{packname}
Version:        1.3.4
Release:        1%{?dist}
Summary:        Crayon: Colored Terminal Output 
Group:          Development/Libraries/Other
License:        MIT
Source0:        crayon_1.3.4.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       R-base, tex(latex), R-core, R-grDevices, R-utils, R-methods

# Package suggestions

Requires:       R-stats, R-graphics
BuildRequires:  texlive, R-grDevices, R-utils, R-methods
BuildRequires:  texinfo
BuildRequires:  fdupes
BuildRequires:  libmnl0
%if 0%{?suse_version} <= 1220 && 0%{?suse_version} != 1110
BuildRequires:  texlive-fonts-extra

BuildRequires:    R-devel 
# Package suggestions, not required to build
#BuildRequires:   R-mockery , R-rstudioapi , R-testthst , R-withr
BuildRequires:    R-Matrix
BuildRequires:    gcc-fortran

Colored terminal output on terminals that support 'ANSI'
color and highlight codes. It also works in 'Emacs' 'ESS'. 'ANSI'
color support is automatically detected. Colors and highlighting can
be combined and nested. New styles can also be created easily.
This package was inspired by the 'chalk' 'JavaScript' project.

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


rm -rf %{buildroot}
mkdir -p %{buildroot}%{rlibdir}
%{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname}
test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so)
rm -rf %{buildroot}%{rlibdir}/R.css

rm -rf %{buildroot}

#%{_bindir}/R CMD check %{packname}

%defattr(-, root, root, -)
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/html