-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgreatsql-setenv.sh
More file actions
executable file
·52 lines (47 loc) · 2.11 KB
/
greatsql-setenv.sh
File metadata and controls
executable file
·52 lines (47 loc) · 2.11 KB
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
#/bin/sh
if [ -f ~/.bash_profile ] ; then
. ~/.bash_profile
fi
MAKE_JOBS=`lscpu | grep '^CPU(s):'|awk '{print $NF}'`
if [ ${MAKE_JOBS} -ge 16 ] ; then
MAKE_JOBS=`expr ${MAKE_JOBS} - 4`
else
MAKE_JOBS=`expr ${MAKE_JOBS} - 1`
fi
MAJOR_VERSION=8
MINOR_VERSION=4
PATCH_VERSION=4
RELEASE=4
REVISION=d73de75905d
OPT_DIR=/opt
GLIBC=`ldd --version | head -n 1 | awk '{print $NF}'`
ARCH=`uname -p`
OS=`grep '^ID=' /etc/os-release | sed 's/.*"\(.*\)".*/\1/ig'`
GREATSQL=GreatSQL-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-${RELEASE}-${OS}-glibc${GLIBC}-${ARCH}
MAKELOG=/tmp/greatsql-automake.log
MYSQL_USER=mysql
DEST_DIR=${OPT_DIR}/${GREATSQL}
GREATSQL_SRC=greatsql-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-${RELEASE}
GREATSQL_BUILD_DOWNLOAD_URL="https://gitee.com/GreatSQL/GreatSQL-Docker/raw/greatsql-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-${RELEASE}/deppkgs"
GREATSQL_MAKESH_DOWNLOAD_URL="https://gitee.com/GreatSQL/GreatSQL-Docker/raw/greatsql-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-${RELEASE}/GreatSQL-Build"
GREATSQL_SRC_DOWNLOAD_URL="https://product.greatdb.com/GreatSQL-${MAJOR_VERSION}.${MINOR_VERSION}.${PATCH_VERSION}-${RELEASE}"
#BOOST_SRC_DOWNLOAD_URL="https://archives.boost.io/release/1.77.0/source/"
BOOST_SRC_DOWNLOAD_URL="https://sourceforge.net/projects/boost/files/boost/1.77.0/"
BOOST="boost_1_77_0"
PATCHELF="patchelf-0.14.5"
GREATSQL_ENV="greatsql-setenv.sh"
GREATSQL_MAKESH="greatsql-automake.sh"
if [ "`uname -p`" = "aarch64" ] ; then
RPCGEN="rpcgen-1.3.1-4.el8.aarch64.rpm"
else
RPCGEN="rpcgen-1.3.1-4.el8.x86_64.rpm"
fi
CMAKE_EXE_LINKER_FLAGS=""
if [ ${ARCH} = "x86_64" ] ; then
CMAKE_EXE_LINKER_FLAGS=" -ljemalloc "
fi
DEPS="autoconf automake binutils bison bzip2 cmake cyrus-sasl-devel cyrus-sasl-scram \
gcc-c++ gcc-toolset-11 gcc-toolset-11-annobin-plugin-gcc gcc-toolset-11-libatomic-devel \
jemalloc jemalloc-devel krb5-devel libaio-devel libatomic libcurl-devel libicu libicu-devel libtirpc-devel \
libudev-devel m4 make ncurses-devel numactl-devel openldap-devel openssl openssl-devel \
pam-devel patchelf perl protobuf-lite readline-devel zlib-devel findutils procps-ng xz"