From 0d7820f61aa8097de30b5fa3c35d02a1b43a21fe Mon Sep 17 00:00:00 2001 From: XMRig Date: Fri, 22 May 2020 19:14:38 +0700 Subject: [PATCH] Update build scripts. --- scripts/build.hwloc.sh | 19 +++++++++++++++++ scripts/build.libressl.sh | 20 ++++++++++++++++++ scripts/build.openssl.sh | 20 ++++++++++++++++++ scripts/build.uv.sh | 20 ++++++++++++++++++ scripts/build_deps.sh | 44 +++------------------------------------ 5 files changed, 82 insertions(+), 41 deletions(-) create mode 100755 scripts/build.hwloc.sh create mode 100755 scripts/build.libressl.sh create mode 100755 scripts/build.openssl.sh create mode 100755 scripts/build.uv.sh diff --git a/scripts/build.hwloc.sh b/scripts/build.hwloc.sh new file mode 100755 index 00000000..326b6640 --- /dev/null +++ b/scripts/build.hwloc.sh @@ -0,0 +1,19 @@ +#!/bin/bash -e + +HWLOC_VERSION="2.2.0" + +mkdir -p deps +mkdir -p deps/include +mkdir -p deps/lib + +mkdir -p build && cd build + +wget https://download.open-mpi.org/release/hwloc/v2.2/hwloc-${HWLOC_VERSION}.tar.bz2 -O hwloc-${HWLOC_VERSION}.tar.bz2 +tar -xjf hwloc-${HWLOC_VERSION}.tar.bz2 + +cd hwloc-${HWLOC_VERSION} +./configure --disable-shared --enable-static --disable-io --disable-libudev --disable-libxml2 +make -j$(nproc) +cp -fr include/ ../../deps +cp hwloc/.libs/libhwloc.a ../../deps/lib +cd .. \ No newline at end of file diff --git a/scripts/build.libressl.sh b/scripts/build.libressl.sh new file mode 100755 index 00000000..af7fe822 --- /dev/null +++ b/scripts/build.libressl.sh @@ -0,0 +1,20 @@ +#!/bin/bash -e + +LIBRESSL_VERSION="3.0.2" + +mkdir -p deps +mkdir -p deps/include +mkdir -p deps/lib + +mkdir -p build && cd build + +wget https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${LIBRESSL_VERSION}.tar.gz -O libressl-${LIBRESSL_VERSION}.tar.gz +tar -xzf libressl-${LIBRESSL_VERSION}.tar.gz + +cd libressl-${LIBRESSL_VERSION} +./configure --disable-shared +make -j$(nproc) +cp -fr include/ ../../deps +cp crypto/.libs/libcrypto.a ../../deps/lib +cp ssl/.libs/libssl.a ../../deps/lib +cd .. \ No newline at end of file diff --git a/scripts/build.openssl.sh b/scripts/build.openssl.sh new file mode 100755 index 00000000..5939eb57 --- /dev/null +++ b/scripts/build.openssl.sh @@ -0,0 +1,20 @@ +#!/bin/bash -e + +OPENSSL_VERSION="1.1.1g" + +mkdir -p deps +mkdir -p deps/include +mkdir -p deps/lib + +mkdir -p build && cd build + +wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz -O openssl-${OPENSSL_VERSION}.tar.gz +tar -xzf openssl-${OPENSSL_VERSION}.tar.gz + +cd openssl-${OPENSSL_VERSION} +./config -no-shared -no-asm -no-zlib -no-comp -no-dgram -no-filenames -no-cms +make -j$(nproc) +cp -fr include/ ../../deps +cp libcrypto.a ../../deps/lib +cp libssl.a ../../deps/lib +cd .. \ No newline at end of file diff --git a/scripts/build.uv.sh b/scripts/build.uv.sh new file mode 100755 index 00000000..42590497 --- /dev/null +++ b/scripts/build.uv.sh @@ -0,0 +1,20 @@ +#!/bin/bash -e + +UV_VERSION="1.38.0" + +mkdir -p deps +mkdir -p deps/include +mkdir -p deps/lib + +mkdir -p build && cd build + +wget https://github.com/libuv/libuv/archive/v${UV_VERSION}.tar.gz -O v${UV_VERSION}.tar.gz +tar -xzf v${UV_VERSION}.tar.gz + +cd libuv-${UV_VERSION} +sh autogen.sh +./configure --disable-shared +make -j$(nproc) +cp -fr include/ ../../deps +cp .libs/libuv.a ../../deps/lib +cd .. \ No newline at end of file diff --git a/scripts/build_deps.sh b/scripts/build_deps.sh index 7c4fc3da..e3efbf23 100755 --- a/scripts/build_deps.sh +++ b/scripts/build_deps.sh @@ -1,43 +1,5 @@ #!/bin/bash -e -UV_VERSION="1.34.0" -OPENSSL_VERSION="1.1.1d" -HWLOC_VERSION="2.1.0" - -mkdir deps -mkdir deps/include -mkdir deps/lib - -mkdir build && cd build - -wget https://github.com/libuv/libuv/archive/v${UV_VERSION}.tar.gz -tar -xzf v${UV_VERSION}.tar.gz - -wget https://download.open-mpi.org/release/hwloc/v2.1/hwloc-${HWLOC_VERSION}.tar.bz2 -tar -xjf hwloc-${HWLOC_VERSION}.tar.bz2 - -wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz -tar -xzf openssl-${OPENSSL_VERSION}.tar.gz - -cd libuv-${UV_VERSION} -sh autogen.sh -./configure --disable-shared -make -j$(nproc) -cp -fr include/ ../../deps -cp .libs/libuv.a ../../deps/lib -cd .. - -cd hwloc-${HWLOC_VERSION} -./configure --disable-shared --enable-static --disable-io --disable-libudev --disable-libxml2 -make -j$(nproc) -cp -fr include/ ../../deps -cp hwloc/.libs/libhwloc.a ../../deps/lib -cd .. - -cd openssl-${OPENSSL_VERSION} -./config -no-shared -no-asm -no-zlib -no-comp -no-dgram -no-filenames -no-cms -make -j$(nproc) -cp -fr include/ ../../deps -cp libcrypto.a ../../deps/lib -cp libssl.a ../../deps/lib -cd ../.. \ No newline at end of file +./build.uv.sh +./build.hwloc.sh +./build.openssl.sh \ No newline at end of file