# You can also contact me on http://blog.harvie.cz/
pkgname=riak
-pkgver=0.9.1
+pkgver=0.11.0
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 2')
url='http://riak.basho.com/'
makedepends=(erlang make gcc pacman)
-pkgbigver=$( echo $pkgver | grep -o ^... ) #get x.x version from x.x.x version
-backup=('etc/riak/app.config' 'etc/riak/vm.args')
+pkgbigver=$( echo $pkgver | grep -o ^[0-9]*.[0-9]* ) #get x.x version from x.x.x version
+backup=('opt/riak/etc/app.config' 'opt/riak/etc/vm.args')
install="${pkgname}.install"
source=("http://downloads.basho.com/riak/${pkgname}-${pkgbigver}/${pkgname}-${pkgver}.tar.gz" 'riak.rc')
-md5sums=('1f78bb838ae6ded568486b0b56655613'
+md5sums=('5792ac2b91ad71ccaee91d1ef9632348'
'd44752424e6331518a854de08fab5156')
prefixpath="/opt/${pkgname}"
#prefixpath="/usr/lib/erlang"
mkdir -p ${pkgdir}/etc/rc.d
ln -s ${prefixpath}/etc ${pkgdir}/etc/riak
mkdir -p ${pkgdir}/usr/share/doc/
- cp -r ${srcdir}/riak-0.9.1/doc/man ${pkgdir}/usr/share/
- cp -r ${srcdir}/riak-0.9.1/doc ${pkgdir}/usr/share/doc/riak
+ cp -r ${srcdir}/riak-${pkgver}/doc/man ${pkgdir}/usr/share/
+ cp -r ${srcdir}/riak-${pkgver}/doc ${pkgdir}/usr/share/doc/riak
rm -r ${pkgdir}/usr/share/doc/riak/man
mkdir -p ${pkgdir}/usr/bin/
chmod -R 755 ${pkgdir}/usr/bin/ ${pkgdir}/etc/rc.d/
}
-
iuser=riak;
igroup="$iuser";
ihome="/opt/$iuser";
-#iid="78";
# arg 1: the new package version
post_install() {
chown -R "$iuser:$igroup" "$ihome"
#chmod -R g+rw "$ihome"
chmod a+x "$ihome"
+
+ ls /opt/riak/etc/*.pacnew &> /dev/null && cat <<EOS
+==> WARNING! Riak configuration (or even storage backend) may changed since
+==> the last version, you rather check http://basho.com/ for changelog...
+EOS
}
# arg 1: the new package version
userdel "$iuser" &> /dev/null
groupdel "$igroup" &> /dev/null
}
-