2011-01-31 09:48:34 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2011-02-25 17:05:15 -05:00
|
|
|
# package
|
|
|
|
|
|
|
|
# This will collect up the x86 and x86_64 bundles created by build
|
|
|
|
# and package them together with an installer script.
|
|
|
|
|
|
|
|
STRIP=1
|
|
|
|
BUILDTYPE=""
|
2011-01-31 09:48:34 -05:00
|
|
|
|
|
|
|
if [ $# -eq 0 ] ; then
|
|
|
|
echo ""
|
|
|
|
echo "ERROR - Please specify build type"
|
|
|
|
echo " --public"
|
|
|
|
echo " --sae"
|
|
|
|
echo ""
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
while [ $# -gt 0 ] ; do
|
|
|
|
echo "arg = $1"
|
|
|
|
case $1 in
|
|
|
|
|
|
|
|
#
|
|
|
|
# top level build targets
|
|
|
|
#
|
|
|
|
|
|
|
|
--sae)
|
|
|
|
APPNAME=Ardour ;
|
|
|
|
shift ;;
|
|
|
|
--mixbus)
|
|
|
|
APPNAME=Mixbus ;
|
|
|
|
shift ;;
|
|
|
|
--public)
|
|
|
|
APPNAME=Ardour ;
|
|
|
|
shift ;;
|
|
|
|
|
2011-02-25 17:05:15 -05:00
|
|
|
--nostrip) STRIP= ; shift ;;
|
|
|
|
|
2011-01-31 09:48:34 -05:00
|
|
|
*)
|
|
|
|
#catch all for unknown arguments
|
|
|
|
echo ""
|
|
|
|
echo "!!! ERROR !!! - Unknown argument $1"
|
|
|
|
echo ""
|
|
|
|
exit 1
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2011-02-07 15:56:49 -05:00
|
|
|
release_version=`grep -m 1 '^VERSION' ../../wscript | awk '{print $3}' | sed "s/'//g"`
|
|
|
|
svn_version=`grep -m 1 'svn_revision =' ../../libs/ardour/svn_revision.cc | cut -d"'" -f 2`
|
2011-01-31 09:48:34 -05:00
|
|
|
|
2011-02-25 17:05:15 -05:00
|
|
|
# Figure out the Build Type
|
|
|
|
if grep -q "DEBUG = True" ../../build/c4che/default.cache.py; then
|
|
|
|
DEBUG="T"
|
|
|
|
else
|
|
|
|
DEBUG="F"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ x$DEBUG != x ]; then
|
|
|
|
if [ x$STRIP != x ]; then
|
|
|
|
BUILDTYPE="strip"
|
|
|
|
else
|
|
|
|
BUILDTYPE="dbg"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
if [ -z ${BUILDTYPE} ]; then
|
|
|
|
X86_BUILD="${APPNAME}_x86-${release_version}_${svn_version}.tar.bz2"
|
|
|
|
X86_64_BUILD="${APPNAME}_x86_64-${release_version}_${svn_version}.tar.bz2"
|
|
|
|
PACKAGE="${APPNAME}-${release_version}_${svn_version}"
|
|
|
|
else
|
|
|
|
X86_BUILD="${APPNAME}_x86-${release_version}_${svn_version}-${BUILDTYPE}.tar.bz2"
|
|
|
|
X86_64_BUILD="${APPNAME}_x86_64-${release_version}_${svn_version}-${BUILDTYPE}.tar.bz2"
|
|
|
|
PACKAGE="${APPNAME}-${release_version}_${svn_version}-${BUILDTYPE}"
|
|
|
|
fi
|
|
|
|
|
2011-01-31 09:48:34 -05:00
|
|
|
|
|
|
|
if [ ! -e ${X86_BUILD} ]; then
|
|
|
|
echo ""
|
|
|
|
echo "!!! ERROR !!! - Can't locate x86 build file ${X86_BUILD}"
|
|
|
|
echo ""
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ ! -e ${X86_64_BUILD} ]; then
|
|
|
|
echo ""
|
|
|
|
echo "!!! ERROR !!! - Can't locate x86_64 build file ${X86_64_BUILD}"
|
|
|
|
echo ""
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Cleaning up any old package files for this build"
|
|
|
|
#Get rid of any old packages of this same name.
|
|
|
|
rm -f ${PACKAGE}.tar.bz2
|
|
|
|
rm -rf ${PACKAGE}
|
|
|
|
|
|
|
|
|
|
|
|
echo "Creating new package dir..."
|
|
|
|
mkdir ${PACKAGE}
|
|
|
|
mv ${X86_BUILD} ${PACKAGE}
|
|
|
|
mv ${X86_64_BUILD} ${PACKAGE}
|
|
|
|
cp install.sh ${PACKAGE}
|
2011-02-25 17:05:15 -05:00
|
|
|
cp stage2.run ${PACKAGE}/.stage2.run
|
|
|
|
cp README ${PACKAGE}
|
2011-01-31 09:48:34 -05:00
|
|
|
|
|
|
|
echo "Creating tarball..."
|
|
|
|
tar -czf ${PACKAGE}.tar.gz ${PACKAGE}
|
|
|
|
|
|
|
|
echo "Clean up"
|
|
|
|
rm -rf ${PACKAGE}
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "Done"
|
|
|
|
echo ""
|