%global __brp_check_rpaths %{nil} %global __requires_exclude ^libmpi %global packname traineR %global packver 2.2.0 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 2.2.0 Release: 1%{?dist}%{?buildtag} Summary: Predictive (Classification and Regression) Models Homologator License: GPL (>= 2) URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel >= 3.5 Requires: R-core >= 3.5 BuildArch: noarch BuildRequires: R-CRAN-MASS >= 7.3.53 BuildRequires: R-CRAN-nnet >= 7.3.12 BuildRequires: R-CRAN-randomForest >= 4.6.14 BuildRequires: R-CRAN-rpart >= 4.1.13 BuildRequires: R-CRAN-ada >= 2.0.5 BuildRequires: R-CRAN-e1071 >= 1.7.0.1 BuildRequires: R-CRAN-neuralnet >= 1.44.2 BuildRequires: R-CRAN-stringr >= 1.4.0 BuildRequires: R-CRAN-kknn >= 1.3.1 BuildRequires: R-CRAN-xgboost >= 0.81.0.1 BuildRequires: R-CRAN-dplyr >= 0.8.0.1 BuildRequires: R-CRAN-adabag BuildRequires: R-CRAN-glmnet BuildRequires: R-CRAN-ROCR BuildRequires: R-CRAN-gbm BuildRequires: R-CRAN-ggplot2 Requires: R-CRAN-MASS >= 7.3.53 Requires: R-CRAN-nnet >= 7.3.12 Requires: R-CRAN-randomForest >= 4.6.14 Requires: R-CRAN-rpart >= 4.1.13 Requires: R-CRAN-ada >= 2.0.5 Requires: R-CRAN-e1071 >= 1.7.0.1 Requires: R-CRAN-neuralnet >= 1.44.2 Requires: R-CRAN-stringr >= 1.4.0 Requires: R-CRAN-kknn >= 1.3.1 Requires: R-CRAN-xgboost >= 0.81.0.1 Requires: R-CRAN-dplyr >= 0.8.0.1 Requires: R-CRAN-adabag Requires: R-CRAN-glmnet Requires: R-CRAN-ROCR Requires: R-CRAN-gbm Requires: R-CRAN-ggplot2 %description Methods to unify the different ways of creating predictive models and their different predictive formats for classification and regression. It includes methods such as K-Nearest Neighbors Schliep, K. P. (2004) , Decision Trees Leo Breiman, Jerome H. Friedman, Richard A. Olshen, Charles J. Stone (2017) , ADA Boosting Esteban Alfaro, Matias Gamez, Noelia GarcĂ­a (2013) , Extreme Gradient Boosting Chen & Guestrin (2016) , Random Forest Breiman (2001) , Neural Networks Venables, W. N., & Ripley, B. D. (2002) , Support Vector Machines Bennett, K. P. & Campbell, C. (2000) , Bayesian Methods Gelman, A., Carlin, J. B., Stern, H. S., & Rubin, D. B. (1995) , Linear Discriminant Analysis Venables, W. N., & Ripley, B. D. (2002) , Quadratic Discriminant Analysis Venables, W. N., & Ripley, B. D. (2002) , Logistic Regression Dobson, A. J., & Barnett, A. G. (2018) and Penalized Logistic Regression Friedman, J. H., Hastie, T., & Tibshirani, R. (2010) . %prep %setup -q -c -n %{packname} # fix end of executable files find -type f -executable -exec grep -Iq . {} \; -exec sed -i -e '$a\' {} \; # prevent binary stripping [ -d %{packname}/src ] && find %{packname}/src -type f -exec \ sed -i 's@/usr/bin/strip@/usr/bin/true@g' {} \; || true [ -d %{packname}/src ] && find %{packname}/src/Make* -type f -exec \ sed -i 's@-g0@@g' {} \; || true # don't allow local prefix in executable scripts find -type f -executable -exec sed -Ei 's@#!( )*/usr/local/bin@#!/usr/bin@g' {} \; %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 # remove buildroot from installed files find %{buildroot}%{rlibdir} -type f -exec sed -i "s@%{buildroot}@@g" {} \; %files %{rlibdir}/%{packname}