%global packname pbdPAPI %global rlibdir %{_libdir}/R/library Name: R-%{packname} Version: 0.3.2 Release: 1%{?dist} Summary: A hardware counter profiler for R License: BSD URL: https://github.com/RBigData/pbdPAPI Source0: https://github.com/RBigData/pbdPAPI/archive/v0.3-2/%packname-%version.tar.gz Patch1: pbdPAPI-conf.patch Patch2: pbdPAPI-desc.patch Patch3: pbdPAPI-mkpapi.patch BuildRequires: R-devel tex(latex) papi-devel libpfm-devel autoconf %description pbdPAPI is an R package which offers a set of R bindings for the Performance Application Programming Interface (PAPI). PAPI is a high-level C library for gathering information from hardware performance counters. PAPI measures events like cache misses, flops, etc. This allows for very powerful profiling of R code (compiled code via, for example, Rcpp, or even just plain old vanilla R), but with a very simple interface. %prep %setup -q -n %{packname}-%(echo %version|sed -E 's/\.([0-9]+)$/-\1/') mkdir .tmp mv * .tmp mv .tmp %packname %patch1 -p1 %patch2 -p1 %patch3 -p1 pushd %packname; autoconf; popd rm -r %packname/src/papi-5.4.3 %build %install mkdir -p %{buildroot}%{rlibdir} %{_bindir}/R CMD INSTALL \ --configure-args="--enable-system-papi --with-papi-home=%_prefix" \ -l %{buildroot}%{rlibdir} %{packname} test -d %{packname}/src && (cd %{packname}/src; rm -f *.o *.so) rm -f %{buildroot}%{rlibdir}/R.css %check #%{_bindir}/R CMD check %{packname} %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 %{rlibdir}/%{packname}/LICENSE %{rlibdir}/%{packname}/CITATION %{rlibdir}/%{packname}/demo %{rlibdir}/%{packname}/libs %exclude %{rlibdir}/%{packname}/PAPI_LICENSE.txt %changelog * Thu Mar 22 2018 Dave Love 0.3_2-1 - Initial package for Fedora