forked from lclc/opentxs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL-Debian_Ubuntu.txt
128 lines (90 loc) · 3.47 KB
/
INSTALL-Debian_Ubuntu.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
#########################################################################
# #
# #
# ## INSTALL - Debian, Ubuntu, other debian based ## #
# #
# #
#########################################################################
## Supports Debian 7 or later
## Supports Ubuntu 14.04 or later
## To build opentxs you need a C++ 11 compiler (minimum GCC 4.7, 4.8 recommended)
################# Dependencies #################
# install general developer dependencies
$ sudo aptitude install git build-essential cmake pkg-config
# install Open-Transactions library dependencies
$ sudo aptitude install libssl-dev protobuf-compiler libprotobuf-dev libzmq3-dev
(NB: may need "libprotoc" if "protobuf-compiler" pkg not available on debian-like sytems)
# install dependencies for git hooks
$ sudo aptitude install cppcheck
$ wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | sudo apt-key add -
$ sudo add-apt-repository -y "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.5 main"
$ sudo apt-get update
$ sudo apt-get install clang-format-3.5
(NB: make sure to reinstall clang from the newly added repo for clang-format-3.5 to work)
######### Optional API dependencies ##########
SWIG Version 3.0.0 or newer required.
$ sudo aptitude install ...
SWIG JAVA: openjdk-6-jdk openjdk-6-source
SWIG PERL5: libperl-dev
SWIG PHP: php5-dev
SWIG PYTHON: python-dev
SWIG RUBY: ruby ruby-dev
SWIG TCL: tcl tcl-dev
SWIG CSHARP: mono-mcs monodevelop
SWIG D: gdc
################# Get opentxs ##################
# git pull from master branch (current stable)
$ git clone git://github.com/Open-Transactions/opentxs.git
# to clean and reset to HEAD:
$ git clean -fxd && git submodule foreach git clean -fxd
$ git reset --hard HEAD && git submodule foreach git reset --hard HEAD
$ cd opentxs
$ mkdir build && cd build
################## Build ###################
$ cmake ..
$ make -j2
Build Multithreaded, need about 1gb of ram per thread.
-j (int)
############## CMake Options: ##############
Set install dir: -DCMAKE_INSTALL_PREFIX=/home/your/prefix/
(Default is /usr/local)
Build static: -DBUILD_SHARED_LIBS=OFF
Debug Mode: -DCMAKE_BUILD_TYPE=Debug
(Default is Release)
Signal Handling: -DSIGNAL_HANLDER=ON
System Keyring (Optional):
Windows : -DKEYRING_WINDOWS=ON
Mac : -DKEYRING_MAC=ON
Gnome : -DKEYRING_GNOME=ON
KDE KWallet : -DKEYRING_KWALLET=ON
Flatfile : -DKEYRING_FLATFILE=ON
opentxs CL client autocompletion: -DAUTOCOMPLETION=ON
Enable OTAPI support for swig wrapper:
Java : -DJAVA=ON
Perl : -DPERL=ON
PHP : -DPHP=ON
Python : -DPYTHON=ON
Ruby : -DRUBY=ON
TCL : -DTCL=ON
C# : -DCSHARP=ON
D : -DD=ON
Go : -DGO=ON
Build Packages:
RPM: -DRPM=ON
DEB: -DDEB=ON
You can't build an RPM and use an install to a custom directory (CMAKE_INSTALL_PREFIX).
################## Install #################
## Install to system
$ sudo make install
## Link the libraries
$ sudo ldconfig
## Build (RPM/DEB/TAR) package
$ make package
########### Miscellaneous Notes: ###########
## Load some sample data to look at an example wallet
!!! WARNING : will reset all user data !!!
$ ./script/install_sample_data.sh
# also can checkout sample contracts,baskets,
# server-contracts at https://github.com/monetas/opentxs-sample-data
# for python client api support export env variable
$ export PYTHONPATH=/usr/local/lib:$PYTHONPATH