mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
r-rserve: use metadata checks
This commit is contained in:
parent
74ea7f4609
commit
4ad82f4f79
4 changed files with 74 additions and 22 deletions
|
@ -1,30 +1,47 @@
|
|||
# system requirements: libR, GNU make
|
||||
# Maintainer: sukanka <su975853527@gmail.com>
|
||||
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
|
||||
# Contributor: sukanka <su975853527@gmail.com>
|
||||
|
||||
_pkgname=Rserve
|
||||
_pkgver=1.8-11
|
||||
pkgname=r-${_pkgname,,}
|
||||
pkgver=1.8.11
|
||||
pkgver=${_pkgver//-/.}
|
||||
pkgrel=2
|
||||
pkgdesc='Binary R server'
|
||||
arch=('x86_64')
|
||||
pkgdesc="Binary R server"
|
||||
arch=(x86_64)
|
||||
url="https://cran.r-project.org/package=${_pkgname}"
|
||||
license=('GPL')
|
||||
license=(GPL2)
|
||||
depends=(
|
||||
libxcrypt
|
||||
openssl
|
||||
r
|
||||
)
|
||||
optdepends=(
|
||||
"java-runtime: REngine Java client"
|
||||
r-rsclient
|
||||
)
|
||||
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
|
||||
sha256sums=('9dfb1d68493f8cee5d2e12a1bfa604404834e11809f4c908d65b9100a9af1b85')
|
||||
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
|
||||
"fix-install.patch")
|
||||
md5sums=('53182272a555f31bf37132d7b5d724f3'
|
||||
'14db30e2b5f891214adf035312aeab2a')
|
||||
sha256sums=('9dfb1d68493f8cee5d2e12a1bfa604404834e11809f4c908d65b9100a9af1b85'
|
||||
'4dcfb5a31d71ce301c3556c434bed551753db077a95e3bd51918c2d40c34259f')
|
||||
|
||||
prepare() {
|
||||
# prevent installing executables during build
|
||||
patch -Np1 -i fix-install.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
|
||||
mkdir -p build
|
||||
R CMD INSTALL "$_pkgname" -l build \
|
||||
--configure-args="--enable-ipv6 --enable-threads"
|
||||
}
|
||||
|
||||
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"
|
||||
|
||||
# symlink executables to R_HOME
|
||||
install -d "$pkgdir/usr/lib/R/bin"
|
||||
ln -s "../library/$_pkgname/libs/Rserve"{,.dbg} "$pkgdir/usr/lib/R/bin"
|
||||
}
|
||||
# vim:set ts=2 sw=2 et:
|
||||
|
|
13
BioArchLinux/r-rserve/fix-install.patch
Normal file
13
BioArchLinux/r-rserve/fix-install.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/Rserve/src/Makevars.in b/Rserve/src/Makevars.in
|
||||
index 75fa869..80a9a63 100644
|
||||
--- a/Rserve/src/Makevars.in
|
||||
+++ b/Rserve/src/Makevars.in
|
||||
@@ -14,8 +14,6 @@ server: $(SERVER_SRC) $(SERVER_H)
|
||||
$(CC) -DSTANDALONE_RSERVE -DRSERV_DEBUG -DNODAEMON -I. -Iinclude $(ALL_CPPFLAGS) $(ALL_CFLAGS) $(PKG_CPPFLAGS) $(EMBED_CPPFLAGS) $(PKG_CFLAGS) -o Rserve.dbg $(SERVER_SRC) $(LDFLAGS) $(ALL_LIBS) $(PKG_LIBS)
|
||||
|
||||
# merging to bin/Rserve works only if installed from sources, won't work for binary
|
||||
- -./mergefat Rserve "$(R_HOME)/bin/Rserve"
|
||||
- -./mergefat Rserve.dbg "$(R_HOME)/bin/Rserve.dbg"
|
||||
|
||||
client: config.h
|
||||
cp config.h client/cxx/
|
|
@ -1,12 +1,18 @@
|
|||
#!/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,
|
||||
expect_license = "GPL-2 | file LICENSE",
|
||||
expect_systemrequirements = "libR, GNU make",
|
||||
)
|
||||
|
||||
def post_build():
|
||||
git_pkgbuild_commit()
|
||||
update_aur_repo()
|
||||
|
|
|
@ -1,9 +1,25 @@
|
|||
build_prefix: extra-x86_64
|
||||
maintainers:
|
||||
- github: sukanka
|
||||
- github: pekkarr
|
||||
email: pekkarr@protonmail.com
|
||||
update_on:
|
||||
- regex: Rserve_([\d._-]+).tar.gz
|
||||
source: regex
|
||||
url: https://cran.r-project.org/package=Rserve
|
||||
- source: rpkgs
|
||||
pkgname: Rserve
|
||||
repo: cran
|
||||
md5: true
|
||||
- alias: r
|
||||
- alias: libssl
|
||||
- source: alpm
|
||||
alpm: libxcrypt
|
||||
repo: core
|
||||
provided: libcrypt.so
|
||||
strip_release: true
|
||||
- source: alpm
|
||||
alpm: openssl
|
||||
repo: core
|
||||
provided: libcrypto.so
|
||||
strip_release: true
|
||||
- source: alpm
|
||||
alpm: openssl
|
||||
repo: core
|
||||
provided: libssl.so
|
||||
strip_release: true
|
||||
|
|
Loading…
Add table
Reference in a new issue