%global __brp_check_rpaths %{nil} %global packname kidney.epi %global packver 1.2.0 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 1.2.0 Release: 3%{?dist}%{?buildtag} Summary: Kidney Functions: Clinical and Epidemiological License: LGPL (>= 2) URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel >= 3.4.0 Requires: R-core >= 3.4.0 BuildArch: noarch %description Contains kidney care oriented functions. Current version contains functions for calculation of: - Kidney Donor Risk Index and Kidney Donor Profile Index for kidney transplant donors by Rao et al. (2009) . - Estimated glomerular filtration rate by CKD-EPI, MDRD and other equations. Citation: Bikbov B. R open source programming code for calculation of the Kidney Donor Profile Index and Kidney Donor Risk Index. Kidney Diseases (2018) 4:269–272 (the only citation for the whole package). %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}