Blob Blame Raw
%global packname  parsedate
%global rlibdir  %{_libdir}/R/library

Name:             R-%{packname}
Version:          1.2.0
Release:          1%{?dist}
Summary:          Recognize and Parse Dates in Various Formats

License:          GPLv2
URL:              https://CRAN.R-project.org/package=%{packname}
Source0:          https://cran.r-project.org/src/contrib/%{packname}_%{version}.tar.gz

# Here's the R view of the dependencies world:
# Depends:
# Imports:   R-rematch2
# Suggests:  R-covr, R-testthat, R-withr
# LinkingTo:
# Enhances:

Requires:         R-rematch2
Suggests:         R-testthat
Suggests:         R-withr
BuildRequires:    R-devel
BuildRequires:    tex(latex)
BuildRequires:    R-rematch2
BuildRequires:    R-testthat
BuildRequires:    R-withr

%description
Parse dates automatically, without the need of specifying a format.  Currently
it includes the git date parser. It can also recognize and parse all ISO 8601
formats.


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

# 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


%check
%{_bindir}/R CMD check %{packname}


%files
%dir %{rlibdir}/%{packname}
%doc %{rlibdir}/%{packname}/README.md
%doc %{rlibdir}/%{packname}/README.Rmd
%doc %{rlibdir}/%{packname}/html
%{rlibdir}/%{packname}/DESCRIPTION
%doc %{rlibdir}/%{packname}/NEWS.md
%{rlibdir}/%{packname}/INDEX
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%dir %{rlibdir}/%{packname}/libs
%{rlibdir}/%{packname}/libs/%{packname}.so


%changelog
* Wed May 15 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2.0-1
- initial package for Fedora