From 0adb099b9260d385fb09628cc57f60c2d8eda626 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 12 Sep 2020 05:49:58 -0400 Subject: [PATCH] import #1876189 --- .gitignore | 1 + R-bench.spec | 98 ++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 100 insertions(+) create mode 100644 .gitignore create mode 100644 R-bench.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d727a21 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/bench_1.1.1.tar.gz diff --git a/R-bench.spec b/R-bench.spec new file mode 100644 index 0000000..05ef658 --- /dev/null +++ b/R-bench.spec @@ -0,0 +1,98 @@ +%global packname bench +%global packver 1.1.1 +%global rlibdir %{_libdir}/R/library + +%global __suggests_exclude ^R\\((ggbeeswarm|ggplot2|ggridges)\\) + +# When we are bootstrapping, we drop some dependencies, and/or build time tests. +%bcond_without bootstrap + +Name: R-%{packname} +Version: 1.1.1 +Release: 1%{?dist} +Summary: High Precision Timing of R Expressions + +License: GPLv3 +URL: https://CRAN.R-project.org/package=%{packname} +Source0: https://cran.r-project.org/src/contrib/%{packname}_%{packver}.tar.gz + +# Here's the R view of the dependencies world: +# Depends: +# Imports: R-glue, R-methods, R-pillar, R-profmem, R-rlang >= 0.2.0, R-stats, R-tibble, R-utils +# Suggests: R-covr, R-dplyr, R-forcats, R-ggbeeswarm, R-ggplot2, R-ggridges, R-mockery, R-parallel, R-scales, R-testthat, R-tidyr >= 0.8.1, R-vctrs, R-withr +# LinkingTo: +# Enhances: + +BuildRequires: R-devel +BuildRequires: tex(latex) +BuildRequires: R-glue +BuildRequires: R-methods +BuildRequires: R-pillar +BuildRequires: R-profmem +BuildRequires: R-rlang >= 0.2.0 +BuildRequires: R-stats +BuildRequires: R-tibble +BuildRequires: R-utils +BuildRequires: R-mockery +BuildRequires: R-parallel +BuildRequires: R-testthat +%if %{without bootstrap} +BuildRequires: R-dplyr +BuildRequires: R-forcats +BuildRequires: R-ggbeeswarm +BuildRequires: R-ggplot2 +BuildRequires: R-ggridges +BuildRequires: R-scales +BuildRequires: R-tidyr >= 0.8.1 +BuildRequires: R-vctrs +BuildRequires: R-withr +%endif + +%description +Tools to accurately benchmark and analyze execution times for R expressions. + + +%prep +%setup -q -c -n %{packname} + +# Don't need coverage; it's not packaged either. +# RMySQL/RPostgreSQL are old wrappers, so won't be packaged by me at least. +sed -i 's/covr, //g' %{packname}/DESCRIPTION + + +%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 + + +%check +%if %{without bootstrap} +%{_bindir}/R CMD check %{packname} +%else +_R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname} +%endif + + +%files +%dir %{rlibdir}/%{packname} +%doc %{rlibdir}/%{packname}/html +%{rlibdir}/%{packname}/DESCRIPTION +%doc %{rlibdir}/%{packname}/NEWS.md +%{rlibdir}/%{packname}/INDEX +%{rlibdir}/%{packname}/NAMESPACE +%{rlibdir}/%{packname}/Meta +%{rlibdir}/%{packname}/R +%{rlibdir}/%{packname}/help +%{rlibdir}/%{packname}/examples +%dir %{rlibdir}/%{packname}/libs +%{rlibdir}/%{packname}/libs/%{packname}.so + + +%changelog +* Sun Sep 06 2020 Elliott Sales de Andrade - 1.1.1-1 +- initial package for Fedora diff --git a/sources b/sources new file mode 100644 index 0000000..1bf0ea2 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (bench_1.1.1.tar.gz) = b76f9ebc14d57555d9284c53667b9aba7a4efa882ae2ff0e8c3e78caac0d4a3d349188137b1e14acc127c826b71fc4575a60e5c5038f0854e98d196819aaf316