diff options
author | Daichi Shinozaki | 2015-06-09 18:30:35 +0900 |
---|---|---|
committer | Daichi Shinozaki | 2015-06-09 18:30:35 +0900 |
commit | 58114d010c2e03c5444027b3a8b2dd5be3ecf465 (patch) | |
tree | 38212a84c0271ab6d2b008097b25e41bea814723 | |
download | aur-58114d010c2e03c5444027b3a8b2dd5be3ecf465.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | PKGBUILD | 55 | ||||
-rw-r--r-- | riak.install | 30 | ||||
-rw-r--r-- | riak.service | 12 |
4 files changed, 119 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..71b17525ca65 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +pkgbase = riak + pkgdesc = NOSQL database engine providing decentralized key-value store, flexible map/reduce engine and HTTP/JSON query interface + pkgver = 2.1.1 + pkgrel = 1 + url = http://riak.basho.com/ + install = riak.install + arch = i686 + arch = x86_64 + license = APACHE + makedepends = erlang-nox + makedepends = java-environment + optdepends = jdk7-openjdk + conflicts = tsung + options = !makeflags + backup = opt/riak/etc/riak.conf + source = http://s3.amazonaws.com/downloads.basho.com/riak/2.1/2.1.1/riak-2.1.1.tar.gz + source = riak.service + md5sums = 5da48c0b0fbbf5c8e21e6074f9ba7f7f + md5sums = ed4cda47fc1fad8b0a3fb3858600c578 + +pkgname = riak + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..63f1175209ab --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,55 @@ +# Maintainer: Daichi Shinozaki <dsdseg@gmail.com> +# Contributor: Vincent Bernardoff <vb@luminar.eu.org># +# Contributor: lafka <lafa@hackeriet.no> +# Contributor: Albert Chang <albert.chang@gmx.com> +# Contributor: Thomas Mudrunka <harvie@@email..cz> You can also contact me on http://blog.harvie.cz/ +# Contributor: zhehao + +pkgname=riak +pkgver=2.1.1 +pkgrel=1 +pkgdesc='NOSQL database engine providing decentralized key-value store, flexible map/reduce engine and HTTP/JSON query interface' +arch=('i686' 'x86_64') +license=('APACHE') +url='http://riak.basho.com/' +conflicts=('tsung') +makedepends=('erlang-nox' 'java-environment') +optdepends=('jdk7-openjdk') +options=('!makeflags') +backup=('opt/riak/etc/riak.conf') +install='riak.install' +source=( + "http://s3.amazonaws.com/downloads.basho.com/riak/2.1/${pkgver}/${pkgname}-${pkgver}.tar.gz" + 'riak.service' +) +md5sums=('5da48c0b0fbbf5c8e21e6074f9ba7f7f' + 'ed4cda47fc1fad8b0a3fb3858600c578') + +build() { + cd "$srcdir/$pkgname-$pkgver" + + msg 'Building...' + unset LDFLAGS + make rel +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + + install -d "$pkgdir/opt" + install -d "$pkgdir/var/log" + install -d "$pkgdir/etc" + install -d "$pkgdir/usr/share/doc" + + cp -a "rel/riak" "$pkgdir/opt/riak" + chmod -R 755 "$pkgdir/opt/riak/bin" + ln -s /opt/riak/log "$pkgdir/var/log/riak" + ln -s /opt/riak/etc "$pkgdir/etc/riak" + cp -R "doc/man" "$pkgdir/usr/share" + cp -R "doc" "$pkgdir/usr/share/doc/riak" + rm -R "$pkgdir/usr/share/doc/riak/man" + chmod -R 755 "$pkgdir/usr/share" + + # install daemon + install -Dm644 "$srcdir"/riak.service "$pkgdir"/usr/lib/systemd/system/riak.service +} diff --git a/riak.install b/riak.install new file mode 100644 index 000000000000..4753aa7a5d77 --- /dev/null +++ b/riak.install @@ -0,0 +1,30 @@ +user="riak" +group="riak" +home="/opt/riak" + +# arg 1: the new package version +post_install() { + useradd -r -s /sbin/nologin -d "$home" "$user" + chown -R "$user:$group" "$home" + chmod a+x "$home" +} + +# arg 1: the new package version +# arg 2: the old package version +post_upgrade() { + cat <<EOF +==> WARNING! Riak configuration (or even storage backend) may changed since +==> the last version, check http://basho.com/ for changelog... +EOF +} + +# arg 1: the old package version +pre_remove() { + systemctl stop riak &> /dev/null + userdel "$user" &> /dev/null + groupdel "$group" &> /dev/null + + cat <<EOF +==> WARNING! /opt/riak/data has not been deleted. +EOF +} diff --git a/riak.service b/riak.service new file mode 100644 index 000000000000..b08bc75d7642 --- /dev/null +++ b/riak.service @@ -0,0 +1,12 @@ +[Unit] +Description=Distributed key/value store from Basho Technologies +After=network.target + +[Service] +User=riak +Type=forking +ExecStart=/opt/riak/bin/riak start +ExecStop=/opt/riak/bin/riak stop + +[Install] +WantedBy=multi-user.target |