r-git2r: use metadata checks

This commit is contained in:
Pekka Ristola 2023-09-22 14:41:25 +03:00
parent 9cc0fbe123
commit 5a0053b016
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
3 changed files with 32 additions and 23 deletions

View file

@ -1,5 +1,5 @@
# system requirements: By default, git2r uses a system installation of thelibgit2 headers and library. However, if a system installationis not available, builds and uses a bundled version of thelibgit2 source. zlib headers and library. OpenSSL headers andlibrary (non-macOS). LibSSH2 (optional on non-Windows) toenable the SSH transport. # Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
# Maintainer: Guoyi Zhang <guoyizhang at malacology dot net> # Contributor: Guoyi Zhang <guoyizhang at malacology dot net>
# Contributor: Robert Greener <me@r0bert.dev> # Contributor: Robert Greener <me@r0bert.dev>
# Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com # Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com
# Contributor: Kibouo <csonka.mihaly@hotmail.com> # Contributor: Kibouo <csonka.mihaly@hotmail.com>
@ -9,30 +9,29 @@
_pkgname=git2r _pkgname=git2r
_pkgver=0.32.0 _pkgver=0.32.0
pkgname=r-${_pkgname,,} pkgname=r-${_pkgname,,}
pkgver=0.32.0 pkgver=${_pkgver//-/.}
pkgrel=2 pkgrel=2
pkgdesc='Provides Access to Git Repositories' pkgdesc="Provides Access to Git Repositories"
arch=('x86_64') arch=(x86_64)
url="https://cran.r-project.org/package=${_pkgname}" url="https://cran.r-project.org/package=${_pkgname}"
license=('GPL') license=(GPL2)
depends=( depends=(
r
openssl
openssh
libgit2 libgit2
r
) )
optdepends=( optdepends=(
r-getpass r-getpass
) )
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz") source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
md5sums=('65314e4103be7ba29d74582ee43d9388')
sha256sums=('1b5d254c0c684a56751d26d482823d0006964eb1f55c558f365d037f5e984671') sha256sums=('1b5d254c0c684a56751d26d482823d0006964eb1f55c558f365d037f5e984671')
build() { build() {
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}" mkdir -p build
R CMD INSTALL "$_pkgname" -l build
} }
package() { package() {
install -dm0755 "${pkgdir}/usr/lib/R/library" install -d "$pkgdir/usr/lib/R/library"
cp -a --no-preserve=ownership "${_pkgname}" "${pkgdir}/usr/lib/R/library" cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library"
} }
# vim:set ts=2 sw=2 et:

View file

@ -1,12 +1,16 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from lilaclib import * 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(): def pre_build():
for line in edit_file('PKGBUILD'): r_pre_build(
if line.startswith('_pkgver='): _G,
line = f'_pkgver={_G.newver}' expect_systemrequirements = "By default, git2r uses a system installation of the libgit2 headers and library. However, if a system installation is not available, builds and uses a bundled version of the libgit2 source. zlib headers and library. OpenSSL headers and library (non-macOS). LibSSH2 (optional on non-Windows) to enable the SSH transport.",
print(line) )
update_pkgver_and_pkgrel(_G.newver.replace(':', '.').replace('-', '.'))
def post_build(): def post_build():
git_pkgbuild_commit() git_pkgbuild_commit()

View file

@ -1,9 +1,15 @@
build_prefix: extra-x86_64 build_prefix: extra-x86_64
maintainers: maintainers:
- github: starsareintherose - github: pekkarr
email: kuoi@bioarchlinux.org email: pekkarr@protonmail.com
update_on: update_on:
- regex: git2r_([\d._-]+).tar.gz - source: rpkgs
source: regex pkgname: git2r
url: https://cran.r-project.org/package=git2r repo: cran
md5: true
- alias: r - alias: r
- source: alpm
alpm: libgit2
repo: extra
provided: libgit2.so
strip_release: true