From 5a0053b01685bce8cc30c5adab969b326c778cbb Mon Sep 17 00:00:00 2001 From: Pekka Ristola Date: Fri, 22 Sep 2023 14:41:25 +0300 Subject: [PATCH] r-git2r: use metadata checks --- BioArchLinux/r-git2r/PKGBUILD | 25 ++++++++++++------------- BioArchLinux/r-git2r/lilac.py | 14 +++++++++----- BioArchLinux/r-git2r/lilac.yaml | 16 +++++++++++----- 3 files changed, 32 insertions(+), 23 deletions(-) diff --git a/BioArchLinux/r-git2r/PKGBUILD b/BioArchLinux/r-git2r/PKGBUILD index 0df6f592e1..36c8c51b04 100644 --- a/BioArchLinux/r-git2r/PKGBUILD +++ b/BioArchLinux/r-git2r/PKGBUILD @@ -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: Guoyi Zhang +# Maintainer: Pekka Ristola +# Contributor: Guoyi Zhang # Contributor: Robert Greener # Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com # Contributor: Kibouo @@ -9,30 +9,29 @@ _pkgname=git2r _pkgver=0.32.0 pkgname=r-${_pkgname,,} -pkgver=0.32.0 +pkgver=${_pkgver//-/.} pkgrel=2 -pkgdesc='Provides Access to Git Repositories' -arch=('x86_64') +pkgdesc="Provides Access to Git Repositories" +arch=(x86_64) url="https://cran.r-project.org/package=${_pkgname}" -license=('GPL') +license=(GPL2) depends=( - r - openssl - openssh libgit2 + r ) optdepends=( r-getpass ) source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz") +md5sums=('65314e4103be7ba29d74582ee43d9388') sha256sums=('1b5d254c0c684a56751d26d482823d0006964eb1f55c558f365d037f5e984671') build() { - R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}" + mkdir -p build + R CMD INSTALL "$_pkgname" -l build } 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: diff --git a/BioArchLinux/r-git2r/lilac.py b/BioArchLinux/r-git2r/lilac.py index bd219c037c..23cd658b0d 100644 --- a/BioArchLinux/r-git2r/lilac.py +++ b/BioArchLinux/r-git2r/lilac.py @@ -1,12 +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(): - 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_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.", + ) def post_build(): git_pkgbuild_commit() diff --git a/BioArchLinux/r-git2r/lilac.yaml b/BioArchLinux/r-git2r/lilac.yaml index e0001afecc..b882695f32 100644 --- a/BioArchLinux/r-git2r/lilac.yaml +++ b/BioArchLinux/r-git2r/lilac.yaml @@ -1,9 +1,15 @@ build_prefix: extra-x86_64 maintainers: -- github: starsareintherose - email: kuoi@bioarchlinux.org +- github: pekkarr + email: pekkarr@protonmail.com update_on: -- regex: git2r_([\d._-]+).tar.gz - source: regex - url: https://cran.r-project.org/package=git2r +- source: rpkgs + pkgname: git2r + repo: cran + md5: true - alias: r +- source: alpm + alpm: libgit2 + repo: extra + provided: libgit2.so + strip_release: true