282 lines
10 KiB
RPMSpec
282 lines
10 KiB
RPMSpec
%global packname rmarkdown
|
|
%global rlibdir %{_datadir}/R/library
|
|
|
|
# Recursive dependencies.
|
|
%global with_suggests 0
|
|
|
|
Name: R-%{packname}
|
|
Version: 1.10
|
|
Release: 4%{?dist}
|
|
Summary: Dynamic Documents for R
|
|
|
|
# Main is GPLv3; see bundled Provides below for others.
|
|
License: GPLv3 and ASL 2.0 and BSD and MIT and OFL and W3C
|
|
URL: https://cran.r-project.org/web/packages/%{packname}/index.html
|
|
Source0: https://cran.r-project.org/src/contrib/%{packname}_%{version}.tar.gz
|
|
Patch0001: 0001-Remove-bundled-bits.patch
|
|
Patch0002: 0007-Add-original-non-minified-Bootswatch-themes.patch
|
|
Patch0003: 0008-Add-source-for-code-prettify.patch
|
|
Patch0004: 0009-Skip-shiny-tests.patch
|
|
|
|
# Here's the R view of the dependencies world:
|
|
# Depends:
|
|
# Imports: R-tools, R-utils, R-knitr >= 1.18, R-yaml >= 2.1.5, R-htmltools >= 0.3.5, R-evaluate >= 0.8, R-base64enc, R-jsonlite, R-rprojroot, R-mime, R-tinytex >= 0.3, R-methods, R-stringr >= 1.2.0
|
|
# Suggests: R-shiny >= 0.11, R-tufte, R-testthat, R-digest, R-dygraphs, R-tibble
|
|
# LinkingTo:
|
|
# Enhances:
|
|
|
|
BuildArch: noarch
|
|
Requires: R-core
|
|
Requires: pandoc >= 1.12.3
|
|
Requires: pandoc-citeproc
|
|
|
|
Requires: R-tools
|
|
Requires: R-utils
|
|
Requires: R-knitr >= 1.18
|
|
Requires: R-yaml >= 2.1.5
|
|
Requires: R-htmltools >= 0.3.5
|
|
Requires: R-evaluate >= 0.8
|
|
Requires: R-base64enc
|
|
Requires: R-jsonlite
|
|
Requires: R-rprojroot
|
|
Requires: R-mime
|
|
Requires: R-tinytex >= 0.3
|
|
Requires: R-methods
|
|
Requires: R-stringr >= 1.2.0
|
|
Suggests: R-shiny >= 0.11
|
|
Suggests: R-tufte
|
|
Suggests: R-digest
|
|
Suggests: R-tibble
|
|
BuildRequires: R-devel
|
|
BuildRequires: tex(latex)
|
|
BuildRequires: pandoc >= 1.12.3
|
|
BuildRequires: pandoc-citeproc
|
|
BuildRequires: R-tools
|
|
BuildRequires: R-utils
|
|
BuildRequires: R-knitr >= 1.18
|
|
BuildRequires: R-yaml >= 2.1.5
|
|
BuildRequires: R-htmltools >= 0.3.5
|
|
BuildRequires: R-evaluate >= 0.8
|
|
BuildRequires: R-base64enc
|
|
BuildRequires: R-jsonlite
|
|
BuildRequires: R-rprojroot
|
|
BuildRequires: R-mime
|
|
BuildRequires: R-tinytex >= 0.3
|
|
BuildRequires: R-methods
|
|
BuildRequires: R-stringr >= 1.2.0
|
|
BuildRequires: R-testthat
|
|
BuildRequires: R-digest
|
|
%if %{with_suggests}
|
|
BuildRequires: R-shiny >= 0.11
|
|
BuildRequires: R-tufte
|
|
BuildRequires: R-dygraphs
|
|
BuildRequires: R-tibble
|
|
%endif
|
|
|
|
#BuildRequires: fontawesome-fonts = 4.7.0
|
|
#BuildRequires: fontawesome-fonts-web = 4.7.0
|
|
#Suggests: fontawesome-fonts = 4.7.0
|
|
#Suggests: fontawesome-fonts-web = 4.7.0
|
|
Provides: bundled(fontawesome-fonts) = 5.0.13
|
|
Provides: bundled(fontawesome-fonts-web) = 5.0.13
|
|
|
|
# These are not all packaged, but should *probably* be the names if they are.
|
|
|
|
# MIT; inst/rmd/h/bootstrap-3.3.5/
|
|
# https://github.com/twbs/bootstrap/releases/tag/v3.3.5
|
|
Provides: bundled(xstatic-bootstrap-common) = 3.3.5
|
|
BuildRequires: adobe-source-sans-pro-fonts
|
|
Suggests: adobe-source-sans-pro-fonts
|
|
BuildRequires: glyphicons-halflings-fonts
|
|
Suggests: glyphicons-halflings-fonts
|
|
BuildRequires: google-roboto-fonts
|
|
Suggests: google-roboto-fonts
|
|
BuildRequires: impallari-raleway-fonts
|
|
Suggests: impallari-raleway-fonts
|
|
BuildRequires: lato-fonts
|
|
Suggests: lato-fonts
|
|
# OFL; inst/rmd/h/bootstrap-3.3.5/css/fonts/NewsCycle*.ttf
|
|
Provides: bundled(glyphography-news-cycle-fonts) = 0.4
|
|
|
|
# MIT; inst/rmd/h/ionicons-2.0.1/
|
|
# http://ionicons.com/
|
|
Provides: bundled(ionicons-fonts) = 2.0.1
|
|
|
|
# MIT; inst/rmd/h/jquery-1.11.3/ (unbundled)
|
|
BuildRequires: js-jquery1 = 1.12.4
|
|
Requires: js-jquery1 = 1.12.4
|
|
|
|
# MIT; inst/rmd/h/jqueryui-1.11.4/ (outdated in Fedora)
|
|
Provides: bundled(xstatic-jquery-ui-common) = 1.11.4
|
|
|
|
# MIT; inst/rmd/h/navigation-1.1/tabsets.js
|
|
# https://github.com/aidanlister/jquery-stickytabs (partially)
|
|
Provides: bundled(js-jquery-stickytabs) = 1.2.4
|
|
|
|
# MIT; inst/rmd/h/tocify-1.9.1/
|
|
# http://gregfranko.com/jquery.tocify.js/
|
|
Provides: bundled(js-jquery-tocify) = 1.9.1
|
|
|
|
# ASL 2.0; inst/rmd/ioslides/ioslides-13.5.1/
|
|
Provides: bundled(js-ioslides) = 13.5.1
|
|
# MIT; inst/rmd/ioslides/ioslides-13.5.1/js/hammer.js
|
|
# https://hammerjs.github.io/
|
|
Provides: bundled(js-hammer) = 0.4
|
|
# MIT & BSD; inst/rmd/ioslides/ioslides-13.5.1/js/modernizr.custom.45394.js
|
|
# https://modernizr.com/
|
|
Provides: bundled(js-modernizr) = 2.5.3
|
|
# ASL 2.0; inst/rmd/ioslides/ioslides-13.5.1/js/prettify/
|
|
# https://github.com/google/code-prettify
|
|
Provides: bundled(js-code-prettify) = 20130304
|
|
BuildRequires: open-sans-fonts
|
|
Suggests: open-sans-fonts
|
|
BuildRequires: adobe-source-code-pro-fonts
|
|
Suggests: adobe-source-code-pro-fonts
|
|
|
|
# W3C; inst/rmd/slidy/Slidy2/
|
|
# https://www.w3.org/Talks/Tools/Slidy2/
|
|
Provides: bundled(js-slidy) = 2
|
|
|
|
%description
|
|
Convert R Markdown documents into a variety of formats.
|
|
|
|
|
|
%prep
|
|
%setup -q -c -n %{packname}
|
|
|
|
pushd %{packname}
|
|
# Remove minified things that are unused.
|
|
rm inst/rmd/ioslides/ioslides-13.5.1/js/{order,require-1.0.8.min}.js
|
|
rm -r inst/rmd/ioslides/ioslides-13.5.1/js/polyfills/
|
|
# Remove bundled jquery.
|
|
rm -r inst/rmd/h/jquery-1.11.3 inst/rmd/h/jquery-AUTHORS.txt
|
|
# Remove bundled highlight.js.
|
|
rm -r inst/rmd/h/highlightjs
|
|
# Must be removed: https://bugzilla.redhat.com/show_bug.cgi?id=961642#c4
|
|
rm inst/rmd/h/bootstrap-3.3.5/css/fonts/Ubuntu.ttf
|
|
|
|
# Now fix references to bundled stuff.
|
|
%patch0001 -p1
|
|
|
|
# Restore non-minified source files.
|
|
%patch0002 -p1
|
|
%patch0003 -p1
|
|
|
|
# Avoid dependency loop.
|
|
%if !%{with_suggests}
|
|
%patch0004 -p1
|
|
%endif
|
|
|
|
# Fix executable bits
|
|
chmod -x inst/rmd/h/ionicons-2.0.1/{LICENSE,css/*.css,fonts/*.ttf}
|
|
chmod -x inst/rmd/ioslides/ioslides-13.5.1/js/hammer.js
|
|
popd
|
|
|
|
|
|
%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
|
|
|
|
# Replace fonts by system fonts (note that this cannot be done in prep because
|
|
# R CMD INSTALL copies symlink targets.)
|
|
pushd %{buildroot}%{rlibdir}/%{packname}
|
|
# Remove bundled fonts in ioslides.
|
|
rm rmd/ioslides/ioslides-13.5.1/fonts/OpenSans*.ttf
|
|
for f in OpenSans-Regular OpenSans-Italic OpenSans-Semibold OpenSans-SemiboldItalic; do
|
|
ln -s /usr/share/fonts/open-sans/${f}.ttf rmd/ioslides/ioslides-13.5.1/fonts/${f}.ttf
|
|
done
|
|
rm rmd/ioslides/ioslides-13.5.1/fonts/SourceCodePro.ttf
|
|
ln -s /usr/share/fonts/adobe-source-code-pro/SourceCodePro-Regular.otf rmd/ioslides/ioslides-13.5.1/fonts/SourceCodePro-Regular.otf
|
|
# Remove bundled FontAwesome. (too new to remove)
|
|
#rm -r rmd/h/font-awesome-4.5.0
|
|
#mkdir rmd/h/font-awesome-4.7.0
|
|
#ln -s /usr/share/font-awesome-web/css rmd/h/font-awesome-4.7.0/css
|
|
#ln -s /usr/share/fonts/fontawesome rmd/h/font-awesome-4.7.0/fonts
|
|
# Remove bundled fonts from bootstrap.
|
|
ln -sf /usr/share/fonts/lato/Lato-Regular.ttf rmd/h/bootstrap-3.3.5/css/fonts/Lato.ttf
|
|
ln -sf /usr/share/fonts/lato/Lato-Bold.ttf rmd/h/bootstrap-3.3.5/css/fonts/LatoBold.ttf
|
|
ln -sf /usr/share/fonts/lato/Lato-Italic.ttf rmd/h/bootstrap-3.3.5/css/fonts/LatoItalic.ttf
|
|
ln -sf /usr/share/fonts/open-sans/OpenSans-Regular.ttf rmd/h/bootstrap-3.3.5/css/fonts/OpenSans.ttf
|
|
for f in Bold BoldItalic Italic Light LightItalic; do
|
|
ln -sf /usr/share/fonts/open-sans/OpenSans-${f}.ttf rmd/h/bootstrap-3.3.5/css/fonts/OpenSans${f}.ttf
|
|
done
|
|
rm rmd/h/bootstrap-3.3.5/css/fonts/Raleway*.ttf
|
|
for f in Regular Bold; do
|
|
ln -s /usr/share/fonts/impallari-raleway/Raleway-${f}.otf rmd/h/bootstrap-3.3.5/css/fonts/
|
|
done
|
|
rm rmd/h/bootstrap-3.3.5/css/fonts/Roboto*.ttf
|
|
ln -s /usr/share/fonts/google-roboto/Roboto-Regular.ttf rmd/h/bootstrap-3.3.5/css/fonts/Roboto.ttf
|
|
for f in Light Medium Bold; do
|
|
ln -s /usr/share/fonts/google-roboto/Roboto-${f}.ttf rmd/h/bootstrap-3.3.5/css/fonts/Roboto${f}.ttf
|
|
done
|
|
rm rmd/h/bootstrap-3.3.5/css/fonts/SourceSansPro*.ttf
|
|
for f in Bold It Light Regular; do
|
|
ln -s /usr/share/fonts/source-sans-pro/SourceSansPro-${f}.otf rmd/h/bootstrap-3.3.5/css/fonts/
|
|
done
|
|
rm rmd/h/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.*
|
|
ln -s /usr/share/fonts/glyphicons-halflings/glyphicons-halflings-regular.ttf rmd/h/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.ttf
|
|
popd
|
|
|
|
|
|
%check
|
|
%if %{with_suggests}
|
|
%{_bindir}/R CMD check %{packname}
|
|
%else
|
|
_R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname}
|
|
%endif
|
|
|
|
|
|
%files
|
|
%dir %{rlibdir}/%{packname}
|
|
%doc %{rlibdir}/%{packname}/html
|
|
%{rlibdir}/%{packname}/DESCRIPTION
|
|
%license %{rlibdir}/%{packname}/COPYING
|
|
%license %{rlibdir}/%{packname}/NOTICE
|
|
%doc %{rlibdir}/%{packname}/NEWS
|
|
%{rlibdir}/%{packname}/INDEX
|
|
%{rlibdir}/%{packname}/NAMESPACE
|
|
%{rlibdir}/%{packname}/Meta
|
|
%{rlibdir}/%{packname}/R
|
|
%{rlibdir}/%{packname}/help
|
|
%{rlibdir}/%{packname}/rmarkdown
|
|
%dir %{rlibdir}/%{packname}/rmd
|
|
%{rlibdir}/%{packname}/rmd/fragment
|
|
%dir %{rlibdir}/%{packname}/rmd/h
|
|
%{rlibdir}/%{packname}/rmd/h/_navbar.html
|
|
%{rlibdir}/%{packname}/rmd/h/default.html
|
|
%{rlibdir}/%{packname}/rmd/h/bootstrap-3.3.5
|
|
%{rlibdir}/%{packname}/rmd/h/fontawesome
|
|
%{rlibdir}/%{packname}/rmd/h/ionicons-2.0.1
|
|
%{rlibdir}/%{packname}/rmd/h/jqueryui-1.11.4
|
|
%{rlibdir}/%{packname}/rmd/h/jqueryui-AUTHORS.txt
|
|
%{rlibdir}/%{packname}/rmd/h/navigation-1.1
|
|
%{rlibdir}/%{packname}/rmd/h/pagedtable-1.1
|
|
%{rlibdir}/%{packname}/rmd/h/rmarkdown
|
|
%{rlibdir}/%{packname}/rmd/h/rsiframe-1.1
|
|
%{rlibdir}/%{packname}/rmd/h/tocify-1.9.1
|
|
%{rlibdir}/%{packname}/rmd/ioslides
|
|
%{rlibdir}/%{packname}/rmd/slidy
|
|
%{rlibdir}/%{packname}/rmd/latex
|
|
|
|
|
|
%changelog
|
|
* Sun Sep 23 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.10-4
|
|
- Fix unbundling of fonts
|
|
|
|
* Sat Sep 22 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.10-3
|
|
- Add missing jquery Requires
|
|
|
|
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.10-2
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
* Fri Jun 22 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.10-1
|
|
- Update to latest version
|
|
|
|
* Sun Apr 22 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.9-1
|
|
- initial package for Fedora
|