mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
r-nmi: use metadata checks
This commit is contained in:
parent
d8bf5f6d19
commit
c9a7ef823c
5 changed files with 23 additions and 22 deletions
|
@ -7,10 +7,7 @@ sys.path.append(os.path.normpath(f'{__file__}/../../../lilac-extensions'))
|
||||||
from lilac_r_utils import r_pre_build
|
from lilac_r_utils import r_pre_build
|
||||||
|
|
||||||
def pre_build():
|
def pre_build():
|
||||||
r_pre_build(
|
r_pre_build(_G)
|
||||||
_G,
|
|
||||||
expect_license = "GNU General Public License version 2",
|
|
||||||
)
|
|
||||||
|
|
||||||
def post_build():
|
def post_build():
|
||||||
git_pkgbuild_commit()
|
git_pkgbuild_commit()
|
||||||
|
|
|
@ -3,24 +3,25 @@
|
||||||
_pkgname=NMI
|
_pkgname=NMI
|
||||||
_pkgver=2.0
|
_pkgver=2.0
|
||||||
pkgname=r-${_pkgname,,}
|
pkgname=r-${_pkgname,,}
|
||||||
pkgver=2.0
|
pkgver=${_pkgver//-/.}
|
||||||
pkgrel=6
|
pkgrel=6
|
||||||
pkgdesc='Normalized Mutual Information of Community Structure in Network'
|
pkgdesc="Normalized Mutual Information of Community Structure in Network"
|
||||||
arch=('any')
|
arch=(any)
|
||||||
url="https://cran.r-project.org/package=${_pkgname}"
|
url="https://cran.r-project.org/package=$_pkgname"
|
||||||
license=('GPL')
|
license=('GPL-2.0-only')
|
||||||
depends=(
|
depends=(
|
||||||
r
|
r
|
||||||
)
|
)
|
||||||
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
|
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
|
||||||
sha256sums=('c39fd733944601dd314dc37a4b0332d374236aa2bb21f263833f79989387b7e7')
|
md5sums=('4c7ff8b6dc4834b2cfbe0b8cc9b5d88a')
|
||||||
|
b2sums=('828166b2e3d94f5238e9c20bef3cada33d7b48ac2c23e39ead02066c48d6cc1e8d119f39c311162a02c39257ecd47a15a28af65a6e46e61c3220250d7745cd99')
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
|
mkdir build
|
||||||
|
R CMD INSTALL -l build "$_pkgname"
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
install -dm0755 "${pkgdir}/usr/lib/R/library"
|
install -d "$pkgdir/usr/lib/R/library"
|
||||||
cp -a --no-preserve=ownership "${_pkgname}" "${pkgdir}/usr/lib/R/library"
|
cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library"
|
||||||
}
|
}
|
||||||
# vim:set ts=2 sw=2 et:
|
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
from lilaclib import *
|
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():
|
def pre_build():
|
||||||
for line in edit_file('PKGBUILD'):
|
r_pre_build(_G)
|
||||||
if line.startswith('_pkgver='):
|
|
||||||
line = f'_pkgver={_G.newver}'
|
|
||||||
print(line)
|
|
||||||
update_pkgver_and_pkgrel(_G.newver.replace(':', '.').replace('-', '.'))
|
|
||||||
|
|
||||||
def post_build():
|
def post_build():
|
||||||
git_pkgbuild_commit()
|
git_pkgbuild_commit()
|
||||||
|
|
|
@ -3,7 +3,8 @@ maintainers:
|
||||||
- github: starsareintherose
|
- github: starsareintherose
|
||||||
email: kuoi@bioarchlinux.org
|
email: kuoi@bioarchlinux.org
|
||||||
update_on:
|
update_on:
|
||||||
- regex: NMI_([\d._-]+).tar.gz
|
- source: rpkgs
|
||||||
source: regex
|
pkgname: NMI
|
||||||
url: https://cran.r-project.org/package=NMI
|
repo: cran
|
||||||
|
md5: true
|
||||||
- alias: r
|
- alias: r
|
||||||
|
|
|
@ -201,6 +201,7 @@ license_map = {
|
||||||
"CC0": "CC0-1.0",
|
"CC0": "CC0-1.0",
|
||||||
"CeCILL": "CECILL-2.0",
|
"CeCILL": "CECILL-2.0",
|
||||||
"EPL": "EPL",
|
"EPL": "EPL",
|
||||||
|
"GNU General Public License version 2": "GPL-2.0-only",
|
||||||
"GPL": "GPL-2.0-or-later",
|
"GPL": "GPL-2.0-or-later",
|
||||||
"GPL (>= 2)": "GPL-2.0-or-later",
|
"GPL (>= 2)": "GPL-2.0-or-later",
|
||||||
"GPL (>= 2.0)": "GPL-2.0-or-later",
|
"GPL (>= 2.0)": "GPL-2.0-or-later",
|
||||||
|
|
Loading…
Add table
Reference in a new issue