Merge change 1361 into donut
* changes: Remove hard-coded path to my home directory in build/tools/make-release.sh. Now you need to use the --prebuilt-path=<path> option to specify where to pick up the prebuilt toolchain tarballs instead, for example:
This commit is contained in:
@@ -1,56 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# This script is used to build complete Android NDK preview packages
|
|
||||||
# from the git repository and a set of prebuilt cross-toolchain tarballs
|
|
||||||
#
|
|
||||||
|
|
||||||
TMPDIR=/tmp/ndk-preview
|
|
||||||
GIT_REFERENCE=/home/digit/android/ndk.git
|
|
||||||
PREBUILT_PREFIX=/home/digit/android/ndk/android-ndk-prebuilt-20090323
|
|
||||||
PREVIEW_PREFIX=android-ndk-preview-`date "+%Y%m%d"`
|
|
||||||
PREBUILT_SYSTEMS="linux-x86 linux-x86_64 darwin-x86 windows"
|
|
||||||
|
|
||||||
rm -rf $TMPDIR && mkdir -p $TMPDIR
|
|
||||||
|
|
||||||
# first create the reference ndk directory from the git reference
|
|
||||||
git clone $GIT_REFERENCE $TMPDIR/reference
|
|
||||||
if [ $? != 0 ] ; then
|
|
||||||
echo "Could not clone git reference. Aborting."
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
# get rid of .git directory
|
|
||||||
rm -rf $TMPDIR/reference/.git
|
|
||||||
|
|
||||||
# now, for each system, create a preview package
|
|
||||||
#
|
|
||||||
for SYSTEM in $PREBUILT_SYSTEMS; do
|
|
||||||
echo "Preparing package for system $SYSTEM."
|
|
||||||
PREVIEW=$PREVIEW_PREFIX-$SYSTEM
|
|
||||||
PREBUILT=$PREBUILT_PREFIX-$SYSTEM
|
|
||||||
DSTDIR=$TMPDIR/$PREVIEW
|
|
||||||
rm -rf $DSTDIR && mkdir -p $DSTDIR &&
|
|
||||||
cp -rp $TMPDIR/reference/* $DSTDIR
|
|
||||||
if [ $? != 0 ] ; then
|
|
||||||
echo "Could not copy reference. Aborting."
|
|
||||||
exit 2
|
|
||||||
fi
|
|
||||||
echo "Unpacking $PREBUILT.tar.bz2"
|
|
||||||
(cd $DSTDIR && tar xjf $PREBUILT.tar.bz2)
|
|
||||||
if [ $? != 0 ] ; then
|
|
||||||
echo "Could not unpack prebuilt for system $SYSTEM. Aborting."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
echo "Creating $PREVIEW.tar.bz2"
|
|
||||||
(cd $TMPDIR && tar cjf $PREVIEW.tar.bz2 $PREVIEW && rm -rf $DSTDIR)
|
|
||||||
if [ $? != 0 ] ; then
|
|
||||||
echo "Could not create archive. Aborting."
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "Cleaning up."
|
|
||||||
rm -rf $TMPDIR/reference
|
|
||||||
|
|
||||||
echo "Done, please see packages in $TMPDIR:"
|
|
||||||
ls -l $TMPDIR
|
|
||||||
|
|
||||||
@@ -11,8 +11,11 @@ NDK_ROOT_DIR=`cd $NDK_ROOT_DIR && pwd`
|
|||||||
# the release name
|
# the release name
|
||||||
RELEASE=1.5_r1
|
RELEASE=1.5_r1
|
||||||
|
|
||||||
|
# the package prefix
|
||||||
|
PREFIX=android-ndk
|
||||||
|
|
||||||
# the directory containing the prebuilt toolchain tarballs
|
# the directory containing the prebuilt toolchain tarballs
|
||||||
PREBUILT_DIR=/home/digit/android/ndk
|
PREBUILT_DIR=
|
||||||
|
|
||||||
# the prefix of prebuilt toolchain tarballs in $PREBUILT_DIR
|
# the prefix of prebuilt toolchain tarballs in $PREBUILT_DIR
|
||||||
PREBUILT_PREFIX=android-ndk-prebuilt-20090323
|
PREBUILT_PREFIX=android-ndk-prebuilt-20090323
|
||||||
@@ -20,13 +23,95 @@ PREBUILT_PREFIX=android-ndk-prebuilt-20090323
|
|||||||
# the list of supported host development systems
|
# the list of supported host development systems
|
||||||
PREBUILT_SYSTEMS="linux-x86 linux-x86_64 darwin-x86 windows"
|
PREBUILT_SYSTEMS="linux-x86 linux-x86_64 darwin-x86 windows"
|
||||||
|
|
||||||
|
|
||||||
|
OPTION_HELP=no
|
||||||
|
|
||||||
|
for opt do
|
||||||
|
optarg=`expr "x$opt" : 'x[^=]*=\(.*\)'`
|
||||||
|
case "$opt" in
|
||||||
|
--help|-h|-\?) OPTION_HELP=yes
|
||||||
|
;;
|
||||||
|
--verbose)
|
||||||
|
if [ "$VERBOSE" = "yes" ] ; then
|
||||||
|
VERBOSE2=yes
|
||||||
|
else
|
||||||
|
VERBOSE=yes
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
--release=*) RELEASE=$optarg
|
||||||
|
;;
|
||||||
|
--prefix=*) PREFIX=$optarg
|
||||||
|
;;
|
||||||
|
--prebuilt-prefix=*) PREBUILT_PREFIX=$optarg
|
||||||
|
;;
|
||||||
|
--prebuilt-path=*) PREBUILT_DIR=$optarg
|
||||||
|
;;
|
||||||
|
--systems=*) PREBUILT_SYSTEMS=$optarg
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "unknown option '$opt', use --help"
|
||||||
|
exit 1
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ $OPTION_HELP = yes ] ; then
|
||||||
|
echo "Usage: make-release.sh [options]"
|
||||||
|
echo ""
|
||||||
|
echo "Package a new set of release packages for the Android NDK."
|
||||||
|
echo "You will need to specify the path of a directory containing"
|
||||||
|
echo "prebuilt toolchain tarballs with the --prebuilt-path option."
|
||||||
|
echo ""
|
||||||
|
echo "Options: [defaults in brackets after descriptions]"
|
||||||
|
echo ""
|
||||||
|
echo " --help Print this help message"
|
||||||
|
echo " --prefix=PREFIX Package prefix name [$PREFIX]"
|
||||||
|
echo " --release=NAME Specify release name [$RELEASE]"
|
||||||
|
echo " --systems=SYSTEMS List of host system packages [$PREBUILT_SYSTEMS]"
|
||||||
|
echo " --prebuilt-path=PATH Location of prebuilt binary tarballs [$PREBUILT_DIR]"
|
||||||
|
echo " --prebuilt-prefix=PREFIX Prefix of prebuilt binary tarballs [$PREBUILT_PREFIX]"
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check the prebuilt path
|
||||||
|
#
|
||||||
|
if [ -z "$PREBUILT_DIR" ] ; then
|
||||||
|
echo "ERROR: You must use --prebuilt-path=PATH to specify the path of prebuilt binary tarballs."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$PREBUILT_DIR" ] ; then
|
||||||
|
echo "ERROR: the --prebuilt-path argument is not a directory path: $PREBUILT_DIR"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Check the systems
|
||||||
|
#
|
||||||
|
if [ -z "$PREBUILT_SYSTEMS" ] ; then
|
||||||
|
echo "ERROR: Your systems list is empty, use --system=LIST to specify a different one."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$PREBUILT_PREFIX" ] ; then
|
||||||
|
echo "ERROR: Your prebuilt prefix is empty; use --prebuilt-prefix=PREFIX."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
for SYS in $PREBUILT_SYSTEMS; do
|
||||||
|
if [ ! -f $PREBUILT_DIR/$PREBUILT_PREFIX-$SYS.tar.bz2 ] ; then
|
||||||
|
echo "ERROR: It seems there is no prebuilt binary tarball for the '$SYS' system"
|
||||||
|
echo "Please check the content of $PREBUILT_DIR for a file named $PREBUILT_PREFIX-$SYS.tar.bz2."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
# the list of git files to copy into the archives
|
# the list of git files to copy into the archives
|
||||||
GIT_FILES=`cd $NDK_ROOT_DIR && git ls-files`
|
GIT_FILES=`cd $NDK_ROOT_DIR && git ls-files`
|
||||||
|
|
||||||
# temporary directory used for packaging
|
# temporary directory used for packaging
|
||||||
TMPDIR=/tmp/ndk-release
|
TMPDIR=/tmp/ndk-release
|
||||||
|
|
||||||
RELEASE_PREFIX=android-ndk-$RELEASE
|
RELEASE_PREFIX=$PREFIX-$RELEASE
|
||||||
|
|
||||||
rm -rf $TMPDIR && mkdir -p $TMPDIR
|
rm -rf $TMPDIR && mkdir -p $TMPDIR
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user