%global packname pkgload %global packver 1.1.0 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 1.1.0 Release: 2%{?dist} Summary: Simulate Package Installation and Attach License: GPL-3 URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel Requires: R-core BuildRequires: R-CRAN-cli BuildRequires: R-CRAN-crayon BuildRequires: R-CRAN-desc BuildRequires: R-methods BuildRequires: R-CRAN-pkgbuild BuildRequires: R-CRAN-rlang BuildRequires: R-CRAN-rprojroot BuildRequires: R-CRAN-rstudioapi BuildRequires: R-utils BuildRequires: R-CRAN-withr Requires: R-CRAN-cli Requires: R-CRAN-crayon Requires: R-CRAN-desc Requires: R-methods Requires: R-CRAN-pkgbuild Requires: R-CRAN-rlang Requires: R-CRAN-rprojroot Requires: R-CRAN-rstudioapi Requires: R-utils Requires: R-CRAN-withr %description Simulates the process of installing a package and then attaching it. This is a key part of the 'devtools' package as it allows you to rapidly iterate while developing a 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 %dir %{rlibdir}/%{packname} %doc %{rlibdir}/%{packname}/html %{rlibdir}/%{packname}/Meta %{rlibdir}/%{packname}/help %{rlibdir}/%{packname}/DESCRIPTION %{rlibdir}/%{packname}/NAMESPACE %doc %{rlibdir}/%{packname}/NEWS.md %{rlibdir}/%{packname}/R %doc %{rlibdir}/%{packname}/WORDLIST %{rlibdir}/%{packname}/INDEX %{rlibdir}/%{packname}/libs