r-scanmir: fix depends, use metadata checks

This commit is contained in:
Pekka Ristola 2024-02-13 13:11:27 +02:00
parent 482166720d
commit e74b26d59c
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
3 changed files with 25 additions and 23 deletions

View file

@ -1,16 +1,15 @@
# Maintainer: Guoyi Zhang <guoyizhang at malacology dot net>
_pkgname=scanMiR
_pkgver=1.8.0
_pkgver=1.8.2
pkgname=r-${_pkgname,,}
pkgver=1.8.0
pkgrel=1
pkgdesc='scanMiR'
arch=('any')
url="https://bioconductor.org/packages/${_pkgname}"
license=('GPL')
pkgver=${_pkgver//-/.}
pkgrel=0
pkgdesc="scanMiR"
arch=(any)
url="https://bioconductor.org/packages/$_pkgname"
license=('GPL-3.0-only')
depends=(
r
r-biocparallel
r-biostrings
r-cowplot
@ -18,9 +17,9 @@ depends=(
r-genomeinfodb
r-genomicranges
r-ggplot2
r-ggseqlogo
r-iranges
r-s4vectors
r-seqlogo
r-stringi
)
optdepends=(
@ -30,14 +29,15 @@ optdepends=(
r-testthat
)
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('2b4d42e569b32bb091afde6e880833481b9be61c4260b3911329d1d4fb7ae49c')
md5sums=('7d358cc7346de7793cded5df405fa6a8')
b2sums=('751a0c13561ad5841122d0546a0600f4b09bc020fee5b37274fba3529620f562292ccee63ee391a307ff91020fc365aebabd25d7290c3a3bd6086ccd0bc0e8eb')
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

@ -10,12 +10,13 @@ repo_depends:
- r-genomeinfodb
- r-genomicranges
- r-ggplot2
- r-ggseqlogo
- r-iranges
- r-s4vectors
- r-seqlogo
- r-stringi
update_on:
- regex: scanMiR_([\d._-]+).tar.gz
source: regex
url: https://bioconductor.org/packages/scanMiR
- source: rpkgs
pkgname: scanMiR
repo: bioc
md5: true
- alias: r