diff options
author | wozy | 2016-10-01 16:09:36 -0400 |
---|---|---|
committer | wozy | 2016-10-01 16:09:36 -0400 |
commit | 1c10517dfbabff39f57934016dbf4925ab113690 (patch) | |
tree | 5241f23bc49f644cdf04bdba1885c18bbd0bfceb | |
download | aur-1c10517dfbabff39f57934016dbf4925ab113690.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 23 | ||||
-rw-r--r-- | PKGBUILD | 64 | ||||
-rw-r--r-- | riakts.install | 21 | ||||
-rw-r--r-- | riakts.service | 12 |
4 files changed, 120 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..ad536b595b8e --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,23 @@ +pkgbase = riakts + pkgdesc = Distributed NoSQL key/value store optimized for time series data + pkgver = 1.4.0 + pkgrel = 1 + url = http://docs.basho.com/riak/ts/1.4.0/downloads/ + install = riakts.install + arch = i686 + arch = x86_64 + license = APACHE + makedepends = erlang-basho + makedepends = java-environment + optdepends = jdk7-openjdk + conflicts = tsung, + conflicts = riak + options = !makeflags + backup = opt/riakts/etc/riak.conf + source = http://s3.amazonaws.com/downloads.basho.com/riak_ts/1.4/1.4.0/riak_ts-1.4.0.tar.gz + source = riakts.service + md5sums = d8ae0af59c8aa05d50babcf8d3089d70 + md5sums = 370ce648bfed4ac00db20178f7a6735b + +pkgname = riakts + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..5bc04cc19d2a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,64 @@ +# Maintainer: Jan Wozniak <wozniak.jan@gmail.com> + +pkgname=riakts +pkgver=1.4.0 +pkgrel=1 +pkgdesc='Distributed NoSQL key/value store optimized for time series data' +arch=('i686' 'x86_64') +license=('APACHE') +url=http://docs.basho.com/riak/ts/1.4.0/downloads/ +conflicts=('tsung', 'riak') +makedepends=('erlang-basho' 'java-environment') +optdepends=('jdk7-openjdk') +options=('!makeflags') +backup=('opt/riakts/etc/riak.conf') +install='riakts.install' +source=( + "http://s3.amazonaws.com/downloads.basho.com/riak_ts/1.4/${pkgver}/riak_ts-${pkgver}.tar.gz" + 'riakts.service' +) +md5sums=('d8ae0af59c8aa05d50babcf8d3089d70' + '370ce648bfed4ac00db20178f7a6735b') + +build() { + cd "$srcdir/riak_ts-$pkgver" + + msg 'Building...' + unset LDFLAGS + make locked-deps + make rel +} + +package() { + cd "$srcdir/riak_ts-$pkgver" + + install -d "$pkgdir/opt" + install -d "$pkgdir/usr/bin" + install -d "$pkgdir/var/log" + install -d "$pkgdir/etc" + install -d "$pkgdir/usr/share/doc" + + cp -a "rel/riak" "$pkgdir/opt/$pkgname" + chmod -R 755 "$pkgdir/opt/$pkgname/bin" + ln -s /opt/$pkgname/log "$pkgdir/var/log/riak" + ln -s /opt/$pkgname/etc "$pkgdir/etc/riak" + + echo "/opt/$pkgname/bin/riak \"\$@\"" > "$pkgdir/usr/bin/riak" + chmod 755 "$pkgdir/usr/bin/riak" + echo "/opt/$pkgname/bin/riak-admin \"\$@\"" > "$pkgdir/usr/bin/riak-admin" + chmod 755 "$pkgdir/usr/bin/riak-admin" + echo "/opt/$pkgname/bin/riak-debug \"\$@\"" > "$pkgdir/usr/bin/riak-debug" + chmod 755 "$pkgdir/usr/bin/riak-debug" + echo "/opt/$pkgname/bin/riak-shell \"\$@\"" > "$pkgdir/usr/bin/riak-shell" + chmod 755 "$pkgdir/usr/bin/riak-shell" + echo "/opt/$pkgname/bin/search-cmd \"\$@\"" > "$pkgdir/usr/bin/search-cmd" + chmod 755 "$pkgdir/usr/bin/search-cmd" + + cp -R "doc/man" "$pkgdir/usr/share" + cp -R "doc" "$pkgdir/usr/share/doc/$pkgname" + rm -R "$pkgdir/usr/share/doc/$pkgname/man" + chmod -R 755 "$pkgdir/usr/share" + + # install daemon + install -Dm644 "$srcdir/$pkgname.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service" +} diff --git a/riakts.install b/riakts.install new file mode 100644 index 000000000000..00a27afdfd3b --- /dev/null +++ b/riakts.install @@ -0,0 +1,21 @@ +user="riak" +group="riak" +home="/opt/riakts" + +# arg 1: the new package version +post_install() { + useradd -r -d "$home" "$user" + chown -R "$user:$group" "$home" + chmod a+x "$home" +} + +# arg 1: the old package version +pre_remove() { + systemctl stop riakts &> /dev/null + userdel "$user" &> /dev/null + groupdel "$group" &> /dev/null + + cat <<EOF +==> WARNING! /opt/riakts/data has not been deleted. +EOF +} diff --git a/riakts.service b/riakts.service new file mode 100644 index 000000000000..90f5e7ee1d2b --- /dev/null +++ b/riakts.service @@ -0,0 +1,12 @@ +[Unit] +Description=Riak TS, distributed NoSQL key/value store +After=network.target + +[Service] +Type=forking +ExecStart=/opt/riakts/bin/riak start +ExecStop=/opt/riakts/bin/riak stop +LimitNOFILE=65536 + +[Install] +WantedBy=multi-user.target |