2011-04-02 10:26:17 -04:00
|
|
|
#!/bin/bash
|
2011-01-31 09:48:34 -05:00
|
|
|
|
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.
|
|
|
|
|
|
|
|
BUILDTYPE=""
|
2014-09-28 15:13:18 -04:00
|
|
|
MAKESELF=""
|
2015-10-04 11:52:29 -04:00
|
|
|
BUILD_ROOT=../../build
|
2011-01-31 09:48:34 -05:00
|
|
|
|
2016-07-29 14:45:21 -04:00
|
|
|
MAKESELFOPTS="--bzip2"
|
|
|
|
|
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 ;;
|
2016-05-16 08:42:19 -04:00
|
|
|
--mixbus32c)
|
|
|
|
APPNAME=Mixbus32C ;
|
|
|
|
shift ;;
|
2024-04-27 11:56:08 -04:00
|
|
|
--livetrax)
|
|
|
|
APPNAME=LiveTrax ;
|
|
|
|
shift ;;
|
2011-01-31 09:48:34 -05:00
|
|
|
--public)
|
|
|
|
APPNAME=Ardour ;
|
|
|
|
shift ;;
|
|
|
|
|
2014-09-28 15:13:18 -04:00
|
|
|
--makeself)
|
|
|
|
MAKESELF=`which makeself`;
|
|
|
|
shift ;;
|
|
|
|
|
2023-03-24 14:07:30 -04:00
|
|
|
--singlearch) shift ;;
|
2011-02-25 17:05:15 -05:00
|
|
|
|
2023-03-24 14:07:30 -04:00
|
|
|
--gcc5abi) shift ;;
|
2015-09-26 15:23:01 -04:00
|
|
|
|
2016-07-29 14:45:21 -04:00
|
|
|
--xz) MAKESELFOPTS="--xz --complevel 9" ; 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
|
|
|
|
|
2013-05-08 13:16:50 -04:00
|
|
|
. ../define_versions.sh
|
2011-02-25 17:05:15 -05:00
|
|
|
|
2011-04-28 17:07:47 -04:00
|
|
|
if [ x$DEBUG = xT ]; then
|
2011-04-28 15:28:22 -04:00
|
|
|
BUILDTYPE="dbg"
|
2011-02-25 17:05:15 -05:00
|
|
|
fi
|
2023-03-24 14:07:30 -04:00
|
|
|
if [ x$FREEBI = xT ]; then
|
|
|
|
BUILDTYPE="demo"
|
|
|
|
fi
|
|
|
|
if [ x$DEBUG$FREEBI = xTT ]; then
|
|
|
|
BUILDTYPE="demo-dbg"
|
|
|
|
fi
|
2011-02-25 17:05:15 -05:00
|
|
|
|
2013-11-05 09:35:03 -05:00
|
|
|
X86_64_BUNDLE="${APPNAME}_x86_64-${release_version}"
|
2023-03-24 14:07:30 -04:00
|
|
|
PACKAGE="${APPNAME}-${release_version}-x86_64"
|
2011-04-06 15:02:11 -04:00
|
|
|
|
|
|
|
if [ ! -z ${BUILDTYPE} ]; then
|
|
|
|
X86_64_BUNDLE="${X86_64_BUNDLE}-${BUILDTYPE}"
|
2023-03-24 14:07:30 -04:00
|
|
|
PACKAGE="${APPNAME}-${release_version}-${BUILDTYPE}-x86_64"
|
2011-02-25 17:05:15 -05:00
|
|
|
fi
|
|
|
|
|
2016-07-29 12:56:07 -04:00
|
|
|
if [ ! -e ${X86_64_BUNDLE}.tar ]; then
|
2011-04-06 15:02:11 -04:00
|
|
|
echo ""
|
2016-07-29 12:56:07 -04:00
|
|
|
echo "Can't locate x86_64 bundle file ${X86_64_BUNDLE}.tar"
|
2011-04-06 15:02:11 -04:00
|
|
|
echo ""
|
2023-03-24 14:07:30 -04:00
|
|
|
exit 1
|
2015-10-27 06:34:12 -04:00
|
|
|
fi
|
2011-03-24 17:13:53 -04:00
|
|
|
|
2011-01-31 09:48:34 -05:00
|
|
|
echo "Cleaning up any old package files for this build"
|
|
|
|
#Get rid of any old packages of this same name.
|
2016-07-29 12:56:07 -04:00
|
|
|
rm -f ${PACKAGE}.tar
|
2011-01-31 09:48:34 -05:00
|
|
|
rm -rf ${PACKAGE}
|
|
|
|
|
|
|
|
|
|
|
|
echo "Creating new package dir..."
|
|
|
|
mkdir ${PACKAGE}
|
2011-03-24 17:13:53 -04:00
|
|
|
|
2023-03-24 14:07:30 -04:00
|
|
|
mv ${X86_64_BUNDLE}.tar ${PACKAGE}
|
|
|
|
mv ${X86_64_BUNDLE}.size ${PACKAGE}/.${X86_64_BUNDLE}.size
|
2011-03-24 17:13:53 -04:00
|
|
|
|
2011-01-31 09:48:34 -05:00
|
|
|
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
|
|
|
|
2014-09-28 15:13:18 -04:00
|
|
|
if test -n "$MAKESELF"; then
|
2014-09-28 15:22:12 -04:00
|
|
|
echo "Creating self-extracting installer"
|
2016-07-29 14:45:21 -04:00
|
|
|
$MAKESELF ${MAKESELFOPTS} ${PACKAGE}/ ${PACKAGE}.run ${APPNAME} ./install.sh
|
2014-09-28 15:13:18 -04:00
|
|
|
else
|
|
|
|
echo "Creating tarball..."
|
|
|
|
tar -cf ${PACKAGE}.tar ${PACKAGE}
|
|
|
|
fi
|
2011-01-31 09:48:34 -05:00
|
|
|
|
|
|
|
echo "Clean up"
|
|
|
|
rm -rf ${PACKAGE}
|
2015-03-23 08:02:39 -04:00
|
|
|
rm -f stage2.run
|
2011-01-31 09:48:34 -05:00
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "Done"
|
|
|
|
echo ""
|