%global __brp_check_rpaths %{nil} %global packname Bchron %global packver 4.7.6 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 4.7.6 Release: 1%{?dist}%{?buildtag} Summary: Radiocarbon Dating, Age-Depth Modelling, Relative Sea Level Rate Estimation, and Non-Parametric Phase Modelling License: GPL (>= 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 BuildRequires: R-utils BuildRequires: R-CRAN-MASS BuildRequires: R-CRAN-coda BuildRequires: R-CRAN-mclust BuildRequires: R-CRAN-ggplot2 BuildRequires: R-CRAN-ggridges BuildRequires: R-CRAN-magrittr BuildRequires: R-CRAN-purrr BuildRequires: R-CRAN-ggforce BuildRequires: R-CRAN-dplyr BuildRequires: R-CRAN-scales BuildRequires: R-CRAN-stringr BuildRequires: R-CRAN-checkmate Requires: R-utils Requires: R-CRAN-MASS Requires: R-CRAN-coda Requires: R-CRAN-mclust Requires: R-CRAN-ggplot2 Requires: R-CRAN-ggridges Requires: R-CRAN-magrittr Requires: R-CRAN-purrr Requires: R-CRAN-ggforce Requires: R-CRAN-dplyr Requires: R-CRAN-scales Requires: R-CRAN-stringr Requires: R-CRAN-checkmate %description Enables quick calibration of radiocarbon dates under various calibration curves (including user generated ones); age-depth modelling as per the algorithm of Haslett and Parnell (2008) ; Relative sea level rate estimation incorporating time uncertainty in polynomial regression models (Parnell and Gehrels 2015) ; non-parametric phase modelling via Gaussian mixtures as a means to determine the activity of a site (and as an alternative to the Oxcal function SUM; currently unpublished), and reverse calibration of dates from calibrated into un-calibrated years (also unpublished). %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 # 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}