Merge
This commit is contained in:
commit
75e74c79ec
@ -36,6 +36,7 @@ bin_SCRIPTS = @server_scripts@ \
|
|||||||
make_win_src_distribution
|
make_win_src_distribution
|
||||||
|
|
||||||
EXTRA_SCRIPTS = make_binary_distribution.sh \
|
EXTRA_SCRIPTS = make_binary_distribution.sh \
|
||||||
|
make_sharedlib_distribution.sh \
|
||||||
make_win_src_distribution.sh \
|
make_win_src_distribution.sh \
|
||||||
msql2mysql.sh \
|
msql2mysql.sh \
|
||||||
mysql_config.sh \
|
mysql_config.sh \
|
||||||
@ -60,12 +61,13 @@ EXTRA_DIST = $(EXTRA_SCRIPTS) \
|
|||||||
mysqlaccess.conf \
|
mysqlaccess.conf \
|
||||||
mysqlbug
|
mysqlbug
|
||||||
|
|
||||||
pkgdata_DATA = make_binary_distribution
|
pkgdata_DATA = make_binary_distribution make_sharedlib_distribution
|
||||||
|
|
||||||
# mysqlbug should be distributed built so that people can report build
|
# mysqlbug should be distributed built so that people can report build
|
||||||
# failures with it.
|
# failures with it.
|
||||||
CLEANFILES = @server_scripts@ \
|
CLEANFILES = @server_scripts@ \
|
||||||
make_binary_distribution \
|
make_binary_distribution \
|
||||||
|
make_sharedlib_distribution \
|
||||||
msql2mysql \
|
msql2mysql \
|
||||||
mysql_config \
|
mysql_config \
|
||||||
mysql_fix_privilege_tables \
|
mysql_fix_privilege_tables \
|
||||||
|
117
scripts/make_sharedlib_distribution.sh
Normal file
117
scripts/make_sharedlib_distribution.sh
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# The default path should be /usr/local
|
||||||
|
|
||||||
|
# Get some info from configure
|
||||||
|
# chmod +x ./scripts/setsomevars
|
||||||
|
|
||||||
|
machine=@MACHINE_TYPE@
|
||||||
|
system=@SYSTEM_TYPE@
|
||||||
|
version=@VERSION@
|
||||||
|
export machine system version
|
||||||
|
SOURCE=`pwd`
|
||||||
|
CP="cp -p"
|
||||||
|
MV="mv"
|
||||||
|
|
||||||
|
STRIP=1
|
||||||
|
DEBUG=0
|
||||||
|
SILENT=0
|
||||||
|
TMP=/tmp
|
||||||
|
SUFFIX=""
|
||||||
|
|
||||||
|
parse_arguments() {
|
||||||
|
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 ;;
|
||||||
|
--silent) SILENT=1 ;;
|
||||||
|
*)
|
||||||
|
echo "Unknown argument '$arg'"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
parse_arguments "$@"
|
||||||
|
|
||||||
|
BASE=$TMP/my_dist$SUFFIX
|
||||||
|
|
||||||
|
if [ -d $BASE ] ; then
|
||||||
|
rm -r -f $BASE
|
||||||
|
fi
|
||||||
|
|
||||||
|
mkdir -p $BASE/lib
|
||||||
|
|
||||||
|
for i in \
|
||||||
|
libmysql/.libs/libmysqlclient.so* \
|
||||||
|
libmysql_r/.libs/libmysqlclient_r.so*
|
||||||
|
do
|
||||||
|
if [ -f $i ]
|
||||||
|
then
|
||||||
|
$CP $i $BASE/lib
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Change the distribution to a long descriptive name
|
||||||
|
NEW_NAME=mysql-shared-$version-$system-$machine$SUFFIX
|
||||||
|
BASE2=$TMP/$NEW_NAME
|
||||||
|
rm -r -f $BASE2
|
||||||
|
mv $BASE $BASE2
|
||||||
|
BASE=$BASE2
|
||||||
|
|
||||||
|
#if we are debugging, do not do tar/gz
|
||||||
|
if [ x$DEBUG = x1 ] ; then
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This is needed to prefer 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 test -x $file -a ! -d $file
|
||||||
|
then
|
||||||
|
echo $file
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
|
done
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Create the result tar file
|
||||||
|
#
|
||||||
|
|
||||||
|
tar=`which_1 gnutar gtar`
|
||||||
|
if test "$?" = "1" -o "$tar" = ""
|
||||||
|
then
|
||||||
|
tar=tar
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Using $tar to create archive"
|
||||||
|
cd $TMP
|
||||||
|
|
||||||
|
OPT=cvf
|
||||||
|
if [ x$SILENT = x1 ] ; then
|
||||||
|
OPT=cf
|
||||||
|
fi
|
||||||
|
|
||||||
|
$tar $OPT $SOURCE/$NEW_NAME.tar $NEW_NAME
|
||||||
|
cd $SOURCE
|
||||||
|
echo "Compressing archive"
|
||||||
|
gzip -9 $NEW_NAME.tar
|
||||||
|
echo "Removing temporary directory"
|
||||||
|
rm -r -f $BASE
|
||||||
|
|
||||||
|
echo "$NEW_NAME.tar.gz created"
|
Loading…
x
Reference in New Issue
Block a user