Add and document R-cran build style; support CRAN in update-check.
This commit is contained in:
parent
9a5b3d447e
commit
f2c0f7885e
|
@ -673,6 +673,13 @@ depend on additional packages. This build style does not install
|
|||
dependencies to the root directory, and only checks if a binary package is
|
||||
available in repositories.
|
||||
|
||||
- `R-cran` For packages that are available on The Comprehensive R Archive
|
||||
Network (CRAN). The build style requires the `pkgname` to start with
|
||||
`R-cran-` and any dashes (`-`) in the CRAN-given version to be replaced
|
||||
with the character `r` in the `version` variable. The `distfiles`
|
||||
location will automatically be set as well as the package made to depend
|
||||
on `R`.
|
||||
|
||||
- `ruby-module` For packages that are ruby modules and are installable via `ruby install.rb`.
|
||||
Additional install arguments can be specified via `make_install_args`.
|
||||
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
#
|
||||
# This helper is for templates using R-cran.
|
||||
#
|
||||
do_install() {
|
||||
mkdir -p ${DESTDIR}/usr/lib/R/library
|
||||
( cd .. && R CMD INSTALL -l ${DESTDIR}/usr/lib/R/library ${pkgname#R-cran-} )
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
makedepends+=" R"
|
||||
depends+=" R"
|
||||
distfiles="https://cran.r-project.org/src/contrib/${pkgname#R-cran-}_${version//r/-}.tar.gz"
|
||||
wrksrc="${XBPS_BUILDDIR}/${pkgname#R-cran-}"
|
|
@ -57,6 +57,8 @@ update_check() {
|
|||
url="http://ftp.gnome.org/pub/GNOME/sources/$pkgname/cache.json";;
|
||||
*kernel.org/pub/linux/kernel/*)
|
||||
rx=linux-'\K'${version%.*}'[\d.]+(?=\.tar\.xz)';;
|
||||
*cran.r-project.org/src/contrib*)
|
||||
rx='\b\Q'"${pkgname#R-cran-}"'\E_\K\d+(\.\d+)*(-\d+)?(?=\.tar)';;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue