File R-selectr.spec of Package R-selectr

%global packname  selectr
%global rlibdir   %{_libdir}/R/library

Name:           R-%{packname}
Version:        0.2_2
Release:        1
Summary:        Translate CSS Selectors to XPath Expressions

Group:          Development/Libraries/Other
License:        BSD_3_clause + file LICENCE
URL:            None
Source0:        selectr_0.2-2.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Requires:       R-base, R-stringr, R-XML

BuildRequires:   R-base-devel , R-stringr, R-XML

BuildRequires:  texlive
BuildRequires:  texinfo
BuildRequires:  fdupes
#
%if 0%{?suse_version} <= 1220 && 0%{?suse_version} != 1110
BuildRequires:  texlive-fonts-extra
%endif

# Package suggestions, not required to build
#BuildRequires: R-testthat, R-xml2

%description
Translates a CSS3 selector into an equivalent XPath expression. This
allows us to use CSS selectors when working with the XML package as it can
only evaluate XPath expressions. Also provided are convenience functions
useful for using CSS selectors on XML nodes. This package is a port of the
Python package "cssselect" (http://packages.python.org/cssselect/).

%prep
%setup -q -c -n %{packname}

%build

%install
rm -rf %{buildroot}
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

%clean
rm -rf %{buildroot}

%files
%defattr(-, root, root, -)
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/html
%doc %{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/CITATION
%doc %{rlibdir}/%{packname}/LICENCE
%doc %{rlibdir}/%{packname}/NEWS.Rd
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%{rlibdir}/%{packname}/tests


%changelog