summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authora8212020-11-03 10:47:25 +0100
committera8212021-04-25 11:02:04 +0200
commitdfd5ff515af9df0ec6bd7a71d1f03714dc7270fc (patch)
treed32d1e51a94f4c119e74ca633b6dadffa393014c
parentdf1af6af3be27771a1a57d67a558680c700cf547 (diff)
downloadaur-dfd5ff515af9df0ec6bd7a71d1f03714dc7270fc.tar.gz
Takeover and update PKGBUILD
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD117
-rw-r--r--accounts.install20
-rw-r--r--shiny-server.service3
-rw-r--r--shiny-server.sysusers1
-rw-r--r--shiny-server.tmpfiles3
6 files changed, 82 insertions, 89 deletions
diff --git a/.SRCINFO b/.SRCINFO
index e3a440612d6..7ac2944d10e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,24 +1,29 @@
pkgbase = shiny-server-git
- pkgdesc = Open-source version of the shiny web development framework server
- pkgver = 1.5.6.875.r37.g66e45ab
+ pkgdesc = Host Shiny applications over the web
+ pkgver = 1.5.16.958.r3.g224af58
pkgrel = 1
epoch = 1
- url = http://www.rstudio.com/shiny/server/install-opensource
- install = accounts.install
- arch = i686
+ url = https://rstudio.com/shiny/server
arch = x86_64
- license = AGPL
+ license = AGPL3
makedepends = git
- makedepends = python2
makedepends = cmake
- makedepends = r
+ makedepends = wget
+ makedepends = python
depends = r
- depends = wget
+ optdepends = r-shiny: build interactive web apps with R
+ optdepends = r-rmarkdown: convert R markdown docs to various formats
+ provides = shiny-server
+ conflicts = shiny-server
backup = etc/shiny-server/shiny-server.conf
- source = shiny-server::git+https://github.com/rstudio/shiny-server.git
+ source = git+https://github.com/rstudio/shiny-server
source = shiny-server.service
+ source = shiny-server.sysusers
+ source = shiny-server.tmpfiles
sha256sums = SKIP
- sha256sums = 8486c5e5d2c8362daf2c6826ea702e3f49dd6ee64c30ca79bdf2f4edbe0d2744
+ sha256sums = 1dc3401a3d87ef27ae026dc45bc374c2763b2819384ef8f326b4b7a12201ef42
+ sha256sums = e56bfe2b7bf85fdc72d1080ab2d08a54c52928a0dc25cdbeff1302981aa18e30
+ sha256sums = 27538c6961fdb70f168be6d7c5754c474dd221dff0dcf639181d5803d6646a54
pkgname = shiny-server-git
diff --git a/PKGBUILD b/PKGBUILD
index b71353b5e2a..8144953a688 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,68 +1,71 @@
-# Maintainer: Stephen Martin <stephensrmmartin at gmail dot com>
+# Maintainer: a821
+# Contributor: Stephen Martin <stephensrmmartin at gmail dot com>
+
pkgname=shiny-server-git
-pkgver=1.5.6.875.r37.g66e45ab
+_pkgname=${pkgname%-git}
+pkgver=1.5.16.958.r3.g224af58
pkgrel=1
epoch=1
-pkgdesc="Open-source version of the shiny web development framework server"
-arch=('i686' 'x86_64')
-url="http://www.rstudio.com/shiny/server/install-opensource"
-license=('AGPL')
-depends=('r' 'wget')
-makedepends=('git' 'python2' 'cmake' 'r')
+pkgdesc="Host Shiny applications over the web"
+arch=('x86_64')
+url="https://rstudio.com/shiny/server"
+license=('AGPL3')
+provides=("${_pkgname}")
+conflicts=("${_pkgname}")
+depends=('r')
+makedepends=('git' 'cmake' 'wget' 'python')
+optdepends=(
+ 'r-shiny: build interactive web apps with R' # AUR
+ 'r-rmarkdown: convert R markdown docs to various formats' # AUR
+)
+source=("git+https://github.com/rstudio/shiny-server"
+ "${_pkgname}.service"
+ "${_pkgname}.sysusers"
+ "${_pkgname}.tmpfiles")
+sha256sums=("SKIP"
+ "1dc3401a3d87ef27ae026dc45bc374c2763b2819384ef8f326b4b7a12201ef42"
+ "e56bfe2b7bf85fdc72d1080ab2d08a54c52928a0dc25cdbeff1302981aa18e30"
+ "27538c6961fdb70f168be6d7c5754c474dd221dff0dcf639181d5803d6646a54")
backup=('etc/shiny-server/shiny-server.conf')
-install='accounts.install'
-source=('shiny-server::git+https://github.com/rstudio/shiny-server.git'
- 'shiny-server.service')
-sha256sums=('SKIP'
- '8486c5e5d2c8362daf2c6826ea702e3f49dd6ee64c30ca79bdf2f4edbe0d2744')
-_gitroot=https://github.com/rstudio/shiny-server.git
-_gitname=shiny-server
-pkgver(){
- cd "$srcdir/$_gitname"
- git describe --tags --long | sed -E 's/v//;s/([^-]*-g)/r\1/;s/-/./g'
+pkgver() {
+ cd "${_pkgname}"
+ git describe --long --tags | sed -e 's/^v//;s/-/.r/;s/-/./'
+}
+
+prepare() {
+ cd "${_pkgname}"
+ mkdir -p build tmp
}
-
-prepare(){
- # Vigorously force the use of python2
- cd $srcdir
- find -type f -exec sed \
- -e 's_^#!/usr/bin/env python$_&2_' \
- -e 's_^\(#!/usr/bin/python2\).[45]$_\1_' \
- -e 's_^#!/usr/bin/python$_&2_' \
- -e "s_'python'_'python2'_" -i {} \;
- }
build() {
- cd "$srcdir/$_gitname"
- mkdir tmp
- cd tmp
- # More python2 hackery
- PATH=$PWD/../bin/:$PATH
- ln -s `which python2` ../bin/python
- export _PYTHON=`which python2`
- export PYTHON=`which python2`
-
- # Node fails with gcc7
- #export CC=/bin/gcc-6
- #export CXX=/bin/g++-6
-
- # CMake
- cmake -DCMAKE_INSTALL_PREFIX=/usr -DPYTHON="$_PYTHON" ../
- make
-
- mkdir ../build
- (cd .. && external/node/install-node.sh)
- (cd .. && bin/npm --python="$PYTHON" install)
- (cd .. && bin/node ext/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js --python="$PYTHON" rebuild)
+ cd "${_pkgname}"/tmp
+
+ # install and download bundled Node.js
+ ../external/node/install-node.sh
+
+ # add bin PATH to reference node
+ PATH="${srcdir}/${_pkgname}/bin":$PATH
+
+ cmake -DCMAKE_INSTALL_PREFIX=/usr/share ..
+ make
+ cd ..
+ ./bin/npm install
+ ./bin/node ./ext/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js rebuild
}
-
+
package() {
- cd "$srcdir/$_gitname/tmp"
- make DESTDIR="$pkgdir/" install
- mkdir -p $pkgdir/usr/bin/
- mkdir -p $pkgdir/etc/shiny-server/
- ln -s /usr/shiny-server/bin/shiny-server $pkgdir/usr/bin/shiny-server
- install -m 644 -D $srcdir/shiny-server.service $pkgdir/usr/lib/systemd/system/shiny-server.service
- install -m 644 -D $srcdir/$_gitname/config/default.config $pkgdir/etc/shiny-server/shiny-server.conf
+ cd "${_pkgname}"/tmp
+ make DESTDIR="${pkgdir}" install
+ install -Dm644 ../config/default.config "${pkgdir}/etc/shiny-server/shiny-server.conf"
+
+ cd ../..
+ install -Dm644 ${_pkgname}.service -t "${pkgdir}/usr/lib/systemd/system"
+ install -Dm644 ${_pkgname}.sysusers "${pkgdir}/usr/lib/sysusers.d/${_pkgname}.conf"
+ install -Dm644 ${_pkgname}.tmpfiles "${pkgdir}/usr/lib/tmpfiles.d/${_pkgname}.conf"
+
+ install -dm755 "${pkgdir}/usr/bin"
+ ln -s /usr/share/shiny-server/bin/shiny-server "${pkgdir}/usr/bin/shiny-server"
}
+
+# vim: set ts=4 sw=4 et:
diff --git a/accounts.install b/accounts.install
deleted file mode 100644
index ca4fac2f12d..00000000000
--- a/accounts.install
+++ /dev/null
@@ -1,20 +0,0 @@
-post_install() {
- # do something here
- getent group "shiny" &>/dev/null || groupadd -r shiny 1>/dev/null
- getent passwd "shiny" &>/dev/null || useradd -r -g shiny -m -d "/srv/shiny-server" -s "/bin/sh" shiny 1>/dev/null
- mkdir -p /var/log/shiny-server
- mkdir -p /var/lib/shiny-server
- chown shiny:shiny /srv/shiny-server
- chown shiny:shiny /var/log/shiny-server
- chown shiny:shiny /var/lib/shiny-server
-}
-
-post_remove() {
- # do something here
- if getent passwd "shiny" >/dev/null; then
- userdel shiny >/dev/null
- fi
- if getent group "shiny" >/dev/null; then
- groupdel shiny >/dev/null
- fi
-}
diff --git a/shiny-server.service b/shiny-server.service
index 615173e57de..5bedfdff7f2 100644
--- a/shiny-server.service
+++ b/shiny-server.service
@@ -1,8 +1,9 @@
[Unit]
Description=Shiny Server
-After=syslog.target network.target
+After=network.target
[Service]
+Type=simple
User=shiny
ExecStart=/usr/bin/shiny-server
diff --git a/shiny-server.sysusers b/shiny-server.sysusers
new file mode 100644
index 00000000000..2015810afb8
--- /dev/null
+++ b/shiny-server.sysusers
@@ -0,0 +1 @@
+u shiny - "shiny server user" /var/lib/shiny-server /bin/bash
diff --git a/shiny-server.tmpfiles b/shiny-server.tmpfiles
new file mode 100644
index 00000000000..2661bb391b5
--- /dev/null
+++ b/shiny-server.tmpfiles
@@ -0,0 +1,3 @@
+d /var/lib/shiny-server 755 shiny shiny
+d /var/log/shiny-server 755 shiny shiny
+d /srv/shiny-server 755 - -