1 # Maintainer: Albert Chang <albert.chang@gmx.com>
2 # Contributor: Thomas Mudrunka <harvie@@email..cz> You can also contact me on http://blog.harvie.cz/
7 pkgdesc='NOSQL database engine providing decentralized key-value store, flexible map/reduce engine and HTTP/JSON query interface'
10 url='http://riak.basho.com/'
11 makedepends=('erlang' 'git')
12 backup=('opt/riak/etc/app.config' 'opt/riak/etc/vm.args')
13 install='riak.install'
14 source=("http://downloads.basho.com/riak/CURRENT/riak-${pkgver}.tar.gz"
18 md5sums=('09b956315e0e2fe5b7d914138959da9d'
19 '942e198d5dfa52ac36360e3f79b65930'
20 'ea204ebd9a06a3812a00f4dcbd37c227'
21 'af9a1757a5011d23712555adc98c133f')
24 cd ${pkgname}-${pkgver}
29 # need to unset LDFLAGS because: ld: unrecognized option '-Wl,--hash-style=gnu'
35 install -d ${pkgdir}/opt/riak
38 cp -r ./* ${pkgdir}/opt/riak
40 [ -d "${pkgdir}/usr/lib/erlang" ] && {
41 msg 'Removing files already shipped with erlang package...'
42 pacman -Ql erlang | cut -d ' ' -f 2- | while read i; do
50 chmod -R 755 ${pkgdir}/opt/riak/bin
52 msg 'ArchLinux integration...'
54 install -d ${pkgdir}/var/log
55 ln -s /opt/riak/log ${pkgdir}/var/log/riak
56 install -d ${pkgdir}/etc/rc.d
57 ln -s /opt/riak/etc ${pkgdir}/etc/riak
58 install -d ${pkgdir}/usr/share/doc/
59 cp -r ${srcdir}/riak-${pkgver}/doc/man ${pkgdir}/usr/share/
60 cp -r ${srcdir}/riak-${pkgver}/doc ${pkgdir}/usr/share/doc/riak
61 rm -r ${pkgdir}/usr/share/doc/riak/man
63 # install launch files
64 install -d ${pkgdir}/usr/bin/
65 install ${srcdir}/riak ${pkgdir}/usr/bin
66 install ${srcdir}/riak-admin ${pkgdir}/usr/bin
69 install ${srcdir}/riak.rc ${pkgdir}/etc/rc.d/riak