R-withr/R-withr.spec

91 lines
2.3 KiB
RPMSpec
Raw Normal View History

%bcond_without bootstrap
2020-05-22 02:05:24 +00:00
%global packname withr
2023-11-01 15:36:18 +00:00
%global packver 2.5.2
2017-08-31 00:19:03 +00:00
%global rlibdir %{_datadir}/R/library
Name: R-%{packname}
Version: %{packver}
Release: %autorelease -e 0.riscv64
2017-08-31 00:19:03 +00:00
Summary: Run Code 'With' Temporarily Modified Global State
2021-02-23 07:17:20 +00:00
License: MIT
2019-01-23 00:55:30 +00:00
URL: https://CRAN.R-project.org/package=%{packname}
2020-05-22 02:05:24 +00:00
Source0: https://cran.r-project.org/src/contrib/%{packname}_%{packver}.tar.gz
2017-08-31 00:19:03 +00:00
# Here's the R view of the dependencies world:
# Depends:
2020-05-22 02:05:24 +00:00
# Imports: R-graphics, R-grDevices, R-stats
2022-01-21 17:02:10 +00:00
# Suggests: R-callr, R-covr, R-DBI, R-knitr, R-lattice, R-methods, R-rmarkdown, R-RSQLite, R-testthat >= 3.0.0
2017-08-31 00:19:03 +00:00
# LinkingTo:
# Enhances:
BuildArch: noarch
2018-04-26 03:32:19 +00:00
BuildRequires: R-devel
BuildRequires: tex(latex)
BuildRequires: R-graphics
BuildRequires: R-grDevices
2020-05-22 02:05:24 +00:00
BuildRequires: R-stats
2020-09-23 09:43:43 +00:00
%if %{without bootstrap}
2022-01-21 17:02:10 +00:00
BuildRequires: R-callr
2018-04-26 03:32:19 +00:00
BuildRequires: R-DBI
2020-09-23 09:55:59 +00:00
BuildRequires: R-knitr
2020-05-22 02:05:24 +00:00
BuildRequires: R-lattice
2018-04-26 03:32:19 +00:00
BuildRequires: R-methods
BuildRequires: R-rlang
BuildRequires: R-rmarkdown >= 2.12
2020-05-22 02:05:24 +00:00
BuildRequires: R-RSQLite
2022-01-21 17:02:10 +00:00
BuildRequires: R-testthat >= 3.0.0
%endif
2017-08-31 00:19:03 +00:00
%description
A set of functions to run code 'with' safely and temporarily modified
global state. Many of these functions were originally a part of the
'devtools' package, this provides a simple package with limited
dependencies to provide access to these functions.
2017-11-11 04:58:13 +00:00
2017-08-31 00:19:03 +00:00
%prep
%setup -q -c -n %{packname}
2017-11-11 06:34:43 +00:00
# Don't need coverage; it's not packaged either.
2018-01-02 23:22:22 +00:00
sed -i 's/covr, //g' %{packname}/DESCRIPTION
2017-11-11 06:34:43 +00:00
2023-11-01 15:36:18 +00:00
# Remove failing tests
rm -f %{packname}/tests/testthat/test-{language,defer}.R
2017-11-11 04:58:13 +00:00
2017-08-31 00:19:03 +00:00
%build
2017-11-11 04:58:13 +00:00
2017-08-31 00:19:03 +00:00
%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
2017-11-11 04:58:13 +00:00
2017-08-31 00:19:03 +00:00
%check
2020-09-23 09:43:43 +00:00
%if %{without bootstrap}
2018-04-26 03:32:19 +00:00
export LANG=C.UTF-8
2023-05-12 11:51:52 +00:00
%{_bindir}/R CMD check --ignore-vignettes %{packname}
%endif
2017-08-31 00:19:03 +00:00
2017-11-11 04:58:13 +00:00
2017-08-31 00:19:03 +00:00
%files
%dir %{rlibdir}/%{packname}
2018-01-02 23:22:22 +00:00
%doc %{rlibdir}/%{packname}/doc
2017-08-31 00:19:03 +00:00
%doc %{rlibdir}/%{packname}/html
%{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/NEWS.md
2021-02-23 07:17:20 +00:00
%license %{rlibdir}/%{packname}/LICENSE
2017-08-31 00:19:03 +00:00
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%changelog
%autochangelog