r-isa2: use metadata checks

This commit is contained in:
Pekka Ristola 2024-03-09 16:21:14 +02:00
parent 6293732ce6
commit cc7cebf5aa
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
5 changed files with 23 additions and 22 deletions

View file

@ -3,12 +3,12 @@
_pkgname=isa2
_pkgver=0.3.6
pkgname=r-${_pkgname,,}
pkgver=0.3.6
pkgver=${_pkgver//-/.}
pkgrel=2
pkgdesc='The Iterative Signature Algorithm'
arch=('x86_64')
url="https://cran.r-project.org/package=${_pkgname}"
license=('CCPL:by-nc-sa')
pkgdesc="The Iterative Signature Algorithm"
arch=(x86_64)
url="https://cran.r-project.org/package=$_pkgname"
license=('CC-BY-NC-SA-4.0')
depends=(
r
)
@ -17,14 +17,15 @@ optdepends=(
r-igraph
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('6256da84dd9a10499f802838c2065ee6e4dcc012b07d21116496ff8aebb65c66')
md5sums=('01ce8d5c7bd43fa7fe702cbdaf6863d3')
b2sums=('d0d587629d79353c47bfeded7557d6d673eeee1993b6de2f29f1b7546b7a1b3aab1e251d192e8d7fb7165d70d8cf948a0f8d157810b0fc677eb8669ee5dc4c1d')
build() {
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
mkdir build
R CMD INSTALL -l build "$_pkgname"
}
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:

View file

@ -1,12 +1,13 @@
#!/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)
def post_build():
git_pkgbuild_commit()

View file

@ -3,7 +3,8 @@ maintainers:
- github: starsareintherose
email: kuoi@bioarchlinux.org
update_on:
- regex: isa2_([\d._-]+).tar.gz
source: regex
url: https://cran.r-project.org/package=isa2
- source: rpkgs
pkgname: isa2
repo: cran
md5: true
- alias: r

View file

@ -7,10 +7,7 @@ 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_license = "CC BY-NC-SA 4.0",
)
r_pre_build(_G)
def post_build():
git_pkgbuild_commit()

View file

@ -197,6 +197,7 @@ license_map = {
"BSD_2_clause + file LICENSE": "BSD-2-Clause",
"BSD_3_clause + file LICENSE": "BSD-3-Clause",
"BSL-1.0": "BSL-1.0",
"CC BY-NC-SA 4.0": "CC-BY-NC-SA-4.0",
"CC0": "CC0-1.0",
"CeCILL": "CECILL-2.0",
"EPL": "EPL",