Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Convert to `node-gyp`.

  • Loading branch information...
commit 7605f5d5f81892f159825ad56f1a2e171253aa50 1 parent 4301182
Dan Bornstein authored
Showing with 10 additions and 43 deletions.
  1. +0 −2  .gitignore
  2. +8 −0 binding.gyp
  3. +2 −2 package.json
  4. +0 −39 wscript
View
2  .gitignore
@@ -1,4 +1,2 @@
-.lock-wscript
-.waf*
build
oidNative.node
View
8 binding.gyp
@@ -0,0 +1,8 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'oidNative',
+ 'sources': [ 'src/oidNative.cc' ],
+ }
+ ]
+}
View
4 package.json
@@ -1,6 +1,6 @@
{
"name": "oid",
- "version": "0.4.6",
+ "version": "0.5.0",
"keywords":
["object", "id", "identity", "hash", "hashcode", "objid", "oid"],
"description":
@@ -31,7 +31,7 @@
},
"scripts": {
- "install": "node-waf configure build",
+ "install": "node-gyp configure build; mkdir -p bin; mv build/Release/*.node bin",
"test": "node test/test.js"
}
}
View
39 wscript
@@ -1,39 +0,0 @@
-# Build script based on examples from the NodeJS docs and
-# from node-rsa
-
-import Options
-import shutil
-from os import chmod, mkdir
-from os.path import exists
-
-srcdir = '.'
-blddir = 'build'
-VERSION = '0.0.1'
-
-def set_options(opt):
- opt.tool_options('compiler_cxx')
-
-def configure(conf):
- conf.check_tool('compiler_cxx')
- conf.check_tool('node_addon')
-
-def build(bld):
- obj = bld.new_task_gen('cxx', 'shlib', 'node_addon')
- obj.target = 'oidNative'
- obj.source = 'src/oidNative.cc'
-
-def shutdown():
- dir = 'bin'
- target = 'oidNative.node'
- dirTarget = dir + '/' + target
- if Options.commands['clean']:
- if exists(dir): shutil.rmtree(dir)
- if exists('build'): shutil.rmtree('build')
- if Options.commands['build']:
- if not exists(dir): mkdir(dir)
- if exists('build/default/' + target):
- shutil.copyfile('build/default/' + target, dirTarget)
- if exists('build/Release/' + target):
- shutil.copyfile('build/Release/' + target, dirTarget)
- if exists(dirTarget):
- chmod(dirTarget, 0755)
Please sign in to comment.
Something went wrong with that request. Please try again.