File R-xlsx.spec of Package R-xlsx
#
# spec file for package R-xlsx
#
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 xlsx
%global rlibdir %{_libdir}/R/library
Name: R-%{packname}
Version: 0.6.1
Release: 0
Summary: Read, write, format Excel 2007 and Excel 97/2000/XP/2003 files
License: GPL-3.0-only
URL: https://github.com/dragua/xlsx
Source: https://cran.r-project.org/src/contrib/xlsx_%{version}.tar.gz
BuildRequires: R-base-devel
BuildRequires: R-base-java
BuildRequires: R-rJava
BuildRequires: R-xlsxjars
BuildRequires: java-devel
BuildRequires: texinfo
BuildRequires: texlive
Requires: R-base
Requires: R-base-java
Requires: R-rJava
Requires: R-xlsxjars
%if 0%{?sle_version} > 120400 || 0%{?is_opensuse}
BuildRequires: tex(ae.sty)
BuildRequires: tex(fancyvrb.sty)
BuildRequires: tex(inconsolata.sty)
BuildRequires: tex(natbib.sty)
%else
BuildRequires: texlive
%endif
%description
Provide R functions to read/write/format Excel 2007 and Excel
97/2000/XP/2003 file formats.
%prep
%setup -q -c -n %{packname}
%build
%install
# unset java env variables or build will fail
# https://stat.ethz.ch/pipermail/r-sig-debian/2010-March/001066.html
unset JAVA_HOME JAVA_ROOT JAVA_BINDIR
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
# unset java env variables or build will fail
# https://stat.ethz.ch/pipermail/r-sig-debian/2010-March/001066.html
unset JAVA_HOME JAVA_ROOT JAVA_BINDIR
%{_bindir}/R CMD check %{packname}
%files
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/doc
%doc %{rlibdir}/%{packname}/html
%doc %{rlibdir}/%{packname}/tests
%doc %{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/NEWS
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%{rlibdir}/%{packname}/java
%changelog