Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

swiched build to mnm

  • Loading branch information...
commit 2d52c3a56d6239eeb29efc8029db3b39a2847375 1 parent 24462bb
@joeferner authored
View
25 mnm.js
@@ -0,0 +1,25 @@
+#!/usr/bin/env node
+
+var path = require('path');
+var Builder = require('mnm');
+var builder = new Builder();
+
+builder.appendUnique('CXXFLAGS', '-Isrc/');
+
+var ociIncludeDir = process.env["OCI_INCLUDE_DIR"] || "/usr/include/oracle/11.2/client/";
+builder.failIfNotExists(ociIncludeDir, 'Could not find "%s" check OCI_INCLUDE_DIR environment variable.');
+builder.failIfNotExists(path.join(ociIncludeDir, 'occi.h'), 'Could not find "%s" check OCI_INCLUDE_DIR environment variable.');
+builder.appendUnique('CXXFLAGS', [ '-I' + ociIncludeDir ]);
+
+ociLibDir = process.env["OCI_LIB_DIR"] || "/usr/lib/oracle/11.2/client/lib/";
+builder.failIfNotExists(ociLibDir, 'Could not find "%s" check OCI_LIB_DIR environment variable.');
+builder.appendUnique('LINKFLAGS', [ '-L' + ociLibDir ]);
+
+builder.appendLinkerLibrary("occi");
+builder.appendLinkerLibrary("clntsh");
+builder.appendLinkerLibrary("nnz11");
+
+builder.target = "oracle_bindings"
+builder.appendSourceDir('./src');
+
+builder.run();
View
41 package.json
@@ -1,21 +1,24 @@
{
- "name": "oracle",
- "description": "Oracle database driver",
- "keywords": ["database", "db", "oracle"],
- "homepage": "https://github.com/nearinfinity/node-oracle",
- "version": "0.1.2",
- "engines": { "node" : ">=0.6.0" },
- "maintainers": [
- { "name": "Joe Ferner", "email": "joe@fernsroth.com" }
- ],
- "bugs" : { "url" : "https://github.com/nearinfinity/node-oracle/issues" },
- "repositories" : [
- { "type" : "git", "url" : "https://github.com/nearinfinity/node-oracle" }
- ],
- "scripts" : {
- "install": "node-waf configure build"
- },
- "devDependencies" : {
- "nodeunit" : "~>0.6.4"
- }
+ "name": "oracle",
+ "description": "Oracle database driver",
+ "keywords": ["database", "db", "oracle"],
+ "homepage": "https://github.com/nearinfinity/node-oracle",
+ "version": "0.1.2",
+ "engines": { "node" : ">=0.6.0" },
+ "maintainers": [
+ { "name": "Joe Ferner", "email": "joe@fernsroth.com" }
+ ],
+ "bugs" : { "url" : "https://github.com/nearinfinity/node-oracle/issues" },
+ "repositories" : { "type" : "git", "url" : "https://github.com/nearinfinity/node-oracle" },
+ "dependencies": {
+ "mnm": "~0.0.2"
+ },
+ "devDependencies" : {
+ "nodeunit" : "~>0.6.4"
+ },
+ "scripts": {
+ "test": "nodeunit test",
+ "install": "node mnm.js build"
+ },
+ "main": "./index.js"
}
View
0  tests/integration.js → test/integration.js
File renamed without changes
View
35 wscript
@@ -1,35 +0,0 @@
-import Options, Utils
-from os import unlink, symlink, chdir, environ
-from os.path import exists
-
-def set_options(opt):
- opt.tool_options("compiler_cxx")
-
-def configure(conf):
- conf.check_tool("compiler_cxx")
- conf.check_tool("node_addon")
-
- # Enables all the warnings that are easy to avoid
- conf.env.append_unique('CXXFLAGS', ["-Wall"])
- conf.env.append_unique('CXXFLAGS', ['-Isrc/'])
- conf.env.append_unique('CXXFLAGS', ['-g'])
- conf.env.append_unique('CXXFLAGS', ['-D_FILE_OFFSET_BITS=64'])
- conf.env.append_unique('CXXFLAGS', ['-D_LARGEFILE_SOURCE'])
-
- oci_include = environ.get("OCI_INCLUDE_DIR", "/usr/include/oracle/11.2/client/")
- if oci_include:
- conf.env.append_unique('CXXFLAGS', [ '-I' + oci_include ])
-
- oci_lib = environ.get("OCI_LIB_DIR", "/usr/lib/oracle/11.2/client/lib/")
- if oci_lib:
- conf.env.append_unique('LINKFLAGS', [ '-L' + oci_lib ])
-
- conf.env.append_unique('LINKFLAGS', ['-locci', '-lclntsh', '-lnnz11'])
- conf.check(header_name="occi.h", errmsg="Missing include files for OCI", mandatory=True)
- conf.check_cxx(lib="occi", errmsg="Missing libocci", mandatory=True)
-
-def build(bld):
- obj = bld.new_task_gen("cxx", "shlib", "node_addon")
- obj.target = "oracle_bindings"
- obj.source = "src/connection.cpp src/outParam.cpp src/executeBaton.cpp src/oracle_bindings.cpp"
- obj.includes = "src/"
Please sign in to comment.
Something went wrong with that request. Please try again.