r-rserve: use metadata checks

This commit is contained in:
Pekka Ristola 2023-10-13 14:38:23 +03:00
parent 74ea7f4609
commit 4ad82f4f79
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
4 changed files with 74 additions and 22 deletions

View file

@ -1,30 +1,47 @@
# system requirements: libR, GNU make # Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
# Maintainer: sukanka <su975853527@gmail.com> # Contributor: sukanka <su975853527@gmail.com>
_pkgname=Rserve _pkgname=Rserve
_pkgver=1.8-11 _pkgver=1.8-11
pkgname=r-${_pkgname,,} pkgname=r-${_pkgname,,}
pkgver=1.8.11 pkgver=${_pkgver//-/.}
pkgrel=2 pkgrel=2
pkgdesc='Binary R server' pkgdesc="Binary R server"
arch=('x86_64') arch=(x86_64)
url="https://cran.r-project.org/package=${_pkgname}" url="https://cran.r-project.org/package=${_pkgname}"
license=('GPL') license=(GPL2)
depends=( depends=(
libxcrypt
openssl
r r
) )
optdepends=( optdepends=(
"java-runtime: REngine Java client"
r-rsclient r-rsclient
) )
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=('9dfb1d68493f8cee5d2e12a1bfa604404834e11809f4c908d65b9100a9af1b85') "fix-install.patch")
md5sums=('53182272a555f31bf37132d7b5d724f3'
'14db30e2b5f891214adf035312aeab2a')
sha256sums=('9dfb1d68493f8cee5d2e12a1bfa604404834e11809f4c908d65b9100a9af1b85'
'4dcfb5a31d71ce301c3556c434bed551753db077a95e3bd51918c2d40c34259f')
prepare() {
# prevent installing executables during build
patch -Np1 -i fix-install.patch
}
build() { 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() { 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"
# 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:

View 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/

View file

@ -1,12 +1,18 @@
#!/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(
if line.startswith('_pkgver='): _G,
line = f'_pkgver={_G.newver}' expect_license = "GPL-2 | file LICENSE",
print(line) expect_systemrequirements = "libR, GNU make",
update_pkgver_and_pkgrel(_G.newver.replace(':', '.').replace('-', '.')) )
def post_build(): def post_build():
git_pkgbuild_commit() git_pkgbuild_commit()
update_aur_repo()

View file

@ -1,9 +1,25 @@
build_prefix: extra-x86_64 build_prefix: extra-x86_64
maintainers: maintainers:
- github: sukanka - github: pekkarr
email: pekkarr@protonmail.com
update_on: update_on:
- regex: Rserve_([\d._-]+).tar.gz - source: rpkgs
source: regex pkgname: Rserve
url: https://cran.r-project.org/package=Rserve repo: cran
md5: true
- alias: r - 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