Commit ad9b54d7 authored by Woody Anderson's avatar Woody Anderson

upgrade to build against zookeeper-3.3.3, update the build to handle older...

upgrade to build against zookeeper-3.3.3, update the build to handle older archived zookeeper versions (these are stored in a different location)
parent 3f61c9d2
{
"name": "zookeeper",
"description": "apache zookeeper client for node.js (zookeeper async API >= 3.3.1)",
"version": "3.3.2-4",
"version": "3.3.3-0",
"author": "Yuri Finkelstein <yurif2003@yahoo.com>",
"contributors": [
{ "name": "Woody Anderson", "email": "woody.anderson@gmail.com"}
......
......@@ -4,7 +4,7 @@ import platform
srcdir = "."
blddir = "build"
APPNAME = "zookeeper"
VERSION = "3.3.2-4"
VERSION = "3.3.3-0"
OSTYPE = platform.system()
......@@ -12,7 +12,7 @@ includes = ['/usr/local/include/c-client-src']
libpaths = ['/usr/local/lib']
def set_options(opt):
opt.add_option('-z','--zookeeper', action='store', default='zookeeper-3.3.2', help='build zookeeper', dest='zookeeper')
opt.add_option('-z','--zookeeper', action='store', default='zookeeper-3.3.3', help='build zookeeper', dest='zookeeper')
opt.tool_options("compiler_cxx")
def configure(conf):
......@@ -26,10 +26,13 @@ def zookeeper(ctx, z):
includes = [t + "/include/c-client-src"]
libpaths = [t + "/lib"]
if z == None:
z = 'zookeeper-3.3.2'
z = 'zookeeper-3.3.3'
if z.find('/') == -1:
tgz = z + '.tar.gz'
ctx.exec_command("if [[ ! -d '%s' && ! -a '%s' ]] ; then curl 'http://apache.mirrors.tds.net//hadoop/zookeeper/%s/%s' > %s ; fi" % (z,tgz,z,tgz,tgz))
r = ctx.exec_command("if [[ ! -d '%s' && ! -a '%s' ]] ; then curl --silent --write-out '%%{http_code}' --output %s 'http://apache.mirrors.tds.net/zookeeper/%s/%s' | grep -v 404 ; fi" % (z,tgz,tgz,z,tgz))
if r != 0:
# probably building with an archive version, this is in a different directory
ctx.exec_command("curl --output %s 'http://apache.mirrors.tds.net/hadoop/zookeeper/%s/%s'" % (z,tgz,tgs,z,tgz))
ctx.exec_command("if [[ ! -d '%s' ]] ; then tar -xzvf %s ; fi" % (z,tgz))
ctx.exec_command("mkdir -p zk ; cd %s/src/c && ./configure --without-syncapi --disable-shared --prefix=%s && make clean install"%(z,t))
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment