aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2017-07-26 15:12:36 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2017-07-26 15:12:56 +0200
commit1ce94bc0259bc8026301433dd51c1970fb4a1810 (patch)
tree0a74f7e71330a1fe2cc4c75dfbed7688df99f9e7
parent82b7374e7272c0fa7679c5e37d74ec9da2652bff (diff)
downloadaports-1ce94bc0259bc8026301433dd51c1970fb4a1810.tar.bz2
aports-1ce94bc0259bc8026301433dd51c1970fb4a1810.tar.xz
testing/tarantool: new aport
-rw-r--r--testing/tarantool/APKBUILD54
-rw-r--r--testing/tarantool/tarantool.initd19
-rw-r--r--testing/tarantool/tarantool.pre-install6
3 files changed, 79 insertions, 0 deletions
diff --git a/testing/tarantool/APKBUILD b/testing/tarantool/APKBUILD
new file mode 100644
index 0000000000..8d931626fb
--- /dev/null
+++ b/testing/tarantool/APKBUILD
@@ -0,0 +1,54 @@
+# Contributor: Carlo Landmeter <clandmeter@gmail.com>
+# Maintainer:
+pkgname=tarantool
+pkgver=1.7.4.99
+pkgrel=0
+pkgdesc="Lua application server integrated with a database management system"
+url="https://tarantool.org"
+arch="all"
+license="BSD-2-Clause"
+pkgusers="$pkgname"
+pkggroups="$pkgname"
+install="$pkgname.pre-install"
+depends=""
+depends_dev=""
+makedepends="cmake ncurses-dev readline-dev zlib-dev yaml-dev libressl-dev
+ perl msgpuck-dev $depends_dev
+ "
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://download.tarantool.org/tarantool/1.7/src/tarantool-$pkgver.tar.gz
+ $pkgname.initd
+ $pkgname.pre-install
+ "
+builddir="$srcdir/tarantool-$pkgver"
+
+build() {
+ cd "$builddir"
+ cmake \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc \
+ -DCMAKE_INSTALL_LIBDIR=lib \
+ -DBUILD_SHARED_LIBS=True \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DENABLE_BUNDLED_LIBYAML=OFF \
+ -DENABLE_BUNDLED_MSGPUCK=OFF \
+ -DCMAKE_SKIP_RPATH=ON \
+ -DENABLE_DIST=ON \
+ -DWITH_SYSVINIT=OFF \
+ -DWITH_SYSTEMD=OFF
+ make
+}
+
+package() {
+ cd "$builddir"
+ make DESTDIR="$pkgdir" install
+ install -Dm755 "$srcdir"/tarantool.initd "$pkgdir"/etc/init.d/tarantool
+}
+
+check() {
+ "$builddir"/src/tarantool --help > /dev/null
+}
+
+sha512sums="aa62258c18495ca472996c16067dabc94044dcc2edfafd19c147b2093cc7806965e0998ec5ce79d99fd7a93def97b6ca28656de7c2a635d1d5e11f20b387773e tarantool-1.7.4.99.tar.gz
+fe463c4b6ab8708ea6ec17bb6a887677ae131a489d2ce299ce951790b7c134ff356bc1a4d4745878beec3600ec702944c2329a3f02645f8ab0a0eb24edb6215a tarantool.initd
+f0673de6267e68a6f6638286447613b7d00dc86bc6153bead1127160f07c663cbbbfd52582d739d6b07041fdcec4608098ffcbd88ad33cfe13b2d80c7f29c7c1 tarantool.pre-install"
diff --git a/testing/tarantool/tarantool.initd b/testing/tarantool/tarantool.initd
new file mode 100644
index 0000000000..18bc5c128f
--- /dev/null
+++ b/testing/tarantool/tarantool.initd
@@ -0,0 +1,19 @@
+#!/sbin/openrc-run
+
+INSTANCE=default
+[ "${RC_SVCNAME}" != "${RC_SVCNAME##*.}" ] && INSTANCE=${RC_SVCNAME##*.}
+command="/usr/bin/tarantoolctl"
+command_user="${TARANTOOL_USER:-tarantool}"
+command_args="start ${INSTANCE}"
+pidfile="/run/${INSTANCE}.pid"
+
+depend() {
+ use logger dns
+ need net
+ after firewall
+}
+
+start_pre() {
+ checkpath --owner ${TARANTOOL_USER:-tarantool}:${TARANTOOL_USER:-tarantool} \
+ --directory --mode 0775 /var/log/tarantool /var/run/tarantool
+}
diff --git a/testing/tarantool/tarantool.pre-install b/testing/tarantool/tarantool.pre-install
new file mode 100644
index 0000000000..ba1ed08258
--- /dev/null
+++ b/testing/tarantool/tarantool.pre-install
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+addgroup -S tarantool 2>/dev/null
+adduser -S -D -h /var/lib/tarantool -s /sbin/nologin -G tarantool -g tarantool tarantool 2>/dev/null
+
+exit 0