%global packname  sandwich
%global rlibdir   %{_datadir}/R/library
%global pkgver    3.0
%global pkgrel    1
%global Rvers     3.0.0

%global __suggests_exclude ^R\\((AER|multiwayvcov|pcse|plm|pscl|strucchange)\\)


Name:             R-%{packname}
Version:          %{pkgver}.%{pkgrel}
Release:          1
Summary:          Robust Covariance Matrix Estimators

License:          GPLv2+
URL:              http://cran.r-project.org/web/packages/%{packname}/index.html
Source0:          http://cran.r-project.org/src/contrib/%{packname}_%{pkgver}-%{pkgrel}.tar.gz

BuildArch:        noarch

BuildRequires:    R-devel >= %{Rvers} tex(latex) R-stats R-utils R-zoo

%description
Model-robust standard error estimators for cross-sectional, time series
and longitudinal data.

%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


# Missing deps so not this time :()
#check
##{_bindir}/R CMD check %{packname}


%files
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/doc
%doc %{rlibdir}/%{packname}/html
%doc %{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/NEWS.md
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/CITATION
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%{rlibdir}/%{packname}/data

%changelog
* Thu Jun 16 2022 misaka00251 <misaka00251@misakanet.cn> - 3.0.1-1
- Init package (Thanks to fedora team)
