File R-doFuture.spec of Package R-doFuture

#
# spec file for package R-doFuture
#
# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#


%global packname  doFuture
%global rlibdir   %{_libdir}/R/library
Name:           R-%{packname}
Version:        0.9.0
Release:        0
Summary:        A Universal Foreach Parallel Adapter using the Future API of the 'future' Package
License:        LGPL (>= 2.1)
Group:          Development/Libraries/Other
URL:            http://cran.r-project.org/web/packages/%{packname}
Source:         http://cran.r-project.org/src/contrib/%{packname}_%{version}.tar.gz
BuildRequires:  R-base-devel
BuildRequires:  R-foreach >= 1.4.7
BuildRequires:  R-future >= 1.15.1
BuildRequires:  R-globals >= 0.12.5
BuildRequires:  R-iterators >= 1.0.12
BuildRequires:  R-parallel
BuildRequires:  R-utils
BuildRequires:  fdupes
BuildRequires:  texinfo
Requires:       R-base
Requires:       R-foreach >= 1.4.7
Requires:       R-future >= 1.15.1
Requires:       R-globals >= 0.12.5
Requires:       R-iterators >= 1.0.12
Requires:       R-parallel
Requires:       R-utils
%if 0%{?sle_version} > 120400 || 0%{?is_opensuse}
# Three others commonly needed
BuildRequires:  tex(ae.sty)
BuildRequires:  tex(fancyvrb.sty)
BuildRequires:  tex(inconsolata.sty)
BuildRequires:  tex(natbib.sty)
%else
BuildRequires:  texlive
%endif

%description
Provides a '%{dopar}%' adapter such that any type of futures can be used as
backends for the 'foreach' framework.

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


%build

%install
mkdir -p %{buildroot}%{rlibdir}
%{_bindir}/R CMD INSTALL -l %{buildroot}%{rlibdir} %{packname}

rm -f %{buildroot}%{rlibdir}/R.css
%fdupes %{buildroot}%{rlibdir}/%{packname}


%files
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/doFuture/html
%doc %{rlibdir}/doFuture/doc
%doc %{rlibdir}/doFuture/NEWS
%{rlibdir}/doFuture/R
%{rlibdir}/doFuture/INDEX
%{rlibdir}/doFuture/WORDLIST
%{rlibdir}/doFuture/NAMESPACE
%{rlibdir}/doFuture/help
%{rlibdir}/doFuture/Meta
%{rlibdir}/doFuture/tests2
%{rlibdir}/doFuture/DESCRIPTION

%changelog
openSUSE Build Service is sponsored by