forked from bauerj/electrumx-installer
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request bauerj#23 from bauerj/fedora-support
Add support for Fedora
- Loading branch information
Showing
5 changed files
with
60 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,5 @@ | ||
if [ "$VERSION_ID" != "7" ]; then | ||
warning "Only the latest version (CentOS 7) is officially supported (but this might work)" | ||
warning "Only the latest version (CentOS 7) is officially supported (but this might work)" | ||
fi | ||
|
||
function install_compiler { | ||
yum -y update | ||
yum -y install gcc-c++ bzip2 || _error "Could not install packages" 1 | ||
} | ||
|
||
function install_script_dependencies { | ||
yum -y install wget openssl | ||
} | ||
|
||
PATH=$PATH:/usr/local/bin | ||
. distributions/base.sh | ||
. distributions/base-systemd.sh | ||
. distributions/base-conda.sh | ||
. distributions/base-compile-rocksdb.sh | ||
|
||
|
||
function install_leveldb { | ||
yum -y install libleveldb-dev build-essential || _error "Could not install packages" 3 | ||
} | ||
|
||
function install_git { | ||
yum -y install git || _error "Could not install packages" 2 | ||
} | ||
|
||
function install_rocksdb_dependencies { | ||
# /usr/lib is not always included? | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib | ||
yum -y install snappy snappy-devel zlib zlib-devel bzip2-libs bzip2-devel libgflags-dev cmake make || _error "Could not install packages" 4 | ||
_DIR=$(pwd) | ||
git clone https://github.com/gflags/gflags /tmp/gflags | ||
cd /tmp/gflags | ||
mkdir build && cd build | ||
_info "Compiling gflags" | ||
export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1 | ||
make && make install || _error "Error installing gflags" 1 | ||
cd $_DIR | ||
} | ||
. distributions/base-rhel.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
. distributions/base-rhel.sh | ||
|
||
export PYTHONUSERBASE=/usr/local/lib/python3.6/site-packages | ||
|
||
if [ "$VERSION_ID" != "28" ]; then | ||
warning "Only the latest version (Fedora 28) is officially supported (but this might work)" | ||
fi | ||
|
||
has_rocksdb_binary=1 | ||
newer_rocksdb=1 | ||
|
||
function binary_install_rocksdb { | ||
dnf -y install redhat-rpm-config python3-devel snappy-devel zlib-devel rocksdb-devel lz4-devel bzip2-devel gflags-devel gcc-c++ gcc || _error "Unable to install rocksdb" 1 | ||
} | ||
|
||
function binary_uninstall_rocksdb { | ||
$APT remove -y rocksdb rocksdb-devel || _error "Could not remove rocksdb" 1 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
function install_compiler { | ||
yum -y update | ||
yum -y install gcc-c++ bzip2 || _error "Could not install packages" 1 | ||
} | ||
|
||
function install_script_dependencies { | ||
yum -y install wget openssl | ||
} | ||
|
||
PATH=$PATH:/usr/local/bin | ||
. distributions/base.sh | ||
. distributions/base-systemd.sh | ||
. distributions/base-conda.sh | ||
. distributions/base-compile-rocksdb.sh | ||
|
||
|
||
function install_leveldb { | ||
yum -y install libleveldb-dev build-essential || _error "Could not install packages" 3 | ||
} | ||
|
||
function install_git { | ||
yum -y install git || _error "Could not install packages" 2 | ||
} | ||
|
||
function install_rocksdb_dependencies { | ||
# /usr/lib is not always included? | ||
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib | ||
yum -y install snappy snappy-devel zlib zlib-devel bzip2-libs bzip2-devel libgflags-dev cmake make || _error "Could not install packages" 4 | ||
_DIR=$(pwd) | ||
git clone https://github.com/gflags/gflags /tmp/gflags | ||
cd /tmp/gflags | ||
mkdir build && cd build | ||
_info "Compiling gflags" | ||
export CXXFLAGS="-fPIC" && cmake .. && make VERBOSE=1 | ||
make && make install || _error "Error installing gflags" 1 | ||
cd $_DIR | ||
} |