r-maptree: use metadata checks

The "Unlimited" license text is taken from the "Writing R
Extensions" manual[0], which states that

"The mandatory ‘License’ field in the DESCRIPTION file should
specify the license of the package in a standardized form.
[...] Individual specifications must be one of [...] The
string ‘Unlimited’, meaning that there are no restrictions on
distribution or use other than those imposed by relevant laws
(including copyright laws)."

[0] https://cran.r-project.org/doc/manuals/R-exts.html#Licensing
This commit is contained in:
Pekka Ristola 2023-12-27 12:01:39 +02:00
parent 67ccb33eea
commit 420348337e
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
5 changed files with 29 additions and 19 deletions

View file

@ -3,24 +3,30 @@
_pkgname=maptree
_pkgver=1.4-8
pkgname=r-${_pkgname,,}
pkgver=1.4.8
pkgver=${_pkgver//-/.}
pkgrel=5
pkgdesc='Mapping, pruning, and graphing tree models'
arch=('any')
url="https://cran.r-project.org/package=${_pkgname}"
license=('Unlimited')
pkgdesc="Mapping, Pruning, and Graphing Tree Models"
arch=(any)
url="https://cran.r-project.org/package=$_pkgname"
license=('LicenseRef-Unlimited')
depends=(
r
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('55cf12af55540e7d53c8a7ae4bf87e192f5dec4161b3cdf2146689e8c8b465f4')
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
"Unlimited")
md5sums=('8db023baa8f3000ff384d846cb0d4815'
'd5a357f0c20cfc67aa3d7321a7f25668')
b2sums=('98c388b5bc414d315c463c33027a88402144fb67ed93c0745793a074c2b0acdb3d9ed9234c986c56d9318f76fbfe10f8a8d7b26353d8bdf366962b7ddb472810'
'76d707bdc00cd0ba4a6f5f889db74d5857938783d7a94fd8d605a5eaf6108501bc17198366109faa7ebc52cc934fb0ef6af4a9aa217b625a8dd22ed84dab9eec')
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"
install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" Unlimited
}
# vim:set ts=2 sw=2 et:

View file

@ -0,0 +1 @@
There are no restrictions on distribution or use other than those imposed by relevant laws (including copyright laws).

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: maptree_([\d._-]+).tar.gz
source: regex
url: https://cran.r-project.org/package=maptree
- source: rpkgs
pkgname: maptree
repo: cran
md5: true
- alias: r

View file

@ -215,6 +215,7 @@ license_map = {
"Lucent Public License": "custom:LPL",
"MIT + file LICENSE": "MIT",
"Mozilla Public License 2.0": "MPL2",
"Unlimited": "LicenseRef-Unlimited",
}
def get_default_r_pkgs() -> set: