File R-htmltools.spec of Package R-htmltools

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

Name:           R-%{packname}
Version:        0.3.6
Release:        1
Summary:        Tools for HTML

Group:          Development/Libraries/Other
License:        GPL-2.0+
URL:  {packname}/index.html
Source0:        htmltools_%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       R-base
Requires:       R-digest
Requires:       R-Rcpp

# Package suggestions
#Requires:         R-markdown R-testthat 
BuildRequires:  texlive
BuildRequires:  texinfo
BuildRequires:  fdupes
%if 0%{?suse_version} <= 1220 && 0%{?suse_version} != 1110
BuildRequires:  texlive-fonts-extra

BuildRequires:    R-base-devel 
BuildRequires:    R-digest
BuildRequires:    R-Rcpp
BuildRequires:    gcc-c++
# Package suggestions, not required to build
#BuildRequires: R-markdown R-testthat

Tools for HTML generation and output

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


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

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