Initial import (#1511803).
This commit is contained in:
parent
10d8d6f7a9
commit
b856bf7d04
|
@ -0,0 +1 @@
|
|||
/knitr_1.17.tar.gz
|
|
@ -0,0 +1,111 @@
|
|||
%global packname knitr
|
||||
%global rlibdir %{_datadir}/R/library
|
||||
|
||||
# Mostly unnecessary for a simple build, plus a lot depend on knitr.
|
||||
%global with_suggests 0
|
||||
|
||||
Name: R-%{packname}
|
||||
Version: 1.17
|
||||
Release: 2%{?dist}
|
||||
Summary: A General-Purpose Package for Dynamic Report Generation in R
|
||||
|
||||
License: GPLv2+
|
||||
URL: https://cran.r-project.org/web/packages/%{packname}/index.html
|
||||
Source0: https://cran.r-project.org/src/contrib/%{packname}_%{version}.tar.gz
|
||||
|
||||
# Here's the R view of the dependencies world:
|
||||
# Depends:
|
||||
# Imports: R-evaluate R-digest R-highr R-markdown R-stringr R-yaml R-methods R-tools
|
||||
# Suggests: R-formatR R-testit R-rgl R-codetools R-rmarkdown R-htmlwidgets R-webshot R-tikzDevice R-png R-jpeg R-XML R-RCurl R-DBI R-tibble
|
||||
# LinkingTo:
|
||||
# Enhances:
|
||||
|
||||
BuildArch: noarch
|
||||
Requires: R-core
|
||||
|
||||
Requires: tex(framed.sty)
|
||||
Suggests: tex(listings.sty)
|
||||
|
||||
Requires: R-evaluate R-digest R-highr R-markdown R-stringr R-yaml R-methods R-tools
|
||||
Suggests: R-formatR R-rgl R-codetools R-rmarkdown R-htmlwidgets R-webshot R-tikzDevice R-png R-jpeg R-XML R-RCurl R-DBI R-tibble
|
||||
BuildRequires: R-devel tex(latex) tex(framed.sty)
|
||||
BuildRequires: R-evaluate R-digest R-highr R-markdown R-stringr R-yaml R-methods R-tools
|
||||
BuildRequires: R-testit R-tikzDevice
|
||||
BuildRequires: R-codetools R-htmlwidgets R-png R-jpeg R-XML R-RCurl R-DBI
|
||||
%if %{with_suggests}
|
||||
BuildRequires: R-formatR R-rgl R-rmarkdown R-webshot R-tibble
|
||||
# Mostly examples.
|
||||
BuildRequires; R-Cairo
|
||||
BuildRequires: lyx
|
||||
BuildRequires; tex(animate.sty)
|
||||
BuildRequires; tex(relsize.sty)
|
||||
BuildRequires; tex(beamer.cls)
|
||||
BuildRequires; tex(tufte-handout.cls)
|
||||
%endif
|
||||
|
||||
%description
|
||||
Provides a general-purpose tool for dynamic report generation in R using
|
||||
Literate Programming techniques.
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -c -n %{packname}
|
||||
|
||||
# Can't run from installed location anyway.
|
||||
rm %{packname}/inst/examples/knit-all.R
|
||||
|
||||
|
||||
%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
|
||||
|
||||
mkdir %{buildroot}%{_bindir}
|
||||
sed -e '1d;2i#!%{_bindir}/Rscript' %{buildroot}%{rlibdir}/%{packname}/bin/knit > %{buildroot}%{_bindir}/knit
|
||||
chmod --reference=%{buildroot}%{rlibdir}/%{packname}/bin/knit %{buildroot}%{_bindir}/knit
|
||||
touch -r %{buildroot}%{rlibdir}/%{packname}/bin/knit %{buildroot}%{_bindir}/knit
|
||||
rm -r %{buildroot}%{rlibdir}/%{packname}/bin
|
||||
|
||||
rm %{buildroot}%{rlibdir}/%{packname}/misc/framed.sty
|
||||
|
||||
|
||||
%check
|
||||
%if %{with_suggests}
|
||||
%{_bindir}/R CMD check %{packname}
|
||||
%else
|
||||
_R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname}
|
||||
%endif
|
||||
|
||||
|
||||
%files
|
||||
%{_bindir}/knit
|
||||
%dir %{rlibdir}/%{packname}
|
||||
%doc %{rlibdir}/%{packname}/doc
|
||||
%doc %{rlibdir}/%{packname}/html
|
||||
%{rlibdir}/%{packname}/DESCRIPTION
|
||||
%{rlibdir}/%{packname}/NEWS.Rd
|
||||
%{rlibdir}/%{packname}/INDEX
|
||||
%{rlibdir}/%{packname}/NAMESPACE
|
||||
%{rlibdir}/%{packname}/Meta
|
||||
%{rlibdir}/%{packname}/R
|
||||
%{rlibdir}/%{packname}/help
|
||||
%doc %{rlibdir}/%{packname}/CITATION
|
||||
%{rlibdir}/%{packname}/demo
|
||||
%{rlibdir}/%{packname}/examples
|
||||
%{rlibdir}/%{packname}/misc
|
||||
%{rlibdir}/%{packname}/opencpu
|
||||
%{rlibdir}/%{packname}/shiny
|
||||
%{rlibdir}/%{packname}/themes
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Nov 10 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> 1.17-2
|
||||
- Fix license tag
|
||||
- Fix embedding script paths
|
||||
|
||||
* Fri Aug 25 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> 1.17-1
|
||||
- initial package for Fedora
|
Loading…
Reference in New Issue