summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorFranco Masotti2017-02-17 12:16:22 +0100
committerFranco Masotti2017-02-17 12:16:22 +0100
commitd0e694896039fc52ecc3ebaa5e026e497d15517d (patch)
tree47ffb87b1fec0a0b5a533dc5dd28a6dae26eabac /PKGBUILD
downloadaur-d0e694896039fc52ecc3ebaa5e026e497d15517d.tar.gz
Added files.
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD37
1 files changed, 37 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..53e9ba909fc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,37 @@
+# Maintainer: Franco Masotti <franco dot masotti at student dot unife dot it>
+# Contributor: Franco Masotti <franco dot masotti at student dot unife dot it>
+pkgname=rserve-sandbox-docker-bin
+pkgver=r6.fb0ec65
+pkgrel=1
+pkgdesc="Pre-compiled version of a Docker spec for running Rserve in a sandbox"
+arch=('x86_64')
+url="https://gitlab.com/frnmst/rserve-sandbox-bin"
+license=('BSD')
+depends=('r'
+ 'docker')
+makedepends=('git'
+ 'sed')
+conflicts=('rserve-sandbox-docker')
+install=.install
+source=('git+https://gitlab.com/frnmst/rserve-sandbox-bin#branch=distro-package')
+md5sums=('SKIP')
+
+pkgver () {
+ cd "${srcdir}"/rserve-sandbox-bin
+ ( set -o pipefail
+ git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' ||
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+ )
+}
+
+package() {
+ cd "${srcdir}"
+ install -d "${pkgdir}"/usr/share/"${pkgname%-bin}"
+ install -d "${pkgdir}"/usr/bin
+ install -D -m644 rserve-sandbox-bin/Makefile "${pkgdir}"/usr/share/"${pkgname%-bin}"/Makefile
+ install -D -m644 rserve-sandbox-bin/LICENSE "${pkgdir}"/usr/share/licenses/${pkgname%-bin}/LICENSE
+ install -D -m644 rserve-sandbox-bin/rserve.tar "${pkgdir}"/usr/share/${pkgname%-bin}/rserve.tar
+ install -D -m755 ../run.sh "${pkgdir}"/usr/share/${pkgname%-bin}/run.sh
+ install -D -m644 ../${pkgname%-bin}.service "${pkgdir}"/usr/lib/systemd/system/"${pkgname%-bin}".service
+ ln -s /usr/share/"${pkgname%-bin}"/run.sh "${pkgdir}"/usr/bin/"${pkgname%-bin}"
+}