diff --git a/R-commonmark.spec b/R-commonmark.spec new file mode 100644 index 0000000..c7aefa4 --- /dev/null +++ b/R-commonmark.spec @@ -0,0 +1,73 @@ +%bcond_with check + +%global packname commonmark +%global rlibdir %{_libdir}/R/library + +Name: R-%{packname} +Version: 1.7 +Release: 1 +Summary: High Performance CommonMark and Github Markdown Rendering in R + +License: BSD +URL: https://CRAN.R-project.org/package=%{packname} +Source0: https://cran.r-project.org/src/contrib/%{packname}_%{version}.tar.gz + +BuildRequires: R-devel +BuildRequires: tex(latex) +%if %{with check} +BuildRequires: R-curl +BuildRequires: R-testthat +BuildRequires: R-xml2 +%endif + +Provides: bundled(cmark) = 0.28.3.gfm.19 + +%description +The CommonMark specification defines a rationalized version of markdown +syntax. This package uses the 'cmark' reference implementation for +converting markdown text into various formats including html, latex and +groff man. In addition it exposes the markdown parse tree in xml format. +Also includes opt-in support for GFM extensions including tables, +autolinks, and strikethrough text. + + +%prep +%setup -q -c -n %{packname} +sed -i 's/curl, //' %{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 +%if %{with check} +# No network +_R_CHECK_FORCE_SUGGESTS_=0 %{_bindir}/R CMD check %{packname} --no-examples +%endif + + +%files +%dir %{rlibdir}/%{packname} +%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 +%dir %{rlibdir}/%{packname}/libs +%{rlibdir}/%{packname}/libs/%{packname}.so + + +%changelog +* Thu Jun 16 2022 misaka00251 - 1.7-1 +- Init package (Thanks to fedora team) diff --git a/commonmark_1.7.tar.gz b/commonmark_1.7.tar.gz new file mode 100644 index 0000000..2d46b31 Binary files /dev/null and b/commonmark_1.7.tar.gz differ