summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPekka Ristola2023-10-07 16:24:58 +0300
committerPekka Ristola2023-10-07 16:24:58 +0300
commit95ec8bead28da3d7c6a99862cdf042035fdf130f (patch)
tree177f2570d6f1c7474e3df3b7b5d1b3b53950f709
downloadaur-95ec8bead28da3d7c6a99862cdf042035fdf130f.tar.gz
Version 0.5.5
-rw-r--r--.SRCINFO22
-rw-r--r--PKGBUILD58
-rw-r--r--fix-dbus.patch22
3 files changed, 102 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2ca69b0764c5
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,22 @@
+pkgbase = r-bspm
+ pkgdesc = Bridge to System Package Manager
+ pkgver = 0.5.5
+ pkgrel = 1
+ url = https://cran.r-project.org/package=bspm
+ arch = any
+ license = MIT
+ checkdepends = r-tinytest
+ depends = gobject-introspection-runtime
+ depends = pyalpm
+ depends = python-dbus
+ depends = python-gobject
+ depends = r
+ optdepends = r-tinytest
+ source = https://cran.r-project.org/src/contrib/bspm_0.5.5.tar.gz
+ source = fix-dbus.patch
+ md5sums = 86d4bc20c4b90d6d61873e554e0a20f4
+ md5sums = 36f5173c5c892c7c525ff320f99952ab
+ sha256sums = d49d91ec3e0caaf698596a17ce391dafc146b9cfa0f8ce5183b1ef41d142a61d
+ sha256sums = 7a80496e502ddab4f4682e791b626b0a2ccb405ee2c138a0932cd112b86987c0
+
+pkgname = r-bspm
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..c029703c8dbe
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,58 @@
+# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
+# Contributor: sukanka <su975853527@gmail.com>
+
+_pkgname=bspm
+_pkgver=0.5.5
+pkgname=r-${_pkgname,,}
+pkgver=${_pkgver//-/.}
+pkgrel=1
+pkgdesc="Bridge to System Package Manager"
+arch=(any)
+url="https://cran.r-project.org/package=${_pkgname}"
+license=(MIT)
+depends=(
+ gobject-introspection-runtime
+ pyalpm
+ python-dbus
+ python-gobject
+ r
+)
+checkdepends=(
+ r-tinytest
+)
+optdepends=(
+ r-tinytest
+)
+source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
+ "fix-dbus.patch")
+md5sums=('86d4bc20c4b90d6d61873e554e0a20f4'
+ '36f5173c5c892c7c525ff320f99952ab')
+sha256sums=('d49d91ec3e0caaf698596a17ce391dafc146b9cfa0f8ce5183b1ef41d142a61d'
+ '7a80496e502ddab4f4682e791b626b0a2ccb405ee2c138a0932cd112b86987c0')
+
+prepare() {
+ # fix dbus configuration
+ patch -Np1 -i fix-dbus.patch
+}
+
+build() {
+ mkdir -p build dbus
+ R CMD INSTALL "$_pkgname" -l build \
+ --configure-vars="BUILD_ROOT=$srcdir/dbus"
+}
+
+check() {
+ cd "$_pkgname/tests"
+ R_LIBS="$srcdir/build" Rscript --vanilla tinytest.R
+}
+
+package() {
+ # install dbus config
+ cp -r dbus/usr "$pkgdir"
+
+ install -d "$pkgdir/usr/lib/R/library"
+ cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library"
+
+ install -d "$pkgdir/usr/share/licenses/$pkgname"
+ ln -s "/usr/lib/R/library/$_pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"
+}
diff --git a/fix-dbus.patch b/fix-dbus.patch
new file mode 100644
index 000000000000..e4f8fa9ba378
--- /dev/null
+++ b/fix-dbus.patch
@@ -0,0 +1,22 @@
+diff --git a/bspm/configure b/bspm/configure
+index 6077606..fa9f109 100755
+--- a/bspm/configure
++++ b/bspm/configure
+@@ -7,7 +7,7 @@ subst() {
+ DIR=`pwd`
+ cd $1 && cat $2 |
+ sed "s @BUS_NAME@ $BUS_NAME g" |
+- sed "s @R_LIBRARY_DIR@ ${R_LIBRARY_DIR#"$BUILD_ROOT"} g" > $3
++ sed "s @R_LIBRARY_DIR@ /usr/lib/R/library g" > $3
+ cd $DIR
+ }
+
+@@ -20,7 +20,7 @@ fi
+
+ if [ "$1" != "--without-dbus-service" ]; then
+ SERVICE_DIR="$BUILD_ROOT/usr/share/dbus-1/system-services"
+- SYSCONF_DIR="$BUILD_ROOT/etc/dbus-1/system.d"
++ SYSCONF_DIR="$BUILD_ROOT/usr/share/dbus-1/system.d"
+ mkdir -p $SERVICE_DIR $SYSCONF_DIR
+ if [ ! -w "$SERVICE_DIR" ] || [ ! -w "$SYSCONF_DIR" ]; then
+ echo "* NOT installing D-Bus service"