summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorStephen Martin2015-06-08 10:58:51 -0500
committerStephen Martin2015-06-08 10:58:51 -0500
commite931aa5334f0c5ae444af76aa9eebbc452038c18 (patch)
tree446eee5f31d0190bee3a04b7c1c6e1bd8914d784 /PKGBUILD
downloadaur-e931aa5334f0c5ae444af76aa9eebbc452038c18.tar.gz
Updated to aur4
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD60
1 files changed, 60 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..882a521f4e8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,60 @@
+# Maintainer: Stephen Martin <stephensrmmartin at gmail dot com>
+pkgname=shiny-server-git
+pkgver=20150608
+pkgrel=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')
+makedepends=('git' 'python2' 'cmake' 'r')
+install='accounts.install'
+backup='shiny-server.conf'
+source=('shiny-server::git+https://github.com/rstudio/shiny-server.git'
+ 'shiny-server.service')
+pkver(){
+ cd "$srcdir/$pkgname"
+ git describe --long|sed -E 's/([^-]*-g)/r\1/;s/-/./g'
+}
+
+_gitroot=https://github.com/rstudio/shiny-server.git
+_gitname=shiny-server
+prepare(){
+ 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
+ DIR=`pwd`
+ PATH=$DIR/../bin/:$PATH
+ ln -s `which python2` ../bin/python
+ export _PYTHON=`which python2`
+
+ export PYTHON=`which python2`
+ cmake -DCMAKE_INSTALL_PREFIX=/usr -DPYTHON="$_PYTHON" ../
+ make
+
+ mkdir ../build
+ (cd .. && bin/npm --python="$PYTHON" rebuild)
+ (cd .. && ext/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js --python="$PYTHON" rebuild)
+}
+
+package() {
+ cd "$srcdir/$_gitname/tmp"
+ make DESTDIR="$pkgdir/" install
+ mkdir -p $pkgdir/usr/bin/
+ 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
+}
+
+# vim:set ts=2 sw=2 et:
+md5sums=('SKIP'
+ '78811ea3ebc75bf875e13e202e4587ae')