%bcond_with check %global packname assertthat %global rlibdir %{_datadir}/R/library Name: R-%{packname} Version: 0.2.1 Release: 1 Summary: Easy Pre and Post Assertions License: GPLv3 URL: https://CRAN.R-project.org/package=%{packname} Source0: https://cran.r-project.org/src/contrib/%{packname}_%{version}.tar.gz BuildArch: noarch BuildRequires: R-devel BuildRequires: tex(latex) BuildRequires: R-tools %if %{with check} BuildRequires: R-testthat %endif %description An extension to stopifnot() that makes it easy to declare the pre and post conditions that you code should satisfy, while also producing friendly error messages so that your users know what's gone wrong. %prep %setup -q -c -n %{packname} 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 %{with check} %{_bindir}/R CMD check %{packname} %endif %files %dir %{rlibdir}/%{packname} %doc %{rlibdir}/%{packname}/html %{rlibdir}/%{packname}/DESCRIPTION %{rlibdir}/%{packname}/INDEX %{rlibdir}/%{packname}/NAMESPACE %{rlibdir}/%{packname}/Meta %{rlibdir}/%{packname}/R %{rlibdir}/%{packname}/help %changelog * Tue Jun 14 2022 misaka00251 - 0.2.1-1 - Init package (Thanks to fedora team)