Permalink
Browse files

upgrade to build against zookeeper-3.3.3, update the build to handle …

…older archived zookeeper versions (these are stored in a different location)
  • Loading branch information...
1 parent 3f61c9d commit ad9b54d7084ef127bd3b503d85985e78ccb553e8 @Woodya Woodya committed Apr 11, 2011
Showing with 8 additions and 5 deletions.
  1. +1 −1 package.json
  2. +7 −4 wscript
View
@@ -1,7 +1,7 @@
{
"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"}
View
11 wscript
@@ -4,15 +4,15 @@ import platform
srcdir = "."
blddir = "build"
APPNAME = "zookeeper"
-VERSION = "3.3.2-4"
+VERSION = "3.3.3-0"
OSTYPE = platform.system()
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:

0 comments on commit ad9b54d

Please sign in to comment.