%global packname robustreg %global packver 0.1-11 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 0.1.11 Release: 2%{?dist} Summary: Robust Regression Functions License: GPL (>= 2) URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel >= 3.6.0 Requires: R-core >= 3.6.0 BuildRequires: R-stats >= 3.6.0 BuildRequires: R-Matrix >= 1.1.0 BuildRequires: R-CRAN-Rcpp >= 0.11.3 BuildRequires: R-CRAN-RcppArmadillo Requires: R-stats >= 3.6.0 Requires: R-Matrix >= 1.1.0 Requires: R-CRAN-Rcpp >= 0.11.3 %description Linear regression functions using Huber and bisquare psi functions. Optimal weights are calculated using IRLS algorithm. %prep %setup -q -c -n %{packname} find -type f -executable -exec grep -Iq . {} \; -exec sed -i -e '$a\' {} \; %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 %files %dir %{rlibdir}/%{packname} %doc %{rlibdir}/%{packname}/html %{rlibdir}/%{packname}/Meta %{rlibdir}/%{packname}/help %{rlibdir}/%{packname}/DESCRIPTION %{rlibdir}/%{packname}/NAMESPACE %{rlibdir}/%{packname}/R %{rlibdir}/%{packname}/INDEX %{rlibdir}/%{packname}/libs