Permalink
Browse files

use node-gyp instead of node-waf

  • Loading branch information...
1 parent f23543b commit eeab61d4cce7a70e7623e5b3abeeba0a99700968 @darashi darashi committed Apr 18, 2012
Showing with 15 additions and 40 deletions.
  1. +10 −0 binding.gyp
  2. +1 −1 lib/nroonga.js
  3. +3 −2 package.json
  4. +1 −1 src/nroonga.coffee
  5. +0 −36 wscript
View
@@ -0,0 +1,10 @@
+{
+ "targets": [
+ {
+ "target_name": "nroonga_bindings",
+ "sources": [ "src/nroonga.cc" ],
+ "include_dirs": ["<!@(pkg-config --cflags-only-I groonga | sed -e 's/-I//g')"],
+ "libraries": ["<!@(pkg-config --libs-only-l groonga)"]
+ }
+ ]
+}
View
@@ -1,7 +1,7 @@
(function() {
var msgpack, nroonga, optionsToCommandString, overrideOutputType;
- nroonga = module.exports = require('./nroonga_bindings.node');
+ nroonga = module.exports = require('../build/Release/nroonga_bindings.node');
msgpack = require('msgpack2');
View
@@ -21,10 +21,11 @@
},
"scripts": {
"test": "expresso",
- "watch": "coffee -c -w -o lib src"
+ "watch": "coffee -c -w -o lib src",
+ "install": "node-gyp rebuild"
},
"main": "./lib/nroonga",
"engines": {
- "node": "~ 0.6.9"
+ "node": "~ 0.6.15"
}
}
View
@@ -1,4 +1,4 @@
-nroonga = module.exports = require('./nroonga_bindings.node')
+nroonga = module.exports = require('../build/Release/nroonga_bindings.node')
msgpack = require('msgpack2')
optionsToCommandString = (command, options) ->
View
36 wscript
@@ -1,36 +0,0 @@
-import os
-from os.path import exists
-from shutil import copy2 as copy
-
-import Options
-import Utils
-
-TARGET = 'nroonga_bindings'
-TARGET_FILE = '%s.node' % TARGET
-built = 'build/Release/%s' % TARGET_FILE
-dest = 'lib/%s' % TARGET_FILE
-
-def set_options(opt):
- opt.tool_options("compiler_cxx")
-
-def configure(conf):
- conf.check_tool("compiler_cxx")
- conf.check_tool("node_addon")
- conf.check_cfg(package='groonga', args='--cflags --libs')
-
-def build(bld):
- obj = bld.new_task_gen("cxx", "shlib", "node_addon")
- obj.cxxflags = ["-g", "-D_FILE_OFFSET_BITS=64", "-D_LARGEFILE_SOURCE", "-Wall"]
- obj.target = "nroonga_bindings"
- obj.source = "src/nroonga.cc"
- obj.uselib = ["GROONGA"]
-
-def shutdown():
- if Options.commands['clean']:
- if exists(TARGET_FILE):
- os.unlink(TARGET_FILE)
- if exists(dest):
- os.unlink(dest)
- else:
- if exists(built):
- copy(built, dest)

0 comments on commit eeab61d

Please sign in to comment.