Skip to content

Commit af99e3a

Browse files
authored
Merge pull request #10 from wolfmcnally/develop
Submodule-based build
2 parents 048d8a6 + abf4a60 commit af99e3a

File tree

11 files changed

+96
-9
lines changed

11 files changed

+96
-9
lines changed

.gitmodules

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[submodule "deps/bc-crypto-base"]
2+
path = deps/bc-crypto-base
3+
url = https://github.com/BlockchainCommons/bc-crypto-base.git
4+
[submodule "deps/bc-shamir"]
5+
path = deps/bc-shamir
6+
url = https://github.com/blockchaincommons/bc-shamir.git
7+
[submodule "deps/bc-slip39"]
8+
path = deps/bc-slip39
9+
url = https://github.com/blockchaincommons/bc-slip39.git
10+
[submodule "deps/bc-bip39"]
11+
path = deps/bc-bip39
12+
url = https://github.com/blockchaincommons/bc-bip39.git
13+
[submodule "deps/bc-bech32"]
14+
path = deps/bc-bech32
15+
url = https://github.com/blockchaincommons/bc-bech32.git
16+
[submodule "deps/argp-standalone"]
17+
path = deps/argp-standalone
18+
url = https://github.com/BlockchainCommons/argp-standalone.git

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,26 @@
22

33
A tool for creating and transforming cryptographic seeds.
44

5-
## Prerequisites
5+
## Dependencies
66

7-
If any of the following prerequisites are not installed, the `configure` step below will fail.
7+
These dependencies are automatically installed as submodules when you run the build script.
88

99
* [`bc-crypto-base`](https://github.com/blockchaincommons/bc-crypto-base)
1010
* [`bc-shamir`](https://github.com/blockchaincommons/bc-shamir)
1111
* [`bc-slip39`](https://github.com/blockchaincommons/bc-slip39)
1212
* [`bc-bip39`](https://github.com/blockchaincommons/bc-bip39)
1313
* [`bc-bech32`](https://github.com/blockchaincommons/bc-bech32)
14-
* [`GNU argp`](https://www.gnu.org/software/libc/manual/html_node/Argp.html) This may be installed via `brew install argp-standalone`.
14+
* [`GNU argp`](https://www.gnu.org/software/libc/manual/html_node/Argp.html)
1515

1616
## Installation
1717

1818
```bash
19-
$ ./configure
20-
$ make check
19+
$ ./build.sh
2120
$ sudo make install
2221
```
2322

23+
If you do not run the build script, opting instead for `./configure && make` the dependencies above will need to already be installed on your system.
24+
2425
## Use
2526

2627
```
@@ -65,7 +66,7 @@ This table below also establishes provenance (repository of origin, permalink, a
6566
| randombytes.c | [dsprenkels/randombytes](https://github.com/dsprenkels/randombytes/blob/master/randombytes.c) | [6db39aa](https://github.com/dsprenkels/randombytes/commit/6db39aaae6bb9ab97beca00d81bcfe935c56c88d) | 2017-2019 [Daan Sprenkels](https://github.com/dsprenkels/) | [MIT](https://github.com/dsprenkels/randombytes/commit/73ae9b4fce2e62babdd6a480b53ad449dd745ed9) |
6667
| randombytes.h | [dsprenkels/randombytes](https://github.com/dsprenkels/randombytes/blob/master/randombytes.h) | [19fd002](https://github.com/dsprenkels/randombytes/commit/19fd002d9b7b001b333a671186a91231b60d821b) | 2017-2019 [Daan Sprenkels](https://github.com/dsprenkels/) | [MIT](https://github.com/dsprenkels/randombytes/commit/73ae9b4fce2e62babdd6a480b53ad449dd745ed9) |
6768

68-
### Dependencies
69+
### Tool Dependencies
6970

7071
To build `seedtool` you'll need to use the following tools:
7172

build.sh

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#!/bin/bash
2+
3+
git submodule init
4+
git submodule update
5+
6+
LIBS=${PWD}/libs
7+
LIB=${LIBS}/lib
8+
INCLUDE=${LIBS}/include
9+
10+
export CFLAGS="${CFLAGS} -I${INCLUDE}"
11+
export CXXFLAGS="${CXXFLAGS} -I${INCLUDE}"
12+
export LDFLAGS="${LDFLAGS} -L${LIB}"
13+
14+
# Terminal colors
15+
RED=`tput setaf 1`
16+
GREEN=`tput setaf 2`
17+
RESET=`tput sgr0`
18+
19+
pushd deps/bc-crypto-base
20+
./configure --prefix ${LIBS}
21+
make check
22+
make install
23+
popd
24+
25+
pushd deps/bc-shamir
26+
./configure --prefix ${LIBS}
27+
make check
28+
make install
29+
popd
30+
31+
pushd deps/bc-slip39
32+
./configure --prefix ${LIBS}
33+
make check
34+
make install
35+
popd
36+
37+
pushd deps/bc-bip39
38+
./configure --prefix ${LIBS}
39+
make check
40+
make install
41+
popd
42+
43+
pushd deps/bc-bech32
44+
./configure --prefix ${LIBS}
45+
make check
46+
make install
47+
popd
48+
49+
pushd deps/argp-standalone/argp-standalone
50+
patch -N <../patch-argp-fmtstream.h
51+
./configure --prefix ${LIBS}
52+
make install
53+
cp libargp.a ${LIBS}/lib/
54+
cp argp.h ${LIBS}/include/
55+
popd
56+
57+
./configure
58+
make check
59+
echo "${GREEN}*** Seedtool built.${RESET}"
60+
echo "${GREEN}Next step: sudo make install${RESET}"

deps/argp-standalone

Submodule argp-standalone added at 8dfbda1

deps/bc-bech32

Submodule bc-bech32 added at c988286

deps/bc-bip39

Submodule bc-bip39 added at d4f9aea

deps/bc-crypto-base

Submodule bc-crypto-base added at 42dbfa0

deps/bc-shamir

Submodule bc-shamir added at edc218f

deps/bc-slip39

Submodule bc-slip39 added at 66fd249

libs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include/
2+
libs/

0 commit comments

Comments
 (0)