mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
r-rpostgres: init, checkdependency of r-sf
This commit is contained in:
parent
f2a54c6267
commit
c2d70ea0dc
4 changed files with 130 additions and 0 deletions
77
BioArchLinux/r-rpostgres/PKGBUILD
Normal file
77
BioArchLinux/r-rpostgres/PKGBUILD
Normal file
|
@ -0,0 +1,77 @@
|
|||
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
|
||||
# Contributor: peippo <christoph+aur@christophfink.com>
|
||||
|
||||
_pkgname=RPostgres
|
||||
_pkgver=1.4.5
|
||||
pkgname=r-${_pkgname,,}
|
||||
pkgver=${_pkgver//-/.}
|
||||
pkgrel=1
|
||||
pkgdesc="Rcpp Interface to PostgreSQL"
|
||||
arch=(x86_64)
|
||||
url="https://cran.r-project.org/package=${_pkgname}"
|
||||
license=(GPL3)
|
||||
depends=(
|
||||
postgresql-libs
|
||||
r-bit64
|
||||
r-blob
|
||||
r-dbi
|
||||
r-hms
|
||||
r-lubridate
|
||||
r-rcpp
|
||||
r-withr
|
||||
)
|
||||
makedepends=(
|
||||
boost
|
||||
r-plogr
|
||||
)
|
||||
checkdepends=(
|
||||
postgresql
|
||||
r-dbitest
|
||||
r-testthat
|
||||
)
|
||||
optdepends=(
|
||||
r-callr
|
||||
r-covr
|
||||
r-dbitest
|
||||
r-knitr
|
||||
r-rmarkdown
|
||||
r-testthat
|
||||
)
|
||||
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
|
||||
"system-boost.patch")
|
||||
md5sums=('5b2cf8d6695f79f5bb0f365fdd63f825'
|
||||
'77a2948b75606cdf00a4e6fa280c6ce9')
|
||||
sha256sums=('70ff848cba51ddad4642a20e01cda1033e6f218b015a13380c30604bbd18c797'
|
||||
'760e6260eb765bb3414759a6aa56871457fdc73480c40419d6c01ae8d086bfb5')
|
||||
|
||||
prepare() {
|
||||
# use system boost library
|
||||
patch -Np1 -i system-boost.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
mkdir -p build
|
||||
R CMD INSTALL "$_pkgname" -l build
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$_pkgname/tests"
|
||||
|
||||
# create database for tests
|
||||
export PGDATA=db
|
||||
export PGHOST="$(pwd)/host"
|
||||
mkdir host
|
||||
initdb
|
||||
pg_ctl -l postgres.log -o "-k ${PGHOST@Q}" start
|
||||
createdb
|
||||
|
||||
R_LIBS="$srcdir/build" NOT_CRAN=true Rscript --vanilla testthat.R
|
||||
|
||||
# shut down test database
|
||||
pg_ctl stop
|
||||
}
|
||||
|
||||
package() {
|
||||
install -d "$pkgdir/usr/lib/R/library"
|
||||
cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library"
|
||||
}
|
16
BioArchLinux/r-rpostgres/lilac.py
Normal file
16
BioArchLinux/r-rpostgres/lilac.py
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env python3
|
||||
from lilaclib import *
|
||||
|
||||
import os
|
||||
import sys
|
||||
sys.path.append(os.path.normpath(f'{__file__}/../../../lilac-extensions'))
|
||||
from lilac_r_utils import r_pre_build
|
||||
|
||||
def pre_build():
|
||||
r_pre_build(
|
||||
_G,
|
||||
expect_systemrequirements = "libpq >= 9.0: libpq-dev (deb) or postgresql-devel (rpm)",
|
||||
)
|
||||
|
||||
def post_build():
|
||||
git_pkgbuild_commit()
|
27
BioArchLinux/r-rpostgres/lilac.yaml
Normal file
27
BioArchLinux/r-rpostgres/lilac.yaml
Normal file
|
@ -0,0 +1,27 @@
|
|||
build_prefix: extra-x86_64
|
||||
maintainers:
|
||||
- github: pekkarr
|
||||
email: pekkarr@protonmail.com
|
||||
repo_depends:
|
||||
- r-bit64
|
||||
- r-blob
|
||||
- r-dbi
|
||||
- r-hms
|
||||
- r-lubridate
|
||||
- r-rcpp
|
||||
- r-withr
|
||||
repo_makedepends:
|
||||
- r-plogr
|
||||
- r-dbitest
|
||||
- r-testthat
|
||||
update_on:
|
||||
- source: rpkgs
|
||||
pkgname: RPostgres
|
||||
repo: cran
|
||||
md5: true
|
||||
- alias: r
|
||||
- source: alpm
|
||||
alpm: postgresql-libs
|
||||
repo: extra
|
||||
provided: libpq.so
|
||||
strip_release: true
|
10
BioArchLinux/r-rpostgres/system-boost.patch
Normal file
10
BioArchLinux/r-rpostgres/system-boost.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
diff --git a/RPostgres/src/Makevars.in b/RPostgres/src/Makevars.in
|
||||
index 997f045..b606a3a 100644
|
||||
--- a/RPostgres/src/Makevars.in
|
||||
+++ b/RPostgres/src/Makevars.in
|
||||
@@ -1,4 +1,4 @@
|
||||
-PKG_CPPFLAGS=@cflags@ -Ivendor -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR @plogr@
|
||||
+PKG_CPPFLAGS=@cflags@ -DRCPP_DEFAULT_INCLUDE_CALL=false -DRCPP_USING_UTF8_ERROR_STRING -DBOOST_NO_AUTO_PTR @plogr@
|
||||
|
||||
PKG_CFLAGS=$(C_VISIBILITY)
|
||||
PKG_CXXFLAGS=$(CXX_VISIBILITY)
|
Loading…
Add table
Reference in a new issue