1 # Maintainer: TJ Vanderpoel <tj@rubyists.com>
5 pkgdesc="A highly available, fault-tolerant, clustered, mostly api-compliant version of Apache CouchDB."
7 url="https://github.com/cloudant/bigcouch"
9 depends=(runit erlang spidermonkey icu curl openssl)
10 makedepends=('git' 'python2')
14 source=(bigcouch.sv.run bigcouch.sv.log bigcouch.env.home)
15 install=bigcouch.install
16 md5sums=('4f8419673274eeb017e10bf6b3bc0dae'
17 'd6f6a1c30590f99092899338c799e59e'
18 '211538e6bdb2f857309cb6b99c00bb1f')
20 _gitroot="https://github.com/cloudant/bigcouch.git"
25 msg "Connecting to GIT server...."
27 if [ -d $_gitname ] ; then
28 cd $_gitname && git pull origin
29 msg "The local files are updated."
31 git clone $_gitroot $_gitname
34 msg "GIT checkout done or server timeout"
35 msg "Starting make..."
37 rm -rf "$srcdir/$_gitname-build"
38 git clone "$srcdir/$_gitname" "$srcdir/$_gitname-build"
39 cd "$srcdir/$_gitname-build"
45 ./configure -p /var/lib/bigcouch
46 sed -i -e 's/python/python2/' Makefile
52 cd "$srcdir/$_gitname-build"
53 install -d "$pkgdir/var/lib" "$pkgdir/var/log/bigcouch" "$pkgdir/etc"
54 cp -a rel/bigcouch "$pkgdir/var/lib/"
55 rmdir "$pkgdir/var/lib/bigcouch/var/log"
56 ln -s /var/log/bigcouch "$pkgdir/var/lib/bigcouch/var/log"
57 mv "$pkgdir/var/lib/bigcouch/etc" "$pkgdir/etc/bigcouch"
58 ln -s /etc/bigcouch "$pkgdir/var/lib/bigcouch/etc"
59 install -m 0755 -D "$srcdir/bigcouch.sv.run" "$pkgdir/etc/sv/bigcouch/run"
60 install -m 0755 -D "$srcdir/bigcouch.sv.log" "$pkgdir/etc/sv/bigcouch/log/run"
61 install -m 0644 -D "$srcdir/bigcouch.env.home" "$pkgdir/etc/sv/bigcouch/env/HOME"