r-clisymbols: use metadata checks

This commit is contained in:
Pekka Ristola 2023-12-24 13:24:11 +02:00
parent 57d07ead9a
commit 0bd5f5bac9
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
3 changed files with 24 additions and 19 deletions

View file

@ -4,12 +4,12 @@
_pkgname=clisymbols
_pkgver=1.2.0
pkgname=r-${_pkgname,,}
pkgver=1.2.0
pkgver=${_pkgver//-/.}
pkgrel=10
pkgdesc='Unicode Symbols at the R Prompt'
arch=('any')
url="https://cran.r-project.org/package=${_pkgname}"
license=('MIT')
pkgdesc="Unicode Symbols at the R Prompt"
arch=(any)
url="https://cran.r-project.org/package=$_pkgname"
license=(MIT)
depends=(
r
)
@ -17,15 +17,18 @@ optdepends=(
r-testthat
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('0649f2ce39541820daee3ed408d765eddf83db5db639b493561f4e5fbf88efe0')
md5sums=('15c0124e37789c5ec74e556eb866ff5c')
b2sums=('d1ab07eb1e4806a9a4b530bc49ee15386b18f69e641bda9c67baab54abf7e5347e7117c1f87af3687309884cd132b6af902cf5bb612b571265fe401ba8d40d8c')
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 -Dm644 "${_pkgname}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
install -d "$pkgdir/usr/lib/R/library"
cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library"
install -d "$pkgdir/usr/share/licenses/$pkgname"
ln -s "/usr/lib/R/library/$_pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"
}
# 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: clisymbols_([\d._-]+).tar.gz
source: regex
url: https://cran.r-project.org/package=clisymbols
- source: rpkgs
pkgname: clisymbols
repo: cran
md5: true
- alias: r