Spacing, RELEASE notes, clean up
- Removed main Makefile - Fixed wording in README - Altered build script - Fixed clean script
This commit is contained in:
parent
6fe8bc7702
commit
a62410da67
9
Makefile
9
Makefile
@ -1,9 +0,0 @@
|
||||
all:
|
||||
@node-gyp clean 2>/dev/null
|
||||
node-gyp -d configure
|
||||
node-gyp build
|
||||
|
||||
clean:
|
||||
@node-gyp clean 2>/dev/null
|
||||
|
||||
.PHONY: all clean
|
||||
12
README.md
12
README.md
@ -32,6 +32,12 @@ If Node.js v0.12 isn't installed, it can be installed using "nvm", it can be don
|
||||
nvm install v0.12
|
||||
```
|
||||
|
||||
Install node-pre-gyp to allow you to get the binaries for bindings or to build the objects from source:
|
||||
|
||||
```bash
|
||||
npm install node-pre-gyp -g
|
||||
```
|
||||
|
||||
To build Bitcoin Core and bindings development packages are needed:
|
||||
|
||||
```bash
|
||||
@ -79,6 +85,12 @@ If Node.js v0.12 and associated commands "node", "npm" and "nvm" are not already
|
||||
nvm install v0.12
|
||||
```
|
||||
|
||||
Install node-pre-gyp to allow you to get the binaries for bindings or to build the objects from source:
|
||||
|
||||
```bash
|
||||
npm install node-pre-gyp -g
|
||||
```
|
||||
|
||||
Clone the bitcore-node repository locally:
|
||||
|
||||
```bash
|
||||
|
||||
35
RELEASE.md
Normal file
35
RELEASE.md
Normal file
@ -0,0 +1,35 @@
|
||||
Bitcore Node
|
||||
=======
|
||||
|
||||
A Node.js module that adds a native interface to Bitcoin Core for querying information about the Bitcoin blockchain. Bindings are linked to Bitcore Core compiled as a static library.
|
||||
|
||||
## Release Notes
|
||||
|
||||
Binaries for the C++ binding file (which includes libbitcoind statically linked in) are distributed with the help of node-pre-gyp. Node-pre-gyp publishes pre-built binaries to S3 for later download and installation. Source files can also be built if binaries are not desired.
|
||||
|
||||
## How to release
|
||||
|
||||
Ensure you've followed the instructions in the README.md for building the project from source. You will be using the node-pre-gyp to package and publish the project to S3. You will also need credentials for Bitpay's bitcore-node S3 bucket and be listed as an author for the bitcore-node's npm module.
|
||||
|
||||
- Create a file, ".node_pre_gyprc" in your home directory
|
||||
- The format of this file should be:
|
||||
|
||||
|
||||
```json
|
||||
{
|
||||
"accessKeyId": "xxx",
|
||||
"secretAccessKey": "yyy"
|
||||
}
|
||||
```
|
||||
|
||||
- then run the commands to push binaries corresponding to the version in package.json to S3 and npm
|
||||
|
||||
```bash
|
||||
npm install
|
||||
node-pre-gyp package publish
|
||||
npm publish
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
@ -152,5 +152,5 @@ apply the current patch from "${root_dir}"/etc/bitcoin.patch? (y/N): "
|
||||
prepare_for_caching
|
||||
echo 'Build finished successfully.'
|
||||
else
|
||||
echo 'Using existing shared library.'
|
||||
echo 'Using existing static library.'
|
||||
fi
|
||||
|
||||
@ -2,6 +2,7 @@
|
||||
|
||||
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.."
|
||||
cd "${root_dir}"
|
||||
|
||||
pushd "${root_dir}"/libbitcoind
|
||||
make clean
|
||||
popd
|
||||
node-pre-gyp clean
|
||||
|
||||
110
binding.gyp
110
binding.gyp
@ -1,59 +1,63 @@
|
||||
{
|
||||
'targets': [{
|
||||
'target_name': "<(module_name)",
|
||||
'include_dirs' : [
|
||||
'<!(node -e "require(\'nan\')")',
|
||||
'<!(./bin/variables.sh btcdir)/src',
|
||||
'<!(./bin/variables.sh btcdir)/depends/<!(./bin/variables.sh host)/include',
|
||||
'<!(./bin/variables.sh btcdir)/src/leveldb/include'
|
||||
],
|
||||
'sources': [
|
||||
'./src/libbitcoind.cc',
|
||||
],
|
||||
'conditions': [
|
||||
['OS=="mac"', {
|
||||
'xcode_settings': {
|
||||
'GCC_ENABLE_CPP_EXCEPTIONS': 'YES',
|
||||
'GCC_ENABLE_CPP_RTTI': 'YES',
|
||||
'MACOSX_DEPLOYMENT_TARGET': '10.9'
|
||||
"targets": [
|
||||
{
|
||||
"target_name": "<(module_name)",
|
||||
"include_dirs" : [
|
||||
"<!(node -e \"require('nan')\")",
|
||||
"<!(./bin/variables.sh btcdir)/src",
|
||||
"<!(./bin/variables.sh btcdir)/depends/<!(./bin/variables.sh host)/include",
|
||||
"<!(./bin/variables.sh btcdir)/src/leveldb/include"
|
||||
],
|
||||
"sources": [
|
||||
"./src/libbitcoind.cc",
|
||||
],
|
||||
"conditions": [
|
||||
[
|
||||
"OS==\"mac\"",
|
||||
{
|
||||
"xcode_settings": {
|
||||
"GCC_ENABLE_CPP_EXCEPTIONS": "YES",
|
||||
"GCC_ENABLE_CPP_RTTI": "YES",
|
||||
"MACOSX_DEPLOYMENT_TARGET": "10.9"
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
"cflags_cc": [
|
||||
"-fexceptions",
|
||||
"-frtti",
|
||||
"-fpermissive",
|
||||
],
|
||||
"link_settings": {
|
||||
"libraries": [
|
||||
"<!(./bin/variables.sh bitcoind)",
|
||||
"<!(./bin/variables.sh filesystem)",
|
||||
"<!(./bin/variables.sh thread)",
|
||||
"<!(./bin/variables.sh program_options)",
|
||||
"<!(./bin/variables.sh system)",
|
||||
"<!(./bin/variables.sh chrono)",
|
||||
"<!(./bin/variables.sh libsecp256k1)",
|
||||
"<!(./bin/variables.sh leveldb)",
|
||||
"<!(./bin/variables.sh memenv)",
|
||||
"<!(./bin/variables.sh bdb)",
|
||||
"-lssl",
|
||||
"-lcrypto"
|
||||
],
|
||||
"ldflags": [
|
||||
"<!(./bin/variables.sh load_archive)"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"target_name": "action_after_build",
|
||||
"type": "none",
|
||||
"dependencies": [ "<(module_name)" ],
|
||||
"copies": [
|
||||
{
|
||||
"files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
|
||||
"destination": "<(module_path)"
|
||||
}
|
||||
]
|
||||
],
|
||||
'cflags_cc': [
|
||||
'-fexceptions',
|
||||
'-frtti',
|
||||
'-fpermissive',
|
||||
],
|
||||
'link_settings': {
|
||||
'libraries': [
|
||||
'<!(./bin/variables.sh bitcoind)',
|
||||
'<!(./bin/variables.sh filesystem)',
|
||||
'<!(./bin/variables.sh thread)',
|
||||
'<!(./bin/variables.sh program_options)',
|
||||
'<!(./bin/variables.sh system)',
|
||||
'<!(./bin/variables.sh chrono)',
|
||||
'<!(./bin/variables.sh libsecp256k1)',
|
||||
'<!(./bin/variables.sh leveldb)',
|
||||
'<!(./bin/variables.sh memenv)',
|
||||
'<!(./bin/variables.sh bdb)',
|
||||
'-lssl',
|
||||
'-lcrypto'
|
||||
],
|
||||
'ldflags': [
|
||||
'<!(./bin/variables.sh load_archive)'
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"target_name": "action_after_build",
|
||||
"type": "none",
|
||||
"dependencies": [ "<(module_name)" ],
|
||||
"copies": [
|
||||
{
|
||||
"files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
|
||||
"destination": "<(module_path)"
|
||||
}
|
||||
]
|
||||
}]
|
||||
]
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user