diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..72ca069 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/crosstalk_1.1.0.1.tar.gz diff --git a/0001-Remove-non-ttf-font-references.patch b/0001-Remove-non-ttf-font-references.patch new file mode 100644 index 0000000..7992a2c --- /dev/null +++ b/0001-Remove-non-ttf-font-references.patch @@ -0,0 +1,27 @@ +From 8ef8b3416e8a85d5ac1f70703425422d98a1615f Mon Sep 17 00:00:00 2001 +From: Elliott Sales de Andrade +Date: Sun, 2 Aug 2020 23:30:42 -0400 +Subject: [PATCH] Remove non-ttf font references. + +Signed-off-by: Elliott Sales de Andrade +--- + inst/lib/bootstrap/css/bootstrap.css | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/inst/lib/bootstrap/css/bootstrap.css b/inst/lib/bootstrap/css/bootstrap.css +index fcab415..cd9f792 100644 +--- a/inst/lib/bootstrap/css/bootstrap.css ++++ b/inst/lib/bootstrap/css/bootstrap.css +@@ -265,8 +265,7 @@ th { + } + @font-face { + font-family: "Glyphicons Halflings"; +- src: url("../fonts/glyphicons-halflings-regular.eot"); +- src: url("../fonts/glyphicons-halflings-regular.eot?#iefix") format("embedded-opentype"), url("../fonts/glyphicons-halflings-regular.woff2") format("woff2"), url("../fonts/glyphicons-halflings-regular.woff") format("woff"), url("../fonts/glyphicons-halflings-regular.ttf") format("truetype"), url("../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular") format("svg"); ++ src: url("../fonts/glyphicons-halflings-regular.ttf") format("truetype"); + } + .glyphicon { + position: relative; +-- +2.25.4 + diff --git a/R-crosstalk.spec b/R-crosstalk.spec new file mode 100644 index 0000000..115aa6f --- /dev/null +++ b/R-crosstalk.spec @@ -0,0 +1,111 @@ +%global packname crosstalk +%global packver 1.1.0.1 +%global rlibdir %{_datadir}/R/library + +Name: R-%{packname} +Version: 1.1.0.1 +Release: 1%{?dist} +Summary: Inter-Widget Interactivity for HTML Widgets + +# Mostly MIT, selectize.js is ASL 2.0 +License: MIT and ASL 2.0 +URL: https://CRAN.R-project.org/package=%{packname} +Source0: https://cran.r-project.org/src/contrib/%{packname}_%{packver}.tar.gz +# Remove extra glyphicons references; Fedora only; +Patch0001: 0001-Remove-non-ttf-font-references.patch + +# Here's the R view of the dependencies world: +# Depends: +# Imports: R-htmltools >= 0.3.5, R-jsonlite, R-lazyeval, R-R6 +# Suggests: R-shiny, R-ggplot2, R-testthat >= 2.1.0 +# LinkingTo: +# Enhances: + +BuildArch: noarch +BuildRequires: R-devel +BuildRequires: tex(latex) +BuildRequires: R-htmltools >= 0.3.5 +BuildRequires: R-jsonlite +BuildRequires: R-lazyeval +BuildRequires: R-R6 +BuildRequires: R-shiny >= 0.11 +BuildRequires: R-ggplot2 +BuildRequires: R-testthat >= 2.1.0 + +BuildRequires: web-assets-devel +# MIT; inst/lib/bootstrap/ +# https://github.com/twbs/bootstrap/releases/tag/v3.4.1 +Provides: bundled(xstatic-bootstrap-common) = 3.4.1 +BuildRequires: glyphicons-halflings-fonts +Requires: glyphicons-halflings-fonts + +# MIT; inst/lib/ionrangeslider +Provides: bundled(js-IonDen-ionrangeslider) = 2.1.2 + +# MIT; inst/lib/jquery +BuildRequires: js-jquery3 >= 3.4.1 +Requires: js-jquery3 >= 3.4.1 + +# ASL 2.0; inst/lib/selectize +Provides: bundled(js-brianreavis-selectize) = 0.12.1 + +# MIT; inst/lib/strftime +Provides: bundled(js-samsonjs-strftime) = 0.9.2 + +%description +Provides building blocks for allowing HTML widgets to communicate with each +other, with Shiny or without (i.e. static .html files). Currently supports +linked brushing and filtering. + + +%prep +%setup -q -c -n %{packname} + +pushd %{packname} +%patch0001 -p1 +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 + +pushd %{buildroot}%{rlibdir}/%{packname} +# Replace fonts by system fonts (note that this cannot be done in prep because +# R CMD INSTALL copies symlink targets.) +ln -sf %{_datadir}/fonts/glyphicons-halflings/glyphicons-halflings-regular.ttf \ + lib/bootstrap/fonts/glyphicons-halflings-regular.ttf + +for f in jquery.js jquery.min.js jquery.min.map; do + ln -sf %{_jsdir}/jquery/3/$f lib/jquery/$f +done +popd + + +%check +%{_bindir}/R CMD check %{packname} + + +%files +%dir %{rlibdir}/%{packname} +%doc %{rlibdir}/%{packname}/html +%{rlibdir}/%{packname}/DESCRIPTION +%doc %{rlibdir}/%{packname}/NEWS.md +%license %{rlibdir}/%{packname}/LICENSE +%{rlibdir}/%{packname}/INDEX +%{rlibdir}/%{packname}/NAMESPACE +%{rlibdir}/%{packname}/Meta +%{rlibdir}/%{packname}/R +%{rlibdir}/%{packname}/help +%{rlibdir}/%{packname}/lib +%{rlibdir}/%{packname}/www + + +%changelog +* Sun Aug 02 2020 Elliott Sales de Andrade - 1.1.0.1-1 +- initial package for Fedora diff --git a/sources b/sources new file mode 100644 index 0000000..4e21078 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (crosstalk_1.1.0.1.tar.gz) = 0f1dc588c1b205ae4c23bce8f0e98b34c7b6485806f767daaa09a57f2bde7459129ca053be09458e1bc7a266348754b0a5fcef8789d039ed83e55d3585f42843