summaryrefslogtreecommitdiff
path: root/scripts/make_binary_distribution.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/make_binary_distribution.sh')
-rw-r--r--scripts/make_binary_distribution.sh538
1 files changed, 270 insertions, 268 deletions
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index 83d7e237a54..8d3e2133a45 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -14,36 +14,59 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-# This is a script to create a TAR or ZIP binary distribution out of a
-# built source tree. The output file will be put at the top level of
-# the source tree, as "mysql-<vsn>....{tar.gz,zip}"
+##############################################################################
#
-# The temporary directory path given to "--tmp=<path>" has to be
-# absolute and with no spaces.
+# This is a script to create a TAR or ZIP binary distribution out of a
+# built source tree. The output file will be put at the top level of
+# the source tree, as "mysql-<vsn>....{tar.gz,zip}"
+#
+# Note that the structure created by this script is slightly different from
+# what a normal "make install" would produce. No extra "mysql" sub directory
+# will be created, i.e. no "$prefix/include/mysql", "$prefix/lib/mysql" or
+# "$prefix/share/mysql".
+#
+# In GNU make/automake terms
+#
+# "pkglibdir" is set to the same as "libdir"
+# "pkgincludedir" is set to the same as "includedir"
+# "pkgdatadir" is set to the same as "datadir"
+# "pkgsuppdir" is set to "@prefix@/support-files",
+# normally the same as "datadir"
+#
+# The temporary directory path given to "--tmp=<path>" has to be
+# absolute and with no spaces.
+#
+# Note that for best result, the original "make" should be done with
+# the same arguments as used for "make install" below, especially the
+# 'pkglibdir', as the RPATH should to be set correctly.
+#
+##############################################################################
+
+##############################################################################
+#
+# Read the command line arguments that control this script
+#
+##############################################################################
machine=@MACHINE_TYPE@
system=@SYSTEM_TYPE@
-version=@VERSION@
SOURCE=`pwd`
CP="cp -p"
MV="mv"
-STRIP=1
-DEBUG=0
+STRIP=1 # Option ignored
SILENT=0
-MACHINE=""
PLATFORM=""
TMP=/tmp
SUFFIX=""
-NDBCLUSTER=""
+NDBCLUSTER="" # Option ignored
for arg do
case "$arg" in
- --debug) DEBUG=1;;
--tmp=*) TMP=`echo "$arg" | sed -e "s;--tmp=;;"` ;;
--suffix=*) SUFFIX=`echo "$arg" | sed -e "s;--suffix=;;"` ;;
--no-strip) STRIP=0 ;;
- --machine=*) MACHINE=`echo "$arg" | sed -e "s;--machine=;;"` ;;
+ --machine=*) machine=`echo "$arg" | sed -e "s;--machine=;;"` ;;
--platform=*) PLATFORM=`echo "$arg" | sed -e "s;--platform=;;"` ;;
--silent) SILENT=1 ;;
--with-ndbcluster) NDBCLUSTER=1 ;;
@@ -54,88 +77,222 @@ for arg do
esac
done
-# Avoid too long command lines for cp (bug#27489)
-MCP() {
- for i
- do
- last=$i
- done
- for i
+# ----------------------------------------------------------------------
+# Adjust "system" output from "uname" to be more human readable
+# ----------------------------------------------------------------------
+
+if [ x"$PLATFORM" = x"" ] ; then
+ # FIXME move this to the build tools
+ # Remove vendor from $system
+ system=`echo $system | sed -e 's/[a-z]*-\(.*\)/\1/g'`
+
+ # Map OS names to "our" OS names (eg. darwin6.8 -> osx10.2)
+ system=`echo $system | sed -e 's/darwin6.*/osx10.2/g'`
+ system=`echo $system | sed -e 's/darwin7.*/osx10.3/g'`
+ system=`echo $system | sed -e 's/darwin8.*/osx10.4/g'`
+ system=`echo $system | sed -e 's/\(aix4.3\).*/\1/g'`
+ system=`echo $system | sed -e 's/\(aix5.1\).*/\1/g'`
+ system=`echo $system | sed -e 's/\(aix5.2\).*/\1/g'`
+ system=`echo $system | sed -e 's/\(aix5.3\).*/\1/g'`
+ system=`echo $system | sed -e 's/osf5.1b/tru64/g'`
+ system=`echo $system | sed -e 's/linux-gnu/linux/g'`
+ system=`echo $system | sed -e 's/solaris2.\([0-9]*\)/solaris\1/g'`
+ system=`echo $system | sed -e 's/sco3.2v\(.*\)/openserver\1/g'`
+
+ PLATFORM="$system-$machine"
+fi
+
+# Print the platform name for build logs
+echo "PLATFORM NAME: $PLATFORM"
+
+case $PLATFORM in
+ *netware*) BASE_SYSTEM="netware" ;;
+esac
+
+# Change the distribution to a long descriptive name
+NEW_NAME=mysql@MYSQL_SERVER_SUFFIX@-@VERSION@-$PLATFORM$SUFFIX
+
+# ----------------------------------------------------------------------
+# Define BASE, and remove the old BASE directory if any
+# ----------------------------------------------------------------------
+BASE=$TMP/my_dist$SUFFIX
+if [ -d $BASE ] ; then
+ rm -rf $BASE
+fi
+
+# ----------------------------------------------------------------------
+# Find the TAR to use
+# ----------------------------------------------------------------------
+
+# This is needed to prefer GNU tar over platform tar because that can't
+# always handle long filenames
+
+PATH_DIRS=`echo $PATH | \
+ sed -e 's/^:/. /' -e 's/:$/ ./' -e 's/::/ . /g' -e 's/:/ /g' `
+
+which_1 ()
+{
+ for cmd
do
- if test "x$i" != "x$last"
- then
- cp -p $i $last
- fi
+ for d in $PATH_DIRS
+ do
+ for file in $d/$cmd
+ do
+ if [ -x $file -a ! -d $file ] ; then
+ echo $file
+ exit 0
+ fi
+ done
+ done
done
+ exit 1
}
-# Remove vendor from $system
-system=`echo $system | sed -e 's/[a-z]*-\(.*\)/\1/g'`
-
-# Map OS names to "our" OS names (eg. darwin6.8 -> osx10.2)
-system=`echo $system | sed -e 's/darwin6.*/osx10.2/g'`
-system=`echo $system | sed -e 's/darwin7.*/osx10.3/g'`
-system=`echo $system | sed -e 's/darwin8.*/osx10.4/g'`
-system=`echo $system | sed -e 's/\(aix4.3\).*/\1/g'`
-system=`echo $system | sed -e 's/\(aix5.1\).*/\1/g'`
-system=`echo $system | sed -e 's/\(aix5.2\).*/\1/g'`
-system=`echo $system | sed -e 's/\(aix5.3\).*/\1/g'`
-system=`echo $system | sed -e 's/osf5.1b/tru64/g'`
-system=`echo $system | sed -e 's/linux-gnu/linux/g'`
-system=`echo $system | sed -e 's/solaris2.\([0-9]*\)/solaris\1/g'`
-system=`echo $system | sed -e 's/sco3.2v\(.*\)/openserver\1/g'`
-
-if [ x"$MACHINE" != x"" ] ; then
- machine=$MACHINE
+tar=`which_1 gnutar gtar`
+if [ $? -ne 0 -o x"$tar" = x"" ] ; then
+ tar=tar
fi
-if [ x"$PLATFORM" != x"" ] ; then
- platform="$PLATFORM"
-else
- platform="$system-$machine"
-fi
-# FIXME This should really be integrated with automake and not duplicate the
-# installation list.
+##############################################################################
+#
+# Handle the Unix/Linux packaging using "make install"
+#
+##############################################################################
+
+if [ x"$BASE_SYSTEM" != x"netware" ] ; then
+
+ # ----------------------------------------------------------------------
+ # Terminate on any base level error
+ # ----------------------------------------------------------------------
+ set -e
+
+ # ----------------------------------------------------------------------
+ # Really ugly, one script, "mysql_install_db", needs prefix set to ".",
+ # i.e. makes access relative the current directory. This matches
+ # the documentation, so better not change this. And for another script,
+ # "mysql.server", we make some relative, others not.
+ # ----------------------------------------------------------------------
+
+ cd scripts
+ rm -f mysql_install_db
+ @MAKE@ mysql_install_db \
+ prefix=. \
+ bindir=./bin \
+ sbindir=./bin \
+ scriptdir=./bin \
+ libexecdir=./bin \
+ pkgdatadir=./share \
+ localstatedir=./data
+ cd ..
+
+ cd support-files
+ rm -f mysql.server
+ @MAKE@ mysql.server \
+ bindir=./bin \
+ sbindir=./bin \
+ scriptdir=./bin \
+ libexecdir=./bin \
+ pkgdatadir=@pkgdatadir@
+ cd ..
+
+ # ----------------------------------------------------------------------
+ # Do a install that we later are to pack. Use the same paths as in
+ # the build for the relevant directories.
+ # ----------------------------------------------------------------------
+ @MAKE@ DESTDIR=$BASE install \
+ pkglibdir=@pkglibdir@ \
+ pkgincludedir=@pkgincludedir@ \
+ pkgdatadir=@pkgdatadir@ \
+ pkgsuppdir=@pkgsuppdir@ \
+ mandir=@mandir@ \
+ infodir=@infodir@
+
+ # ----------------------------------------------------------------------
+ # Rename top directory, and set DEST to the new directory
+ # ----------------------------------------------------------------------
+ mv $BASE@prefix@ $BASE/$NEW_NAME
+ DEST=$BASE/$NEW_NAME
+
+ # ----------------------------------------------------------------------
+ # If we compiled with gcc, copy libgcc.a to the dist as libmygcc.a
+ # ----------------------------------------------------------------------
+ if [ x"@GXX@" = x"yes" ] ; then
+ gcclib=`@CC@ @CFLAGS@ --print-libgcc-file`
+ if [ $? -ne 0 ] ; then
+ echo "Warning: Couldn't find libgcc.a!"
+ else
+ $CP $gcclib $DEST/lib/libmygcc.a
+ fi
+ fi
+
+ # FIXME let this script be in "bin/", where it is in the RPMs?
+ # http://dev.mysql.com/doc/refman/5.1/en/mysql-install-db-problems.html
+ mkdir $DEST/scripts
+ mv $DEST/bin/mysql_install_db $DEST/scripts/
-BASE=$TMP/my_dist$SUFFIX
+ # Note, no legacy "safe_mysqld" link to "mysqld_safe" in 5.1
-if [ -d $BASE ] ; then
- rm -rf $BASE
+ # Copy readme and license files
+ cp README Docs/INSTALL-BINARY $DEST/
+ if [ -f COPYING -a -f EXCEPTIONS-CLIENT ] ; then
+ cp COPYING EXCEPTIONS-CLIENT $DEST/
+ elif [ -f LICENSE.mysql ] ; then
+ cp LICENSE.mysql $DEST/
+ else
+ echo "ERROR: no license files found"
+ exit 1
+ fi
+
+ # FIXME should be handled by make file, and to other dir
+ mkdir -p $DEST/bin $DEST/support-files
+ cp scripts/mysqlaccess.conf $DEST/bin/
+ cp support-files/magic $DEST/support-files/
+
+ # Create empty data directories, set permission (FIXME why?)
+ mkdir $DEST/data $DEST/data/mysql $DEST/data/test
+ chmod o-rwx $DEST/data $DEST/data/mysql $DEST/data/test
+
+ # ----------------------------------------------------------------------
+ # Create the result tar file
+ # ----------------------------------------------------------------------
+
+ echo "Using $tar to create archive"
+ OPT=cvf
+ if [ x$SILENT = x1 ] ; then
+ OPT=cf
+ fi
+
+ echo "Creating and compressing archive"
+ rm -f $NEW_NAME.tar.gz
+ (cd $BASE ; $tar $OPT - $NEW_NAME) | gzip -9 > $NEW_NAME.tar.gz
+ echo "$NEW_NAME.tar.gz created"
+
+ echo "Removing temporary directory"
+ rm -rf $BASE
+ exit 0
fi
-BS=""
-BIN_FILES=""
-BASE_SYSTEM="any"
-MYSQL_SHARE=$BASE/share/mysql
-
-case $system in
- *netware*)
- BASE_SYSTEM="netware"
- BS=".nlm"
- MYSQL_SHARE=$BASE/share
- ;;
-esac
+##############################################################################
+#
+# Handle the Netware case, until integrated above
+#
+##############################################################################
+
+BS=".nlm"
+MYSQL_SHARE=$BASE/share
mkdir $BASE $BASE/bin $BASE/docs \
$BASE/include $BASE/lib $BASE/support-files $BASE/share $BASE/scripts \
$BASE/mysql-test $BASE/mysql-test/t $BASE/mysql-test/r \
$BASE/mysql-test/include $BASE/mysql-test/std_data $BASE/mysql-test/lib \
- $BASE/mysql-test/extra \
- $BASE/mysql-test/extra/binlog_tests $BASE/mysql-test/extra/rpl_tests
-
-if [ $BASE_SYSTEM != "netware" ] ; then
- mkdir $BASE/share/mysql $BASE/tests $BASE/sql-bench $BASE/man \
- $BASE/man/man1 $BASE/man/man8 $BASE/data $BASE/data/mysql $BASE/data/test
-
- chmod o-rwx $BASE/data $BASE/data/*
-fi
+ $BASE/mysql-test/suite
# Copy files if they exists, warn for those that don't.
# Note that when listing files to copy, we might list the file name
-# twice, once in the directory location where it is build, and a
-# second time in the ".libs" location. In the case the firs one
+# twice, once in the directory location where it is built, and a
+# second time in the ".libs" location. In the case the first one
# is a wrapper script, the second one will overwrite it with the
# binary file.
copyfileto()
@@ -179,41 +336,16 @@ BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \
";
# Platform-specific bin dir files:
-if [ $BASE_SYSTEM = "netware" ] ; then
- BIN_FILES="$BIN_FILES \
+BIN_FILES="$BIN_FILES \
netware/mysqld_safe$BS netware/mysql_install_db$BS \
- netware/init_db.sql netware/test_db.sql$BS \
+ netware/init_db.sql netware/test_db.sql \
netware/mysqlhotcopy$BS netware/libmysql$BS netware/init_secure_db.sql \
";
-# For all other platforms:
-else
- BIN_FILES="$BIN_FILES \
- server-tools/instance-manager/.libs/mysqlmanager \
- client/.libs/mysql client/.libs/mysqlshow client/.libs/mysqladmin \
- client/.libs/mysqlslap \
- client/.libs/mysqldump client/.libs/mysqlimport \
- client/.libs/mysqltest client/.libs/mysqlcheck \
- client/.libs/mysqlbinlog \
- tests/.libs/mysql_client_test \
- libmysqld/examples/.libs/mysql_client_test_embedded \
- libmysqld/examples/.libs/mysqltest_embedded \
- ";
-fi
copyfileto $BASE/bin $BIN_FILES
-if [ x$STRIP = x1 ] ; then
- strip $BASE/bin/*
-fi
-
-# Obsolete, starting from 5.1.6-beta
-# # Copy not binary files
-# copyfileto $BASE/bin sql/mysqld.sym.gz
-
-if [ $BASE_SYSTEM = "netware" ] ; then
- $CP netware/*.pl $BASE/scripts
- $CP scripts/mysqlhotcopy $BASE/scripts/mysqlhotcopy.pl
-fi
+$CP netware/*.pl $BASE/scripts
+$CP scripts/mysqlhotcopy $BASE/scripts/mysqlhotcopy.pl
copyfileto $BASE/lib \
libmysql/.libs/libmysqlclient.a \
@@ -235,31 +367,17 @@ copyfileto $BASE/lib \
zlib/.libs/libz.a
# convert the .a to .lib for NetWare
-if [ $BASE_SYSTEM = "netware" ] ; then
- for i in $BASE/lib/*.a
- do
- libname=`basename $i .a`
- $MV $i $BASE/lib/$libname.lib
- done
- rm -f $BASE/lib/*.la
-fi
+for i in $BASE/lib/*.a
+do
+ libname=`basename $i .a`
+ $MV $i $BASE/lib/$libname.lib
+done
+rm -f $BASE/lib/*.la
+
copyfileto $BASE/include config.h include/*
rm -f $BASE/include/Makefile* $BASE/include/*.in $BASE/include/config-win.h
-if [ $BASE_SYSTEM != "netware" ] ; then
- rm -f $BASE/include/config-netware.h
-fi
-
-if [ $BASE_SYSTEM != "netware" ] ; then
- if [ -d tests ] ; then
- $CP tests/*.res tests/*.tst tests/*.pl $BASE/tests
- fi
- if [ -d man ] ; then
- $CP man/*.1 $BASE/man/man1
- $CP man/*.8 $BASE/man/man8
- fi
-fi
copyfileto $BASE/support-files support-files/*
@@ -271,48 +389,33 @@ rm -f $MYSQL_SHARE/Makefile* $MYSQL_SHARE/*/*.OLD
copyfileto $BASE/mysql-test \
mysql-test/mysql-test-run mysql-test/install_test_db \
mysql-test/mysql-test-run.pl mysql-test/README \
- mysql-test/valgrind.supp \
+ mysql-test/mysql-stress-test.pl \
+ mysql-test/valgrind.supp \
netware/mysql_test_run.nlm netware/install_test_db.ncf
-MCP mysql-test/lib/*.pl $BASE/mysql-test/lib
-MCP mysql-test/t/*.def $BASE/mysql-test/t
-MCP mysql-test/include/*.inc $BASE/mysql-test/include
-MCP mysql-test/include/*.test $BASE/mysql-test/include
-MCP mysql-test/t/*.def $BASE/mysql-test/t
-MCP mysql-test/std_data/*.dat mysql-test/std_data/*.frm \
+$CP mysql-test/lib/*.pl $BASE/mysql-test/lib
+$CP mysql-test/t/*.def $BASE/mysql-test/t
+$CP mysql-test/include/*.inc $BASE/mysql-test/include
+$CP mysql-test/include/*.test $BASE/mysql-test/include
+$CP mysql-test/t/*.def $BASE/mysql-test/t
+$CP mysql-test/std_data/*.dat mysql-test/std_data/*.frm \
mysql-test/std_data/*.MYD mysql-test/std_data/*.MYI \
mysql-test/std_data/*.pem mysql-test/std_data/Moscow_leap \
+ mysql-test/std_data/Index.xml \
mysql-test/std_data/des_key_file mysql-test/std_data/*.*001 \
mysql-test/std_data/*.cnf mysql-test/std_data/*.MY* \
$BASE/mysql-test/std_data
-MCP mysql-test/t/*.test $BASE/mysql-test/t
-MCP mysql-test/t/*.imtest mysql-test/t/*.disabled $BASE/mysql-test/t
-MCP mysql-test/t/*.opt mysql-test/t/*.slave-mi $BASE/mysql-test/t
-MCP mysql-test/t/*.sh mysql-test/t/*.sql $BASE/mysql-test/t
-MCP mysql-test/r/*.result $BASE/mysql-test/r
-MCP mysql-test/r/*.require $BASE/mysql-test/r
-MCP mysql-test/extra/binlog_tests/*.test $BASE/mysql-test/extra/binlog_tests
-MCP mysql-test/extra/rpl_tests/*.test $BASE/mysql-test/extra/rpl_tests
-
-if [ $BASE_SYSTEM != "netware" ] ; then
- chmod a+x $BASE/bin/*
- copyfileto $BASE/bin scripts/*
- $BASE/bin/replace \@localstatedir\@ ./data \@bindir\@ ./bin \@scriptdir\@ \
- ./bin \@libexecdir\@ ./bin \@sbindir\@ ./bin \@prefix\@ . \@HOSTNAME\@ \
- @HOSTNAME@ \@pkgdatadir\@ ./support-files \
- < scripts/mysql_install_db.sh > $BASE/scripts/mysql_install_db
- $BASE/bin/replace \@prefix\@ /usr/local/mysql \@bindir\@ ./bin \
- \@sbindir\@ ./bin \@libexecdir\@ ./bin \
- \@MYSQLD_USER\@ @MYSQLD_USER@ \@localstatedir\@ /usr/local/mysql/data \
- \@HOSTNAME\@ @HOSTNAME@ \
- < support-files/mysql.server.sh > $BASE/support-files/mysql.server
- $BASE/bin/replace /my/gnu/bin/hostname /bin/hostname -- $BASE/bin/mysqld_safe
- mv $BASE/support-files/binary-configure $BASE/configure
- chmod a+x $BASE/bin/* $BASE/scripts/* $BASE/support-files/mysql-* \
- $BASE/support-files/mysql.server $BASE/configure
- $CP -r sql-bench/* $BASE/sql-bench
- rm -f $BASE/sql-bench/*.sh $BASE/sql-bench/Makefile* $BASE/lib/*.la
- rm -f $BASE/bin/*.sql
+$CP mysql-test/t/*.test mysql-test/t/*.imtest \
+ mysql-test/t/*.disabled mysql-test/t/*.opt \
+ mysql-test/t/*.slave-mi mysql-test/t/*.sh mysql-test/t/*.sql $BASE/mysql-test/t
+$CP mysql-test/r/*.result mysql-test/r/*.require \
+ $BASE/mysql-test/r
+
+# Copy the additional suites "as is", they are in flux
+$tar cf - mysql-test/suite | ( cd $BASE ; $tar xf - )
+# Clean up if we did this from a bk tree
+if [ -d mysql-test/SCCS ] ; then
+ find $BASE/mysql-test -name SCCS -print | xargs rm -rf
fi
rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh \
@@ -323,138 +426,37 @@ rm -f $BASE/bin/Makefile* $BASE/bin/*.in $BASE/bin/*.sh \
#
# Copy system dependent files
#
-if [ $BASE_SYSTEM = "netware" ] ; then
- ./scripts/fill_help_tables < ./Docs/manual.texi >> ./netware/init_db.sql
-fi
+./scripts/fill_help_tables < ./Docs/manual.texi >> ./netware/init_db.sql
#
# Remove system dependent files
#
-if [ $BASE_SYSTEM = "netware" ] ; then
- rm -f $BASE/support-files/magic \
+rm -f $BASE/support-files/magic \
$BASE/support-files/mysql.server \
$BASE/support-files/mysql*.spec \
$BASE/support-files/mysql-log-rotate \
$BASE/support-files/binary-configure \
$BASE/support-files/build-tags \
$BASE/support-files/MySQL-shared-compat.spec \
- $BASE/support-files/ndb-config-2-node.ini \
$BASE/INSTALL-BINARY
-fi
-
-# Make safe_mysqld a symlink to mysqld_safe for backwards portability
-if [ $BASE_SYSTEM != "netware" ] ; then
- (cd $BASE/bin ; ln -s mysqld_safe safe_mysqld )
-fi
# Clean up if we did this from a bk tree
-if [ -d $BASE/share/SCCS ] ; then
+if [ -d $BASE/sql-bench/SCCS ] ; then
find $BASE/share -name SCCS -print | xargs rm -rf
find $BASE/sql-bench -name SCCS -print | xargs rm -rf
fi
-# NDB Cluster
-if [ x$NDBCLUSTER = x1 ]; then
- ( cd storage/ndb ; @MAKE@ DESTDIR=$BASE/ndb-stage install )
- ( cd mysql-test ; @MAKE@ DESTDIR=$BASE/ndb-stage install )
- $CP $BASE/ndb-stage@bindir@/* $BASE/bin/.
- $CP $BASE/ndb-stage@libexecdir@/* $BASE/bin/.
- $CP $BASE/ndb-stage@pkglibdir@/* $BASE/lib/.
- $CP $BASE/ndb-stage@pkgdatadir@/* $BASE/share/mysql/.
- test -d $BASE/include/storage || mkdir $BASE/include/storage
- $CP -r $BASE/ndb-stage@pkgincludedir@/storage/ndb $BASE/include/storage/
- $CP -r $BASE/ndb-stage@prefix@/mysql-test/ndb $BASE/mysql-test/. || exit 1
- $CP -r $BASE/ndb-stage@prefix@/mysql-test/std_data/ndb_backup50 $BASE/mysql-test/std_data/. || exit 1
- $CP -r $BASE/ndb-stage@prefix@/mysql-test/std_data/ndb_backup51 $BASE/mysql-test/std_data/. || exit 1
- rm -rf $BASE/ndb-stage
-fi
-
-# Change the distribution to a long descriptive name
-NEW_NAME=mysql@MYSQL_SERVER_SUFFIX@-$version-$platform$SUFFIX
-
-# Print the platform name for build logs
-echo "PLATFORM NAME: $platform"
-
BASE2=$TMP/$NEW_NAME
rm -rf $BASE2
mv $BASE $BASE2
BASE=$BASE2
+
#
-# If we are compiling with gcc, copy libgcc.a to the distribution as libmygcc.a
+# Create a zip file for NetWare users
#
-
-if [ x"@GXX@" = x"yes" ] ; then
- gcclib=`@CC@ @CFLAGS@ --print-libgcc-file`
- if [ $? -ne 0 ] ; then
- echo "Warning: Couldn't find libgcc.a!"
- else
- $CP $gcclib $BASE/lib/libmygcc.a
- fi
-fi
-
-#if we are debugging, do not do tar/gz
-if [ x$DEBUG = x1 ] ; then
- exit
-fi
-
-# This is needed to prefere gnu tar instead of tar because tar can't
-# always handle long filenames
-
-PATH_DIRS=`echo $PATH | \
- sed -e 's/^:/. /' -e 's/:$/ ./' -e 's/::/ . /g' -e 's/:/ /g' `
-
-which_1 ()
-{
- for cmd
- do
- for d in $PATH_DIRS
- do
- for file in $d/$cmd
- do
- if [ -x $file -a ! -d $file ] ; then
- echo $file
- exit 0
- fi
- done
- done
- done
- exit 1
-}
-
-if [ $BASE_SYSTEM != "netware" ] ; then
-
- #
- # Create the result tar file
- #
-
- tar=`which_1 gnutar gtar`
- if [ "$?" = "1" -o x"$tar" = x"" ] ; then
- tar=tar
- fi
-
- echo "Using $tar to create archive"
-
- OPT=cvf
- if [ x$SILENT = x1 ] ; then
- OPT=cf
- fi
-
- echo "Creating and compressing archive"
- rm -f $NEW_NAME.tar.gz
- (cd $TMP ; $tar $OPT - $NEW_NAME) | gzip -9 > $NEW_NAME.tar.gz
- echo "$NEW_NAME.tar.gz created"
-
-else
-
- #
- # Create a zip file for NetWare users
- #
-
- rm -f $NEW_NAME.zip
- (cd $TMP; zip -r "$SOURCE/$NEW_NAME.zip" $NEW_NAME)
- echo "$NEW_NAME.zip created"
-
-fi
+rm -f $NEW_NAME.zip
+(cd $TMP; zip -r "$SOURCE/$NEW_NAME.zip" $NEW_NAME)
+echo "$NEW_NAME.zip created"
echo "Removing temporary directory"
rm -rf $BASE