mirror of
https://github.com/wownero/wownero-cpp.git
synced 2026-10-17 15:21:30 +02:00
95 lines
2.8 KiB
Bash
Executable File
95 lines
2.8 KiB
Bash
Executable File
#!/bin/bash
|
|
# this file is for installing static dependencies, in case you need those.
|
|
# works on ubuntu20/22
|
|
#run as root/sudo
|
|
|
|
export OPENSSL_ROOT_DIR=/usr/local/openssl/
|
|
export CFLAGS="-fPIC"
|
|
export CPPFLAGS="-fPIC"
|
|
export CXXFLAGS="-fPIC"
|
|
|
|
# boost
|
|
wget https://boostorg.jfrog.io/artifactory/main/release/1.73.0/source/boost_1_73_0.tar.gz
|
|
tar -xzf boost_1_73_0.tar.gz
|
|
pushd boost_1_73_0
|
|
./bootstrap.sh
|
|
./b2 --with-atomic --with-system --with-filesystem --with-thread --with-date_time --with-chrono --with-regex --with-serialization --with-program_options --with-locale variant=release link=static runtime-link=static cflags="-fPIC" cxxflags="-fPIC" install -a --prefix=/usr/local/
|
|
popd
|
|
rm -rf boost_1_73_0
|
|
|
|
# openssl
|
|
wget https://www.openssl.org/source/openssl-1.1.1i.tar.gz
|
|
tar -xvf openssl-1.1.1i.tar.gz
|
|
rm -xvf openssl-1.1.1i.tar.gz
|
|
pushd openssl-1.1.1i
|
|
./config no-shared no-dso --prefix=/usr/local/openssl
|
|
make -j8
|
|
make install
|
|
popd
|
|
rm -rf openssl-1.1.1i
|
|
|
|
# expat
|
|
wget https://github.com/libexpat/libexpat/releases/download/R_2_4_8/expat-2.4.8.tar.bz2
|
|
tar -xf expat-2.4.8.tar.bz2
|
|
rm expat-2.4.8.tar.bz2
|
|
pushd expat-2.4.8
|
|
./configure --enable-static --disable-shared --prefix=/usr/local/expat/
|
|
make -j8
|
|
make -j8 install
|
|
popd
|
|
rm -rf expat-2.4.8
|
|
|
|
# libunbound
|
|
wget https://www.nlnetlabs.nl/downloads/unbound/unbound-1.16.2.tar.gz
|
|
tar -xzf unbound-1.16.2.tar.gz
|
|
rm unbound-1.16.2.tar.gz
|
|
pushd unbound-1.16.2
|
|
./configure --disable-shared --enable-static --without-pyunbound --with-libexpat=/usr/local/expat/ --with-ssl=/usr/local/openssl/ --with-libevent=no --without-pythonmodule --disable-flto --with-pthreads --with-libunbound-only --with-pic
|
|
make -j8
|
|
make -j8 install
|
|
popd
|
|
rm -rf unbound-1.16.2
|
|
|
|
# zmq
|
|
git clone -b v4.3.2 --depth 1 https://github.com/zeromq/libzmq
|
|
pushd libzmq
|
|
git reset --hard a84ffa12b2eb3569ced199660bac5ad128bff1f0
|
|
./autogen.sh
|
|
./configure --disable-shared --enable-static --disable-libunwind --with-libsodium
|
|
make -j8
|
|
make -j8 install
|
|
popd
|
|
rm -rf libzmq
|
|
|
|
# zlib
|
|
git clone -b v1.2.11 --depth 1 https://github.com/madler/zlib
|
|
pushd zlib
|
|
git reset --hard cacf7f1d4e3d44d871b605da3b647f07d718623f
|
|
./configure --static --prefix=/usr/local/zlib
|
|
make -j8
|
|
make -j8 install
|
|
popd
|
|
rm -rf zlib
|
|
|
|
# libusb
|
|
git clone -b v1.0.23 --depth 1 https://github.com/libusb/libusb
|
|
pushd libusb
|
|
git reset --hard e782eeb2514266f6738e242cdcb18e3ae1ed06fa
|
|
./autogen.sh --disable-shared --enable-static
|
|
make -j8
|
|
make -j8 install
|
|
popd
|
|
rm -rf libusb
|
|
|
|
# libsodium
|
|
# on ubuntu, `libsodium-dev` already comes with a static .a
|
|
|
|
# miniupnp
|
|
git clone -b miniupnpc_2_2_1 --depth 1 https://github.com/miniupnp/miniupnp.git
|
|
pushd miniupnp/miniupnpc
|
|
git reset --hard 544e6fcc73c5ad9af48a8985c94f0f1d742ef2e0
|
|
cmake -Bbuild -DUPNPC_BUILD_STATIC=1 -DUPNPC_BUILD_SHARED=OFF -DUPNPC_BUILD_TESTS=OFF -DUPNPC_BUILD_SAMPLE=OFF .
|
|
sudo make -Cbuild -j8 install
|
|
popd
|
|
rm -rf miniupnp
|