Allow single architecture packages to be made
git-svn-id: svn://localhost/ardour2/branches/3.0@9200 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
ad942b104a
commit
3d51ea0ed2
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/bash
|
\#!/bin/bash
|
||||||
|
|
||||||
# package
|
# package
|
||||||
|
|
||||||
|
@ -7,6 +7,10 @@
|
||||||
|
|
||||||
STRIP=1
|
STRIP=1
|
||||||
BUILDTYPE=""
|
BUILDTYPE=""
|
||||||
|
SINGLE_ARCH="F"
|
||||||
|
X86_BUNDLE_OK="F"
|
||||||
|
X86_64_BUNDLE_OK="F"
|
||||||
|
|
||||||
|
|
||||||
if [ $# -eq 0 ] ; then
|
if [ $# -eq 0 ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
|
@ -36,6 +40,7 @@ while [ $# -gt 0 ] ; do
|
||||||
shift ;;
|
shift ;;
|
||||||
|
|
||||||
--nostrip) STRIP= ; shift ;;
|
--nostrip) STRIP= ; shift ;;
|
||||||
|
--singlearch) SINGLE_ARCH="T" ; shift ;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
#catch all for unknown arguments
|
#catch all for unknown arguments
|
||||||
|
@ -69,28 +74,72 @@ fi
|
||||||
if [ -z ${BUILDTYPE} ]; then
|
if [ -z ${BUILDTYPE} ]; then
|
||||||
X86_BUILD="${APPNAME}_x86-${release_version}_${svn_version}.tar.bz2"
|
X86_BUILD="${APPNAME}_x86-${release_version}_${svn_version}.tar.bz2"
|
||||||
X86_64_BUILD="${APPNAME}_x86_64-${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
|
else
|
||||||
X86_BUILD="${APPNAME}_x86-${release_version}_${svn_version}-${BUILDTYPE}.tar.bz2"
|
X86_BUILD="${APPNAME}_x86-${release_version}_${svn_version}-${BUILDTYPE}.tar.bz2"
|
||||||
X86_64_BUILD="${APPNAME}_x86_64-${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
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ ! -e ${X86_BUILD} ]; then
|
if [ ! -e ${X86_BUILD} ]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "!!! ERROR !!! - Can't locate x86 build file ${X86_BUILD}"
|
echo "Can't locate x86 bundle file ${X86_BUILD}"
|
||||||
echo ""
|
echo ""
|
||||||
exit 1
|
else
|
||||||
|
X86_BUNDLE_OK="T"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -e ${X86_64_BUILD} ]; then
|
if [ ! -e ${X86_64_BUILD} ]; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "!!! ERROR !!! - Can't locate x86_64 build file ${X86_64_BUILD}"
|
echo "Can't locate x86_64 bundle file ${X86_64_BUILD}"
|
||||||
echo ""
|
echo ""
|
||||||
exit 1
|
else
|
||||||
|
X86_64_BUNDLE_OK="T"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ "${X86_BUNDLE_OK}" = "F" ] || [ "${X86_64_BUNDLE_OK}" = "F" ]; then
|
||||||
|
if [ "${X86_BUNDLE_OK}" = "${X86_64_BUNDLE_OK}" ]; then
|
||||||
|
echo ""
|
||||||
|
echo "!!! ERROR !!! - Can't locate bundle files ${X86_BUILD} or ${X86_64_BUILD}"
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
elif [ "${SINGLE_ARCH}" = "T" ]; then
|
||||||
|
echo ""
|
||||||
|
echo "!!! Warning !!! - A single architecture package has been selected"
|
||||||
|
echo ""
|
||||||
|
else
|
||||||
|
echo ""
|
||||||
|
echo "!!! ERROR !!! - Missing bundle files."
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if [ -z ${BUILDTYPE} ]; then
|
||||||
|
if [ "${SINGLE_ARCH}" = "T" ]; then
|
||||||
|
if [ "${X86_BUNDLE_OK}" = "T" ]; then
|
||||||
|
PACKAGE="${APPNAME}_32bit-${release_version}_${svn_version}"
|
||||||
|
else
|
||||||
|
PACKAGE="${APPNAME}_64bit-${release_version}_${svn_version}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
PACKAGE="${APPNAME}-${release_version}_${svn_version}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ "${SINGLE_ARCH}" = "T" ]; then
|
||||||
|
if [ "${X86_BUNDLE_OK}" = "T" ]; then
|
||||||
|
PACKAGE="${APPNAME}_32bit-${release_version}_${svn_version}-${BUILDTYPE}"
|
||||||
|
else
|
||||||
|
PACKAGE="${APPNAME}_64bit-${release_version}_${svn_version}-${BUILDTYPE}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
PACKAGE="${APPNAME}-${release_version}_${svn_version}-${BUILDTYPE}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
echo "Cleaning up any old package files for this build"
|
echo "Cleaning up any old package files for this build"
|
||||||
#Get rid of any old packages of this same name.
|
#Get rid of any old packages of this same name.
|
||||||
rm -f ${PACKAGE}.tar.bz2
|
rm -f ${PACKAGE}.tar.bz2
|
||||||
|
@ -99,8 +148,15 @@ rm -rf ${PACKAGE}
|
||||||
|
|
||||||
echo "Creating new package dir..."
|
echo "Creating new package dir..."
|
||||||
mkdir ${PACKAGE}
|
mkdir ${PACKAGE}
|
||||||
mv ${X86_BUILD} ${PACKAGE}
|
|
||||||
mv ${X86_64_BUILD} ${PACKAGE}
|
if [ "${X86_BUNDLE_OK}" = "T" ]; then
|
||||||
|
mv ${X86_BUILD} ${PACKAGE}
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "${X86_64_BUNDLE_OK}" = "T" ]; then
|
||||||
|
mv ${X86_64_BUILD} ${PACKAGE}
|
||||||
|
fi
|
||||||
|
|
||||||
cp install.sh ${PACKAGE}
|
cp install.sh ${PACKAGE}
|
||||||
cp stage2.run ${PACKAGE}/.stage2.run
|
cp stage2.run ${PACKAGE}/.stage2.run
|
||||||
cp README ${PACKAGE}
|
cp README ${PACKAGE}
|
||||||
|
|
|
@ -148,6 +148,14 @@ esac
|
||||||
|
|
||||||
# untar the correct bundle for us to install
|
# untar the correct bundle for us to install
|
||||||
echo "Unpacking bundle for $ARCH"
|
echo "Unpacking bundle for $ARCH"
|
||||||
|
|
||||||
|
if [ ! -e ${PGM_NAME}_${ARCH}-*.tar.bz2 ]; then
|
||||||
|
echo ""
|
||||||
|
echo "!!! ERROR !!! Can't locate ${ARCH} bundle file."
|
||||||
|
echo ""
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
tar -xjf ${PGM_NAME}_${ARCH}-*.tar.bz2
|
tar -xjf ${PGM_NAME}_${ARCH}-*.tar.bz2
|
||||||
BUNDLE_DIR=$(basename `find -maxdepth 1 -type d -name "${PGM_NAME}_${ARCH}-*"`)
|
BUNDLE_DIR=$(basename `find -maxdepth 1 -type d -name "${PGM_NAME}_${ARCH}-*"`)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user