summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorIyán Méndez Veiga2024-01-17 19:42:56 +0100
committerIyán Méndez Veiga2024-01-17 19:42:56 +0100
commitd28d4a7ffb4df6ef6fdbbbf97f49c9f265aded2f (patch)
tree043dcb6567a987cffd41c89714212cc085e84701
downloadaur-d28d4a7ffb4df6ef6fdbbbf97f49c9f265aded2f.tar.gz
Initial commit
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore2
-rw-r--r--PKGBUILD47
3 files changed, 66 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ece40c42f8ba
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = cmdstan
+ pkgdesc = The command line interface to Stan, a C++ library for statistical modeling and high-performance statistical computation
+ pkgver = 2.34.0
+ pkgrel = 1
+ url = https://mc-stan.org/
+ arch = x86_64
+ license = BSD-3-Clause
+ checkdepends = python
+ makedepends = gcc
+ depends = gcc-libs
+ depends = glibc
+ source = cmdstan-2.34.0.tar.gz::https://github.com/stan-dev/cmdstan/releases/download/v2.34.0/cmdstan-2.34.0.tar.gz
+ source = https://patch-diff.githubusercontent.com/raw/stan-dev/cmdstan/pull/1239.patch
+ b2sums = d1b8e410e48d15ca9227e232da4b8fecc564cc40a1a91e13bc76f5aa403aa7a9d88ad89286b2a95c8a79653c9cb8b9b9387c75efc6913c76fdce27f5c4ee7ac5
+ b2sums = 01c4a242db1749816f57c81855313bc8b80a6cd1721a8d9199d418831f6e3de6e14a5c795297641fa9af909da6c68dd9e660c0f7b8d565503a90896b8316acd4
+
+pkgname = cmdstan
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..92058b028e45
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+*.tar.*
+*.log
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..5a513afb1698
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Iyán Méndez Veiga <me (at) iyanmv (dot) com>
+# Contributor: Thomas Wucher <arch (at) thomaswucher (dot) de>
+pkgname=cmdstan
+pkgver=2.34.0
+pkgrel=1
+pkgdesc="The command line interface to Stan, a C++ library for statistical modeling and high-performance statistical computation"
+arch=('x86_64')
+url="https://mc-stan.org/"
+license=('BSD-3-Clause')
+depends=(
+ 'gcc-libs'
+ 'glibc'
+)
+makedepends=('gcc')
+checkdepends=('python')
+source=(
+ "${pkgname}-${pkgver}.tar.gz::https://github.com/stan-dev/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz"
+ "https://patch-diff.githubusercontent.com/raw/stan-dev/cmdstan/pull/1239.patch"
+)
+b2sums=('d1b8e410e48d15ca9227e232da4b8fecc564cc40a1a91e13bc76f5aa403aa7a9d88ad89286b2a95c8a79653c9cb8b9b9387c75efc6913c76fdce27f5c4ee7ac5'
+ '01c4a242db1749816f57c81855313bc8b80a6cd1721a8d9199d418831f6e3de6e14a5c795297641fa9af909da6c68dd9e660c0f7b8d565503a90896b8316acd4')
+
+prepare() {
+ # https://github.com/stan-dev/cmdstan/issues/1238
+ patch --directory="${pkgname}-${pkgver}" --forward --strip=1 --input="${srcdir}/1239.patch"
+}
+
+build() {
+ cd "${pkgname}-${pkgver}"
+ make -j$(nproc) build
+}
+
+check() {
+ cd "${pkgname}-${pkgver}"
+ make -j$(nproc) examples/bernoulli/bernoulli
+ ./examples/bernoulli/bernoulli sample data file=examples/bernoulli/bernoulli.data.json
+ ./bin/stansummary output.csv
+ python runCmdStanTests.py src/test
+}
+
+package() {
+ cd "${pkgname}-${pkgver}"
+ install -D -t "${pkgdir}/usr/bin" bin/{stanc,stansummary}
+ install bin/diagnose "${pkgdir}/usr/bin/stan-diagnose"
+ install bin/print "${pkgdir}/usr/bin/stan-print"
+ install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}