%global packname requireR %global packver 1.0.0.1 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 1.0.0.1 Release: 2%{?dist} Summary: R Source Code Modularizer License: MIT + file LICENSE URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel >= 3.3.1 Requires: R-core >= 3.3.1 BuildArch: noarch %description Modularizes source code. Keeps the global environment clean, explicifies interdependencies. Inspired by 'RequireJS'. %prep %setup -q -c -n %{packname} %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 %license %{rlibdir}/%{packname}/LICENSE %{rlibdir}/%{packname}/NAMESPACE %{rlibdir}/%{packname}/R %doc %{rlibdir}/%{packname}/doc %{rlibdir}/%{packname}/INDEX