mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
r-sf: use metadata checks
This commit is contained in:
parent
c2d70ea0dc
commit
31c587677f
3 changed files with 82 additions and 32 deletions
|
@ -1,28 +1,37 @@
|
|||
# system requirements: C++11, GDAL (>= 2.0.1), GEOS (>= 3.4.0), PROJ (>=4.8.0), sqlite3
|
||||
# Maintainer: Guoyi Zhang <guoyizhang at malacology dot net>
|
||||
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
|
||||
# Contributor: Guoyi Zhang <guoyizhang at malacology dot net>
|
||||
# Contributor: peippo <christoph+aur@christophfink.com>
|
||||
|
||||
_pkgname=sf
|
||||
_pkgver=1.0-14
|
||||
pkgname=r-${_pkgname,,}
|
||||
pkgver=1.0.14
|
||||
pkgver=${_pkgver//-/.}
|
||||
pkgrel=2
|
||||
pkgdesc='Simple Features for R'
|
||||
arch=('x86_64')
|
||||
pkgdesc="Simple Features for R"
|
||||
arch=(x86_64)
|
||||
url="https://cran.r-project.org/package=${_pkgname}"
|
||||
license=('GPL')
|
||||
license=(GPL2)
|
||||
depends=(
|
||||
r
|
||||
gdal
|
||||
geos
|
||||
proj
|
||||
r-classint
|
||||
r-dbi
|
||||
r-magrittr
|
||||
r-rcpp
|
||||
r-s2
|
||||
r-units
|
||||
gcc
|
||||
gdal
|
||||
geos
|
||||
proj
|
||||
sqlite3
|
||||
)
|
||||
checkdepends=(
|
||||
postgis
|
||||
r-blob
|
||||
r-dplyr
|
||||
r-raster
|
||||
r-rpostgres
|
||||
r-rpostgresql
|
||||
r-sp
|
||||
r-testthat
|
||||
r-tidyr
|
||||
)
|
||||
optdepends=(
|
||||
r-blob
|
||||
|
@ -33,7 +42,6 @@ optdepends=(
|
|||
r-lwgeom
|
||||
r-maps
|
||||
r-mapview
|
||||
r-matrix
|
||||
r-microbenchmark
|
||||
r-odbc
|
||||
r-pbapply
|
||||
|
@ -62,14 +70,34 @@ optdepends=(
|
|||
r-wk
|
||||
)
|
||||
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
|
||||
md5sums=('b5fad47df3d9107e378420809efab869')
|
||||
sha256sums=('8b535648d537a1a95920c938e43692c1dfaac8d293ff3f506334001352c339f7')
|
||||
|
||||
build() {
|
||||
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
|
||||
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 postgis
|
||||
psql postgis -c "CREATE EXTENSION postgis;"
|
||||
createdb empty
|
||||
|
||||
R_LIBS="$srcdir/build" NOT_CRAN=true Rscript --vanilla testthat.R
|
||||
|
||||
# shut down test database
|
||||
pg_ctl stop
|
||||
}
|
||||
|
||||
package() {
|
||||
install -dm0755 "${pkgdir}/usr/lib/R/library"
|
||||
cp -a --no-preserve=ownership "${_pkgname}" "${pkgdir}/usr/lib/R/library"
|
||||
install -d "$pkgdir/usr/lib/R/library"
|
||||
cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library"
|
||||
}
|
||||
# vim:set ts=2 sw=2 et:
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
#!/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():
|
||||
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('-', '.'))
|
||||
r_pre_build(
|
||||
_G,
|
||||
expect_license = "GPL-2 | MIT + file LICENSE",
|
||||
expect_systemrequirements = "GDAL (>= 2.0.1), GEOS (>= 3.4.0), PROJ (>= 4.8.0), sqlite3",
|
||||
)
|
||||
|
||||
def post_build():
|
||||
git_pkgbuild_commit()
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
build_prefix: extra-x86_64
|
||||
maintainers:
|
||||
- github: starsareintherose
|
||||
email: kuoi@bioarchlinux.org
|
||||
- github: pekkarr
|
||||
email: pekkarr@protonmail.com
|
||||
repo_depends:
|
||||
- r-classint
|
||||
- r-dbi
|
||||
|
@ -9,13 +9,30 @@ repo_depends:
|
|||
- r-rcpp
|
||||
- r-s2
|
||||
- r-units
|
||||
repo_makedepends:
|
||||
- r-blob
|
||||
- r-dplyr
|
||||
- r-raster
|
||||
- r-rpostgres
|
||||
- r-rpostgresql
|
||||
- r-sp
|
||||
- r-testthat
|
||||
- r-tidyr
|
||||
update_on:
|
||||
- regex: sf_([\d._-]+).tar.gz
|
||||
source: regex
|
||||
url: https://cran.r-project.org/package=sf
|
||||
- source: rpkgs
|
||||
pkgname: sf
|
||||
repo: cran
|
||||
md5: true
|
||||
- alias: r
|
||||
- source: alpm
|
||||
alpm: gdal
|
||||
strip_release: true
|
||||
- source: manual
|
||||
manual: 1
|
||||
- source: alpmfiles
|
||||
pkgname: gdal
|
||||
filename: usr/lib/libgdal\.so\.([^.]+)
|
||||
repo: extra
|
||||
- source: alpmfiles
|
||||
pkgname: geos
|
||||
filename: usr/lib/libgeos_c\.so\.([^.]+)
|
||||
repo: extra
|
||||
- source: alpmfiles
|
||||
pkgname: proj
|
||||
filename: usr/lib/libproj\.so\.([^.]+)
|
||||
repo: extra
|
||||
|
|
Loading…
Add table
Reference in a new issue