109 lines
3.1 KiB
RPMSpec
109 lines
3.1 KiB
RPMSpec
%global packname lubridate
|
|
%global rlibdir %{_libdir}/R/library
|
|
|
|
# knitr is not yet available.
|
|
%global with_doc 1
|
|
|
|
Name: R-%{packname}
|
|
Version: 1.7.3
|
|
Release: 5%{?dist}
|
|
Summary: Make dealing with dates a little easier
|
|
|
|
License: GPLv2+ and ASL 2.0
|
|
URL: https://cran.r-project.org/web/packages/%{packname}/index.html
|
|
Source0: https://cran.r-project.org/src/contrib/%{packname}_%{version}.tar.gz
|
|
# https://github.com/tidyverse/lubridate/pull/649
|
|
Patch0001: 0001-Fix-system-timezone-memoization.patch
|
|
|
|
# Here's the R view of the dependencies world:
|
|
# Depends: R-methods
|
|
# Imports: R-stringr R-Rcpp
|
|
# Suggests: R-testthat R-knitr R-covr
|
|
# LinkingTo:
|
|
# Enhances:
|
|
|
|
Requires: R-methods
|
|
Requires: R-stringr R-Rcpp
|
|
Requires: tzdata
|
|
BuildRequires: tzdata
|
|
BuildRequires: R-devel tex(latex) R-methods
|
|
BuildRequires: R-stringr R-Rcpp-devel
|
|
BuildRequires: R-testthat
|
|
%if %{with_doc}
|
|
BuildRequires: R-knitr
|
|
%endif
|
|
|
|
%description
|
|
Functions to work with date-times and time-spans: fast and user friendly
|
|
parsing of date-time data, extraction and updating of components of a
|
|
date-time (years, months, days, hours, minutes, and seconds), algebraic
|
|
manipulation on date-time and time-span objects. The 'lubridate' package
|
|
has a consistent and memorable syntax that makes working with dates easy
|
|
and fun. Parts of the 'CCTZ' source code, released under the Apache 2.0
|
|
License, are included in this package. See
|
|
<https://github.com/google/cctz> for more details.
|
|
|
|
|
|
%prep
|
|
%setup -q -c -n %{packname}
|
|
pushd %{packname}
|
|
%patch0001 -p1
|
|
popd
|
|
|
|
# Don't need coverage; it's not packaged either.
|
|
sed -i 's/, covr//g' %{packname}/DESCRIPTION
|
|
|
|
|
|
%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
|
|
|
|
# Used to update sources; don't need to package it.
|
|
rm %{buildroot}%{rlibdir}/%{packname}/cctz.sh
|
|
|
|
|
|
%check
|
|
%if %{with_doc}
|
|
%{_bindir}/R CMD check %{packname}
|
|
%else
|
|
_R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname} --ignore-vignettes
|
|
%endif
|
|
|
|
|
|
%files
|
|
%dir %{rlibdir}/%{packname}
|
|
%doc %{rlibdir}/%{packname}/doc
|
|
%doc %{rlibdir}/%{packname}/html
|
|
%{rlibdir}/%{packname}/DESCRIPTION
|
|
%doc %{rlibdir}/%{packname}/CITATION
|
|
%doc %{rlibdir}/%{packname}/NEWS.md
|
|
%{rlibdir}/%{packname}/INDEX
|
|
%{rlibdir}/%{packname}/NAMESPACE
|
|
%{rlibdir}/%{packname}/Meta
|
|
%{rlibdir}/%{packname}/R
|
|
%{rlibdir}/%{packname}/help
|
|
%{rlibdir}/%{packname}/data
|
|
%dir %{rlibdir}/%{packname}/libs
|
|
%{rlibdir}/%{packname}/libs/%{packname}.so
|
|
%{rlibdir}/%{packname}/pkgdown
|
|
|
|
|
|
%changelog
|
|
* Thu May 17 2018 Tom Callaway <spot@fedoraproject.org> - 1.7.3-5
|
|
- rebuild for R 3.5.0
|
|
|
|
* Sun Mar 18 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.7.3-4
|
|
- Add missing Rcpp Requires.
|
|
- Make library name explicit.
|
|
|
|
* Mon Mar 05 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.7.3-2
|
|
- Enable doc build.
|
|
|
|
* Sun Mar 04 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.7.3-1
|
|
- initial package for Fedora
|