File R-sourcetools.spec of Package R-sourcetools
%global packname sourcetools
%global rlibdir %{_libdir}/R/library
Name: R-%{packname}
Version: 0.1.7
Release: 0
Summary: Tools for Reading, Tokenizing and Parsing R Code
Group: Development/Libraries/Other
License: MIT
URL: https://github.com/kevinushey/sourcetools
Source: http://cran.r-project.org/src/contrib/%{packname}_%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: R-base
#Recommends: R-testthat
BuildRequires: texlive
BuildRequires: texinfo
BuildRequires: fdupes
BuildRequires: gcc-c++
%if 0%{?suse_version} <= 1220 && 0%{?suse_version} != 1110
BuildRequires: texlive-fonts-extra
%endif
BuildRequires: R-base-devel
#BuildRequires: R-testthat
%description
Tools for the reading and tokenization of R code. The 'sourcetools'
package provides both an R and C++ interface for the tokenization of R
code, and helpers for interacting with the tokenized representation of R
%package devel
Summary: Tools for Reading, Tokenizing and Parsing R Code
Group: Development/Libraries/Other
Requires: R-%{packname}
%description devel
Tools for the reading and tokenization of R code. The 'sourcetools'
package provides both an R and C++ interface for the tokenization of R
code, and helpers for interacting with the tokenized representation of R
%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
%check
#%{_bindir}/R CMD check %{packname}
%files
%defattr(-, root, root, -)
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/html
%doc %{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/LICENSE
%doc %{rlibdir}/%{packname}/NEWS.md
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%{rlibdir}/%{packname}/libs/
%files devel
%defattr(-, root, root, -)
%{rlibdir}/%{packname}/include/
%changelog