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
URL:            https://github.com/r-lib/crayon#readme
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
%endif

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


%description
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.


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

%build

%install
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

%clean
rm -rf %{buildroot}

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

%files
%defattr(-, root, root, -)
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/html
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%{rlibdir}/%{packname}/LICENSE
%{rlibdir}/%{packname}/ANSI-256-OSX.png
%{rlibdir}/%{packname}/ANSI-8-OSX.png
%{rlibdir}/%{packname}/NEWS.md
%{rlibdir}/%{packname}/README.markdown
%{rlibdir}/%{packname}/logo.png
%{rlibdir}/%{packname}/logo.svg.gz

%changelog