%global packname rpivotTable %global packver 0.3.0 %global rlibdir /usr/local/lib/R/library Name: R-CRAN-%{packname} Version: 0.3.0 Release: 2%{?dist} Summary: Build Powerful Pivot Tables and Dynamically Slice & Dice yourData License: MIT + file LICENSE URL: https://cran.r-project.org/package=%{packname} Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz BuildRequires: R-devel >= 3.2.0 Requires: R-core >= 3.2.0 BuildArch: noarch BuildRequires: R-CRAN-htmlwidgets >= 0.5 Requires: R-CRAN-htmlwidgets >= 0.5 %description Build powerful pivot tables (aka Pivot Grid, Pivot Chart, Cross-Tab) and dynamically slice & dice / drag 'n' drop your data. 'rpivotTable' is a wrapper of 'pivottable', a powerful open-source Pivot Table library implemented in 'JavaScript' by Nicolas Kruchten. Aligned to 'pivottable' v2.19.0. %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 %license %{rlibdir}/%{packname}/LICENSE %{rlibdir}/%{packname}/NAMESPACE %{rlibdir}/%{packname}/R %doc %{rlibdir}/%{packname}/doc %doc %{rlibdir}/%{packname}/examples %{rlibdir}/%{packname}/htmlwidgets %{rlibdir}/%{packname}/INDEX