File R-units.spec of Package R-units
#
# spec file for package R-units
#
# 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 units
%global rlibdir %{_libdir}/R/library
Name: R-%{packname}
Version: 0.6.3
Release: 0
Summary: Measurement Units for R Vectors
License: GPL-2.0-only
Group: Development/Libraries/Other
URL: http://cran.r-project.org/web/packages/%{packname}
Source: http://cran.r-project.org/src/contrib/%{packname}_0.6-3.tar.gz
BuildRequires: R-Rcpp-devel
BuildRequires: R-base-devel
BuildRequires: fdupes
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: gcc-fortran
BuildRequires: texinfo
BuildRequires: texlive
BuildRequires: udunits2-devel
Requires: R-Rcpp
Requires: R-base
%description
Support for measurement units in R vectors, matrices and arrays: automatic
propagation, conversion, derivation and simplification of units; raising
errors in case of unit incompatibility. Compatible with the POSIXct, Date
and difftime classes. Uses the UNIDATA udunits library and unit database
for unit compatibility checking and conversion. Documentation about
'units' is provided in the paper by Pebesma, Mailund & Hiebert (2016,
<doi:10.32614/RJ-2016-061>), included in this package as a vignette; see
'citation("units")' for details.
%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
%files
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/units/doc
%doc %{rlibdir}/units/CITATION
%doc %{rlibdir}/units/html
%{rlibdir}/units/libs
%{rlibdir}/units/R
%{rlibdir}/units/Meta
%{rlibdir}/units/NAMESPACE
%{rlibdir}/units/help
%{rlibdir}/units/demo
%{rlibdir}/units/DESCRIPTION
%{rlibdir}/units/NEWS.md
%{rlibdir}/units/share
%{rlibdir}/units/INDEX
%changelog