%global __brp_check_rpaths %{nil} %global packname mdw %global packver 2020.6-17 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 2020.6.17 Release: 3%{?dist}%{?buildtag} Summary: Maximum Diversity Weighting License: GPL-2 URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel >= 3.5.0 Requires: R-core >= 3.5.0 BuildArch: noarch BuildRequires: R-CRAN-kyotil BuildRequires: R-MASS BuildRequires: R-Matrix Requires: R-CRAN-kyotil Requires: R-MASS Requires: R-Matrix %description Dimension-reduction methods aim at defining a score that maximizes signal diversity. Three approaches, tree weight, maximum entropy weights, and maximum variance weights are provided. These methods are described in He and Fong (2019) . %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 %{rlibdir}/%{packname}