Permalink
Browse files

fixed: install.sh, wscript, index.js

  • Loading branch information...
1 parent 2d122e2 commit 738cbf3bdcb2cb71829eecd86f96cfcb6df69082 @mah0x211 committed Mar 23, 2012
Showing with 23 additions and 12 deletions.
  1. +5 −1 index.js
  2. +1 −0 install.sh
  3. +2 −9 package.json
  4. +15 −2 wscript
View
@@ -4,7 +4,11 @@
email: mah0x211@gmail.com
(C) Masatoshi Teruya
*/
-module.exports = require( __dirname + '/build/default/uuid_binding');
+try{
+ module.exports = require( __dirname + '/build/default/uuid_binding');
+}catch(e){
+ module.exports = require( __dirname + '/build/Release/uuid_binding');
+}
module.exports.BIN = 0; /* binary representation (import/export) */
module.exports.STR = 1; /* string representation (import/export) */
module.exports.SIV = 2; /* single integer value (import/export) */
View
@@ -54,5 +54,6 @@ LINKFLAGS="-L${MOD_DEPEND}/lib"
LDFLAGS="-L${MOD_DEPEND}/lib"
export CPPFLAGS
export LINKFLAGS
+export LDFLAGS
node-waf configure
node-waf build
View
@@ -6,22 +6,15 @@
"Universally Unique Identifier"
],
"description": "OSSP uuid bindings for node.js",
- "homepage": "http://github.com/mah0x211/node-ossp-uuid",
- "version" : "0.0.8",
+ "author": "Masatoshi Teruya <mah0x211@gmail.com>",
+ "version" : "0.0.9",
"main" : "./index.js",
"scripts" : {
"install" : "./install.sh"
},
"engines" : {
"node" : ">= 0.4.7"
},
- "maintainers": [
- {
- "name": "Masatoshi Teruya",
- "email": "mah0x211@gmail.com",
- "web": "http://kontext.jp/"
- }
- ],
"repository": {
"type" : "git",
"url": "http://github.com/mah0x211/node-ossp-uuid.git"
View
@@ -12,6 +12,14 @@ def set_options(opt):
opt.tool_options('compiler_cxx')
opt.tool_options('compiler_cc')
opt.tool_options('misc')
+
+ opt.add_option( '--uuid'
+ , action='store'
+ , type='string'
+ , default=False
+ , help='uuid install'
+ , dest='uuid'
+ )
def configure(conf):
conf.check_tool('compiler_cxx')
@@ -20,13 +28,18 @@ def configure(conf):
if not conf.env.CC: conf.fatal('c compiler not found')
conf.check_tool('node_addon')
- conf.env.append_value("CPPFLAGS", '-I./depend/include')
- conf.env.append_value("LINKFLAGS", '-L./depend/lib')
+ o = Options.options
+
+ if o.uuid:
+ conf.env.append_value("CPPFLAGS", '-I%s/include' % o.uuid)
+ conf.env.append_value("LIBPATH", '-L%s/lib' % o.uuid)
# print conf.env
# check ossp-uuid libs
conf.check_cc( header_name='uuid.h', mondatory=True )
+ conf.check_cc( lib='uuid', mandatory=True )
+
def build(bld):
print 'build'

0 comments on commit 738cbf3

Please sign in to comment.