File R-caTools.spec of Package R-caTools

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

Name:           R-%{packname}
Version:        1.17.1
Release:        1
Summary:        Tools: moving window statistics, GIF, Base64, ROC AUC, etc.

Group:          Development/Libraries/Other
License:        GPL-3.0
URL:            None
Source0:        caTools_1.17.1.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       R-base
Requires:       R-bitops

# Package suggestions
#Requires:         R-MASS R-rpart 
BuildRequires:  texlive
BuildRequires:  texinfo
BuildRequires:  fdupes
BuildRequires:  gcc-c++
%if 0%{?suse_version} <= 1220 && 0%{?suse_version} != 1110
BuildRequires:  texlive-fonts-extra

BuildRequires:    R-base-devel 
BuildRequires:    R-bitops

# Package suggestions, not required to build
#BuildRequires: R-MASS R-rpart

Contains several basic utility functions including: moving (rolling,
running) window statistic functions, read/write for GIF and ENVI binary
files, fast calculation of AUC, LogitBoost classifier, base64
encoder/decoder, round-off error free sum and cumsum, etc.

%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 -f %{buildroot}%{rlibdir}/R.css

rm -rf %{buildroot}

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