From 2c15463c0321669b1d489fbdfe79fe5be790ad6b Mon Sep 17 00:00:00 2001
From: EamonZhang <zhang.eamon@hotmail.com>
Date: Mon, 4 Sep 2023 09:59:24 +0800
Subject: [PATCH] chore(stacks): change mysql buid path

---
 stacks/mysql/build.sh | 68 +++++++++++++++++++++----------------------
 1 file changed, 34 insertions(+), 34 deletions(-)

diff --git a/stacks/mysql/build.sh b/stacks/mysql/build.sh
index e00b46f..25e609b 100755
--- a/stacks/mysql/build.sh
+++ b/stacks/mysql/build.sh
@@ -10,7 +10,7 @@ function build() {
   MYSQL_VERSION=$STACK_VERSION
   MYSQL_MAJOR=$(echo "${MYSQL_VERSION}"|cut -d"." -f1-2)
 
-  mkdir -p /opt/drycc/mysql-${MYSQL_MAJOR}/
+  mkdir -p /opt/drycc/mysql
 
 # computer cpu numbers
   numcpu=$(cat /proc/cpuinfo | grep processor | wc -l)
@@ -40,44 +40,44 @@ function build() {
   tar --no-same-owner -xf mysql-${MYSQL_VERSION}.tar.gz
   cd mysql-${MYSQL_VERSION}
 
-  cmake  -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/tmp/boost/ -DBUILD_CONFIG=mysql_release -DWITH_AUTHENTICATION_LDAP=1 -DCMAKE_INSTALL_PREFIX=/opt/drycc/mysql-${MYSQL_MAJOR} -DSYSCONFDIR=/opt/drycc/mysql-${MYSQL_MAJOR}/conf -DDEFAULT_SYSCONFDIR=/opt/drycc/mysql-${MYSQL_MAJOR}/conf -DFORCE_INSOURCE_BUILD=1
+  cmake  -DDOWNLOAD_BOOST=1 -DWITH_BOOST=/tmp/boost/ -DBUILD_CONFIG=mysql_release -DWITH_AUTHENTICATION_LDAP=1 -DCMAKE_INSTALL_PREFIX=/opt/drycc/mysql -DSYSCONFDIR=/opt/drycc/mysql/conf -DDEFAULT_SYSCONFDIR=/opt/drycc/mysql/conf -DFORCE_INSOURCE_BUILD=1
   make  --jobs=$numcpu
   make  install --jobs=$numcpu
   make  clean
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/comp_err
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/ibd2sdi
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/innochecksum
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/lz4_decompress
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/my_print_defaults
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/myisam_ftdump
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/myisamchk
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/myisamlog
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/myisampack
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysql
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysql_config_editor
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysql_migrate_keyring
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysql_secure_installation
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysql_ssl_rsa_setup
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysql_tzinfo_to_sql
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysql_upgrade
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysqladmin
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysqlbinlog
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysqlcheck
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysqld
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysqldump
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysqlimport
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysqlpump
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysqlrouter
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysqlrouter_keyring
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysqlrouter_passwd
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysqlrouter_plugin_info
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysqlshow
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/mysqlslap
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/perror
-  strip  /opt/drycc/mysql-${MYSQL_MAJOR}/bin/zlib_decompress
+  strip  /opt/drycc/mysql/bin/comp_err
+  strip  /opt/drycc/mysql/bin/ibd2sdi
+  strip  /opt/drycc/mysql/bin/innochecksum
+  strip  /opt/drycc/mysql/bin/lz4_decompress
+  strip  /opt/drycc/mysql/bin/my_print_defaults
+  strip  /opt/drycc/mysql/bin/myisam_ftdump
+  strip  /opt/drycc/mysql/bin/myisamchk
+  strip  /opt/drycc/mysql/bin/myisamlog
+  strip  /opt/drycc/mysql/bin/myisampack
+  strip  /opt/drycc/mysql/bin/mysql
+  strip  /opt/drycc/mysql/bin/mysql_config_editor
+  strip  /opt/drycc/mysql/bin/mysql_migrate_keyring
+  strip  /opt/drycc/mysql/bin/mysql_secure_installation
+  strip  /opt/drycc/mysql/bin/mysql_ssl_rsa_setup
+  strip  /opt/drycc/mysql/bin/mysql_tzinfo_to_sql
+  strip  /opt/drycc/mysql/bin/mysql_upgrade
+  strip  /opt/drycc/mysql/bin/mysqladmin
+  strip  /opt/drycc/mysql/bin/mysqlbinlog
+  strip  /opt/drycc/mysql/bin/mysqlcheck
+  strip  /opt/drycc/mysql/bin/mysqld
+  strip  /opt/drycc/mysql/bin/mysqldump
+  strip  /opt/drycc/mysql/bin/mysqlimport
+  strip  /opt/drycc/mysql/bin/mysqlpump
+  strip  /opt/drycc/mysql/bin/mysqlrouter
+  strip  /opt/drycc/mysql/bin/mysqlrouter_keyring
+  strip  /opt/drycc/mysql/bin/mysqlrouter_passwd
+  strip  /opt/drycc/mysql/bin/mysqlrouter_plugin_info
+  strip  /opt/drycc/mysql/bin/mysqlshow
+  strip  /opt/drycc/mysql/bin/mysqlslap
+  strip  /opt/drycc/mysql/bin/perror
+  strip  /opt/drycc/mysql/bin/zlib_decompress
 
   # copy mysql build files to data dir
-  cp -r /opt/drycc/mysql-${MYSQL_MAJOR}/ ${DATA_DIR}/
+  cp -r /opt/drycc/mysql/ ${DATA_DIR}/
 
   # clean tmp data
   cd .. && rm -rf mysql-${MYSQL_VERSION} mysql-${MYSQL_VERSION}.tar.gz 
