summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCoprDistGit <copr-devel@lists.fedorahosted.org>2024-09-27 01:41:51 +0000
committerCoprDistGit <copr-devel@lists.fedorahosted.org>2024-09-27 01:41:51 +0000
commitaa9e13b539f32b74f3637f930a75fda9aceb16e9 (patch)
treef8d0627199220e4e5106c9efd8992aab8503e4ec
parent761f44718bdd27652a0ff23830ac963767865a35 (diff)
automatic import of R-CRAN-CCd
-rw-r--r--.gitignore1
-rw-r--r--R-CRAN-CCd.spec58
-rw-r--r--sources1
3 files changed, 60 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..35bcbe1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/CCd_1.0.tar.gz
diff --git a/R-CRAN-CCd.spec b/R-CRAN-CCd.spec
new file mode 100644
index 0000000..a2c9ce4
--- /dev/null
+++ b/R-CRAN-CCd.spec
@@ -0,0 +1,58 @@
+%global __brp_check_rpaths %{nil}
+%global __requires_exclude ^libmpi
+%global packname CCd
+%global packver 1.0
+%global rlibdir /usr/local/lib/R/library
+
+Name: R-CRAN-%{packname}
+Version: 1.0
+Release: 1%{?dist}%{?buildtag}
+Summary: The Cauchy-Cacoullos (Discrete Cauchy) Distribution
+
+License: GPL (>= 2)
+URL: https://cran.r-project.org/package=%{packname}
+Source0: %{url}&version=%{packver}#/%{packname}_%{packver}.tar.gz
+
+
+BuildRequires: R-devel >= 4.0
+Requires: R-core >= 4.0
+BuildArch: noarch
+BuildRequires: R-CRAN-Rfast
+BuildRequires: R-stats
+Requires: R-CRAN-Rfast
+Requires: R-stats
+
+%description
+Maximum likelihood estimation of the Cauchy-Cacoullos (discrete Cauchy)
+distribution. Probability mass, distribution and quantile function are
+also included. The reference paper is: Papadatos N. (2022). "The
+Characteristic Function of the Discrete Cauchy Distribution in Memory of
+T. Cacoullos". Journal of Statistical Theory Practice, 16(3): 47.
+<doi:10.1007/s42519-022-00268-6>.
+
+%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..5eefa06
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+b4a62eafee4c115fa7cbe43f152b893f CCd_1.0.tar.gz