add node-pre-gyp

This commit is contained in:
Mike Morris
2015-02-12 18:34:52 -08:00
parent 2d635e2883
commit cc1783298c
3 changed files with 19 additions and 8 deletions

View File

@@ -30,14 +30,14 @@ global: build
.PHONY: build
build: build/Makefile
@node-gyp build $(DEBUG_FLAG) --clang -- -j$(JOBS)
@node-pre-gyp build $(DEBUG_FLAG) --clang -- -j$(JOBS)
vendor/mbgl:
git submodule update --init
.PHONY: build/Makefile
build/Makefile: $(MBGL)/config/$(HOST).gypi
@node-gyp configure --clang -- \
@node-pre-gyp configure --clang -- \
-Dmbgl=$(MBGL) \
-Dhost=$(HOST) \
-I$(MBGL)/config/$(HOST).gypi \

View File

@@ -1,6 +1,6 @@
{
'targets': [
{ 'target_name': 'mbgl',
{ 'target_name': '<(module_name)',
'dependencies': [
'./<(mbgl)/mbgl.gyp:core',
'./<(mbgl)/mbgl.gyp:platform-<(platform_lib)',
@@ -52,11 +52,11 @@
{ 'target_name': 'action_after_build',
'type': 'none',
'dependencies': [ 'mbgl' ],
'dependencies': [ '<(module_name)' ],
'copies': [
{
'files': [ '<(PRODUCT_DIR)/mbgl.node' ],
'destination': 'lib'
'files': [ '<(PRODUCT_DIR)/<(module_name).node' ],
'destination': '<(module_path)'
}
]
}

View File

@@ -18,8 +18,12 @@
}
],
"dependencies": {
"nan": "^1.4.1"
"nan": "^1.4.1",
"node-pre-gyp": "^0.6.4"
},
"bundledDependencies": [
"node-pre-gyp"
],
"devDependencies": {
"aws-sdk": "^2.1.9",
"mapbox-gl-test-suite": "git://github.com/mapbox/mapbox-gl-test-suite#master",
@@ -31,5 +35,12 @@
"install": "make",
"test": "make test"
},
"gypfile": true
"gypfile": true,
"binary": {
"module_name": "mbgl",
"module_path": "./lib/",
"host": "https://mapbox-node-binary.s3.amazonaws.com",
"remote_path": "./{name}/v{version}",
"package_name": "{node_abi}-{platform}-{arch}.tar.gz"
}
}