mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-21 10:27:26 +08:00
114 lines
1.9 KiB
Bash
Executable File
114 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
sudo apt-get update && sudo apt-get install -y \
|
|
build-essential \
|
|
curl \
|
|
git \
|
|
cmake \
|
|
libgmp-dev \
|
|
libmpfr-dev \
|
|
libmpfr6 \
|
|
wget \
|
|
m4 \
|
|
pkg-config \
|
|
gcc \
|
|
g++ \
|
|
make \
|
|
autoconf \
|
|
automake \
|
|
libtool \
|
|
libssl-dev \
|
|
python3 \
|
|
python-is-python3 \
|
|
wget
|
|
|
|
sudo apt update && sudo apt install -y wget
|
|
ARCH=$(dpkg --print-architecture)
|
|
case ${ARCH} in \
|
|
amd64) GOARCH=amd64 ;; \
|
|
arm64) GOARCH=arm64 ;; \
|
|
*) echo "Unsupported architecture: ${ARCH}" && exit 1 ;; \
|
|
esac
|
|
wget https://go.dev/dl/go1.23.5.linux-${GOARCH}.tar.gz
|
|
sudo rm -rf /usr/local/go
|
|
sudo tar -C /usr/local -xzf go1.23.5.linux-${GOARCH}.tar.gz
|
|
rm go1.23.5.linux-${GOARCH}.tar.gz
|
|
|
|
FLINT_TMP=$(mktemp -d)
|
|
git clone https://github.com/flintlib/flint.git "$FLINT_TMP"
|
|
pushd "$FLINT_TMP"
|
|
git checkout flint-3.0
|
|
./bootstrap.sh
|
|
./configure \
|
|
--prefix=/usr/local \
|
|
--with-gmp=/usr/local \
|
|
--with-mpfr=/usr/local \
|
|
--enable-static \
|
|
--disable-shared \
|
|
CFLAGS="-O3"
|
|
make
|
|
sudo make install
|
|
popd
|
|
rm -rf "$FLINT_TMP"
|
|
|
|
./docker/rustup-init.sh -y --profile minimal
|
|
|
|
cargo install uniffi-bindgen-go --git https://github.com/NordSecurity/uniffi-bindgen-go --tag v0.2.1+v0.25.0
|
|
|
|
bash install-emp.sh
|
|
|
|
pushd emp-tool
|
|
sed -i 's/add_library(${NAME} SHARED ${sources})/add_library(${NAME} STATIC ${sources})/g' CMakeLists.txt
|
|
mkdir -p build
|
|
pushd build
|
|
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local
|
|
popd
|
|
make
|
|
sudo make install
|
|
popd
|
|
|
|
pushd emp-ot
|
|
mkdir -p build
|
|
pushd build
|
|
cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local
|
|
popd
|
|
make
|
|
sudo make install
|
|
popd
|
|
|
|
pushd vdf
|
|
./generate.sh
|
|
popd
|
|
|
|
pushd ferret
|
|
./generate.sh
|
|
popd
|
|
|
|
pushd bls48581
|
|
./generate.sh
|
|
popd
|
|
|
|
pushd bulletproofs
|
|
./generate.sh
|
|
popd
|
|
|
|
pushd verenc
|
|
./generate.sh
|
|
popd
|
|
|
|
pushd channel
|
|
./generate.sh
|
|
popd
|
|
|
|
pushd channel
|
|
./generate.sh
|
|
popd
|
|
|
|
pushd rpm
|
|
./generate.sh
|
|
popd
|
|
|
|
echo "Source dependencies installed."
|