add r-bstats

This commit is contained in:
Sukanka 2022-06-03 21:28:45 +08:00
parent 70f6129b06
commit 05caa354d9
3 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,30 @@
#Maintainer: sukanka <su975853527 AT gmail.com>
_cranname=bstats
_cranver=0.0.0.9002
pkgname=r-${_cranname,,}
pkgver=${_cranver//[:-]/.}
pkgrel=1
pkgdesc="Bayesian statistics"
arch=('x86_64')
url="https://github.com/AlexanderLyNL/${_cranname}"
license=('LGPL3')
depends=(r
r-hypergeo
r-purrr
r-suppdists
)
makedepends=()
optdepends=()
source=("git+https://github.com/AlexanderLyNL/${_cranname}.git")
sha256sums=('SKIP')
build() {
mkdir -p ${srcdir}/usr/lib/R/library
R -e "install.packages('${srcdir}/${_cranname}',\
type='source', repos=NULL,lib='${srcdir}/usr/lib/R/library', INSTALL_opts='--no-multiarch --no-docs --no-test-load')"
}
package() {
cp -a --no-preserve=ownership "${srcdir}/usr" "${pkgdir}"
}

View file

@ -0,0 +1,12 @@
#!/usr/bin/env python3
from lilaclib import *
def pre_build():
for line in edit_file('PKGBUILD'):
if line.startswith('_pkgver='):
line = f'_pkgver={_G.newver}'
print(line)
update_pkgver_and_pkgrel(_G.newver.replace(':', '.').replace('-', '.'))
def post_build():
git_pkgbuild_commit()

View file

@ -0,0 +1,13 @@
maintainers:
- github: sukanka
email: su975853527@gmail.com
build_prefix: extra-x86_64
repo_depends:
- r-hypergeo
- r-purrr
- r-suppdists
update_on:
- regex: "Version:\s*([\d._-]+)"
source: regex
url: https://raw.githubusercontent.com/AlexanderLyNL/bstats/master/DESCRIPTION