R-htmlwidgets/R-htmlwidgets.spec
Elliott Sales de Andrade 676afbeb38 Enable documentation.
2019-02-16 03:43:46 -05:00

106 lines
2.9 KiB
RPMSpec

%global packname htmlwidgets
%global rlibdir %{_datadir}/R/library
# Remove knitr dependency, which also Suggests this package.
%global with_doc 1
Name: R-%{packname}
Version: 1.3
Release: 1%{?dist}
Summary: HTML Widgets for R
License: MIT
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-grDevices, R-htmltools >= 0.3, R-jsonlite >= 0.9.16, R-yaml
# Suggests: R-knitr >= 1.8
# LinkingTo:
# Enhances:
BuildArch: noarch
Requires: R-core
Requires: R-grDevices
Requires: R-htmltools >= 0.3
Requires: R-jsonlite >= 0.9.16
Requires: R-yaml
Suggests: R-knitr >= 1.8
BuildRequires: R-devel
BuildRequires: tex(latex)
BuildRequires: R-grDevices
BuildRequires: R-htmltools >= 0.3
BuildRequires: R-jsonlite >= 0.9.16
BuildRequires: R-yaml
%if %{with_doc}
BuildRequires: R-knitr >= 1.8
%endif
%description
A framework for creating HTML widgets that render in various contexts
including the R console, 'R Markdown' documents, and 'Shiny' web
applications.
%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
%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}/NEWS
%{rlibdir}/%{packname}/INDEX
%license %{rlibdir}/%{packname}/LICENSE
%{rlibdir}/%{packname}/NAMESPACE
%{rlibdir}/%{packname}/Meta
%{rlibdir}/%{packname}/R
%{rlibdir}/%{packname}/help
%{rlibdir}/%{packname}/templates
%{rlibdir}/%{packname}/www
%changelog
* Sat Feb 16 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.3-1
- Update to latest version
- Enable documentation
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Apr 26 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.2-1
- Update to latest version
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.9-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Sep 07 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> 0.9-2
- Fix file list.
- Fix inverted condition.
* Fri Aug 25 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> 0.9-1
- initial package for Fedora