r-isomirs: use metadata checks

This commit is contained in:
Pekka Ristola 2024-04-15 19:32:25 +03:00
parent 897891a952
commit fb42f0cf1a
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
3 changed files with 23 additions and 19 deletions

View file

@ -3,14 +3,13 @@
_pkgname=isomiRs
_pkgver=1.30.0
pkgname=r-${_pkgname,,}
pkgver=1.30.0
pkgver=${_pkgver//-/.}
pkgrel=1
pkgdesc='Analyze isomiRs and miRNAs from small RNA-seq'
arch=('any')
url="https://bioconductor.org/packages/${_pkgname}"
pkgdesc="Analyze isomiRs and miRNAs from small RNA-seq"
arch=(any)
url="https://bioconductor.org/packages/$_pkgname"
license=('MIT')
depends=(
r
r-annotationdbi
r-assertive.sets
r-biobase
@ -48,15 +47,18 @@ optdepends=(
r-testthat
)
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('88483aa9d9509faac83a0365993bcc9c38b4df4861bdb4ed1818d80cea51e2d4')
md5sums=('95b301f966153c00b98359bb6a0986cd')
b2sums=('f41937f7ca7df0495856663c132d850e2544c97df04f2e31009e2bddc078abf34f50f90e49876a39a2da8a1247f88ec3ab1b27d6dc1db70f1a15a2a18d1583c9')
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

@ -30,7 +30,8 @@ repo_depends:
- r-tibble
- r-tidyr
update_on:
- regex: isomiRs_([\d._-]+).tar.gz
source: regex
url: https://bioconductor.org/packages/isomiRs
- source: rpkgs
pkgname: isomiRs
repo: bioc
md5: true
- alias: r