summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCoprDistGit <copr-devel@lists.fedorahosted.org>2023-08-15 21:07:09 +0000
committerCoprDistGit <copr-devel@lists.fedorahosted.org>2023-08-15 21:07:09 +0000
commitf975b235497a61e54ac849a443c8ef49dcab4195 (patch)
treec77715750a119d3b651cf98c7732f72b50a3e767
parenta83df9697028ab41d35fe40ffc76a2571a16dc88 (diff)
automatic import of R-CRAN-formatdown
-rw-r--r--.gitignore1
-rw-r--r--R-CRAN-formatdown.spec65
-rw-r--r--sources1
3 files changed, 67 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..27e18fd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/formatdown_0.1.2.tar.gz
diff --git a/R-CRAN-formatdown.spec b/R-CRAN-formatdown.spec
new file mode 100644
index 0000000..680bad4
--- /dev/null
+++ b/R-CRAN-formatdown.spec
@@ -0,0 +1,65 @@
+%global __brp_check_rpaths %{nil}
+%global __requires_exclude ^libmpi
+%global packname formatdown
+%global packver 0.1.2
+%global rlibdir /usr/local/lib/R/library
+
+Name: R-CRAN-%{packname}
+Version: 0.1.2
+Release: 1%{?dist}%{?buildtag}
+Summary: Formatting Tools for 'rmarkdown' Documents
+
+License: MIT + file LICENSE
+URL: https://cran.r-project.org/package=%{packname}
+Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz
+
+
+BuildRequires: R-devel >= 3.5.0
+Requires: R-core >= 3.5.0
+BuildArch: noarch
+BuildRequires: R-CRAN-checkmate
+BuildRequires: R-CRAN-data.table
+BuildRequires: R-CRAN-units
+BuildRequires: R-CRAN-wrapr
+Requires: R-CRAN-checkmate
+Requires: R-CRAN-data.table
+Requires: R-CRAN-units
+Requires: R-CRAN-wrapr
+
+%description
+Provides a small set of tools for formatting tasks when creating documents
+in R Markdown or Quarto Markdown. Convert the elements of a numerical
+vector to character strings in one of several forms: powers-of-ten
+notation in engineering or scientific form delimited for rendering as
+inline equations; integer or decimal notation delimited for equation
+rendering; numbers with measurement units (non-delimited) where units are
+selected to eliminate the need for powers-of-ten or scientific notation.
+Useful for rendering a numerical scalar in an inline R code chunk as well
+as formatting columns of data frames displayed in a table.
+
+%prep
+%setup -q -c -n %{packname}
+
+# fix end of executable files
+find -type f -executable -exec grep -Iq . {} \; -exec sed -i -e '$a\' {} \;
+# prevent binary stripping
+[ -d %{packname}/src ] && find %{packname}/src -type f -exec \
+ sed -i 's@/usr/bin/strip@/usr/bin/true@g' {} \; || true
+[ -d %{packname}/src ] && find %{packname}/src/Make* -type f -exec \
+ sed -i 's@-g0@@g' {} \; || true
+# don't allow local prefix in executable scripts
+find -type f -executable -exec sed -Ei 's@#!( )*/usr/local/bin@#!/usr/bin@g' {} \;
+
+%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
+# remove buildroot from installed files
+find %{buildroot}%{rlibdir} -type f -exec sed -i "s@%{buildroot}@@g" {} \;
+
+%files
+%{rlibdir}/%{packname}
diff --git a/sources b/sources
new file mode 100644
index 0000000..68c2a3d
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+786a7e1ca9555f21cb87411fbf65b7ef formatdown_0.1.2.tar.gz