mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 15:25:01 +01:00
possible new naming convention, plus factor out version/DEBUG info into a sourced shell script fragment that can be shared by build+package
This commit is contained in:
parent
f9c7603bdb
commit
7aca3a9221
3 changed files with 39 additions and 35 deletions
|
|
@ -87,10 +87,10 @@ if test x$STRIP != xall -a x$STRIP != xnone -a x$STRIP != xsome ; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
release_version=`grep -m 1 '[^A-Za-z_]LINUX_VERSION = ' ../../wscript | awk '{ print $3 }' | sed "s/'//g"`
|
. ./define_versions.sh
|
||||||
revision=`grep -m 1 'revision =' ../../libs/ardour/revision.cc | cut -d'"' -f 2 | sed -e "s/$release_version-//"`
|
|
||||||
echo "Version is $release_version / $revision"
|
echo "Version is $version / $commit"
|
||||||
info_string="$release_version/$revision built on `hostname` by `whoami` on `date`"
|
info_string="$version ($commit) built on `hostname` by `whoami` on `date`"
|
||||||
echo "Info string is $info_string"
|
echo "Info string is $info_string"
|
||||||
|
|
||||||
# Figure out our CPU type
|
# Figure out our CPU type
|
||||||
|
|
@ -113,13 +113,6 @@ case `uname -m` in
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Figure out the Build Type
|
|
||||||
if grep -q "DEBUG = True" ../../build/c4che/_cache.py; then
|
|
||||||
DEBUG="T"
|
|
||||||
else
|
|
||||||
DEBUG="F"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ x$DEBUG = xT ]; then
|
if [ x$DEBUG = xT ]; then
|
||||||
BUILDTYPE="dbg"
|
BUILDTYPE="dbg"
|
||||||
if [ x$STRIP = xall ] ; then
|
if [ x$STRIP = xall ] ; then
|
||||||
|
|
@ -131,11 +124,11 @@ fi
|
||||||
# setup directory structure
|
# setup directory structure
|
||||||
|
|
||||||
if [ -z "${BUILDTYPE}" ]; then
|
if [ -z "${BUILDTYPE}" ]; then
|
||||||
APPDIR=${APPNAME}_${ARCH}-${release_version}-${revision}
|
APPDIR=${APPNAME}_${ARCH}-${version}
|
||||||
APP_VER_NAME=${APPNAME}-${release_version}-${revision}
|
APP_VER_NAME=${APPNAME}-${version}
|
||||||
else
|
else
|
||||||
APPDIR=${APPNAME}_${ARCH}-${release_version}-${revision}-${BUILDTYPE}
|
APPDIR=${APPNAME}_${ARCH}-${version}-${BUILDTYPE}
|
||||||
APP_VER_NAME=${APPNAME}-${release_version}-${revision}-${BUILDTYPE}
|
APP_VER_NAME=${APPNAME}-${version}-${BUILDTYPE}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
APPBIN=$APPDIR/bin
|
APPBIN=$APPDIR/bin
|
||||||
|
|
@ -535,7 +528,7 @@ done
|
||||||
#
|
#
|
||||||
# Add the uninstaller
|
# Add the uninstaller
|
||||||
#
|
#
|
||||||
sed -e "s/%REPLACE_PGM%/${APPNAME}/" -e "s/%REPLACE_VENDOR%/${VENDOR}/" -e "s/%REPLACE_VERSION%/${release_version}/" -e "s/%REPLACE_BUILD%/${revision}/" -e "s/%REPLACE_TYPE%/${BUILDTYPE}/" < uninstall.sh.in > $APPBIN/${APP_VER_NAME}.uninstall.sh
|
sed -e "s/%REPLACE_PGM%/${APPNAME}/" -e "s/%REPLACE_VENDOR%/${VENDOR}/" -e "s/%REPLACE_VERSION%/${version}/" -e "s/%REPLACE_BUILD%/${commit}/" -e "s/%REPLACE_TYPE%/${BUILDTYPE}/" < uninstall.sh.in > $APPBIN/${APP_VER_NAME}.uninstall.sh
|
||||||
chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh
|
chmod a+x $APPBIN/${APP_VER_NAME}.uninstall.sh
|
||||||
|
|
||||||
#Sanity Check file
|
#Sanity Check file
|
||||||
|
|
|
||||||
21
tools/linux_packaging/define_versions.sh
Normal file
21
tools/linux_packaging/define_versions.sh
Normal file
|
|
@ -0,0 +1,21 @@
|
||||||
|
#
|
||||||
|
# this is sourced by build and package, and executed from within build/linux_packaging
|
||||||
|
#
|
||||||
|
|
||||||
|
release_version=`grep -m 1 '[^A-Za-z_]LINUX_VERSION = ' ../../wscript | awk '{print $3}' | sed "s/'//g"`
|
||||||
|
r=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed -e 1d -e "s/$release_version-//"`
|
||||||
|
revcount=`echo $r | cut -d- -f1`
|
||||||
|
commit=`echo $r | cut -d- -f2`
|
||||||
|
version=${release_version}.${revcount}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Figure out the Build Type
|
||||||
|
#
|
||||||
|
# Note that the name of the cache file may vary from to time
|
||||||
|
#
|
||||||
|
|
||||||
|
if grep -q "DEBUG = True" ../../build/c4che/_cache.py; then
|
||||||
|
DEBUG="T"
|
||||||
|
else
|
||||||
|
DEBUG="F"
|
||||||
|
fi
|
||||||
|
|
@ -50,30 +50,20 @@ while [ $# -gt 0 ] ; do
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
|
. ./define_versions.sh
|
||||||
# Figure out the Build Type
|
|
||||||
if grep -q "DEBUG = True" ../../build/c4che/_cache.py; then
|
|
||||||
DEBUG="T"
|
|
||||||
else
|
|
||||||
DEBUG="F"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ x$DEBUG = xT ]; then
|
if [ x$DEBUG = xT ]; then
|
||||||
BUILDTYPE="dbg"
|
BUILDTYPE="dbg"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
release_version=`grep -m 1 '[^A-Za-z_]LINUX_VERSION = ' ../../wscript | awk '{print $3}' | sed "s/'//g"`
|
X86_BUNDLE="${APPNAME}_x86-${version}"
|
||||||
revision=`grep -m 1 'revision =' ../../libs/ardour/revision.cc | cut -d'"' -f 2 | sed -e "s/$release_version-//"`
|
X86_64_BUNDLE="${APPNAME}_x86_64-${version}"
|
||||||
|
|
||||||
X86_BUNDLE="${APPNAME}_x86-${release_version}-${revision}"
|
|
||||||
X86_64_BUNDLE="${APPNAME}_x86_64-${release_version}-${revision}"
|
|
||||||
|
|
||||||
if [ ! -z ${BUILDTYPE} ]; then
|
if [ ! -z ${BUILDTYPE} ]; then
|
||||||
X86_BUNDLE="${X86_BUNDLE}-${BUILDTYPE}"
|
X86_BUNDLE="${X86_BUNDLE}-${BUILDTYPE}"
|
||||||
X86_64_BUNDLE="${X86_64_BUNDLE}-${BUILDTYPE}"
|
X86_64_BUNDLE="${X86_64_BUNDLE}-${BUILDTYPE}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
if [ ! -e ${X86_BUNDLE}.tar.bz2 ] ; then
|
if [ ! -e ${X86_BUNDLE}.tar.bz2 ] ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "Can't locate x86 bundle file ${X86_BUNDLE}.tar.bz2"
|
echo "Can't locate x86 bundle file ${X86_BUNDLE}.tar.bz2"
|
||||||
|
|
@ -122,22 +112,22 @@ fi
|
||||||
if [ -z ${BUILDTYPE} ]; then
|
if [ -z ${BUILDTYPE} ]; then
|
||||||
if [ "${SINGLE_ARCH}" = "T" ]; then
|
if [ "${SINGLE_ARCH}" = "T" ]; then
|
||||||
if [ "${X86_BUNDLE_OK}" = "T" ]; then
|
if [ "${X86_BUNDLE_OK}" = "T" ]; then
|
||||||
PACKAGE="${APPNAME}_32bit-${release_version}-${revision}"
|
PACKAGE="${APPNAME}_32bit-${version}"
|
||||||
else
|
else
|
||||||
PACKAGE="${APPNAME}_64bit-${release_version}-${revision}"
|
PACKAGE="${APPNAME}_64bit-${version}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
PACKAGE="${APPNAME}-${release_version}-${revision}"
|
PACKAGE="${APPNAME}-${version}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ "${SINGLE_ARCH}" = "T" ]; then
|
if [ "${SINGLE_ARCH}" = "T" ]; then
|
||||||
if [ "${X86_BUNDLE_OK}" = "T" ]; then
|
if [ "${X86_BUNDLE_OK}" = "T" ]; then
|
||||||
PACKAGE="${APPNAME}_32bit-${release_version}-${revision}-${BUILDTYPE}"
|
PACKAGE="${APPNAME}_32bit-${version}-${BUILDTYPE}"
|
||||||
else
|
else
|
||||||
PACKAGE="${APPNAME}_64bit-${release_version}-${revision}-${BUILDTYPE}"
|
PACKAGE="${APPNAME}_64bit-${version}-${BUILDTYPE}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
PACKAGE="${APPNAME}-${release_version}-${revision}-${BUILDTYPE}"
|
PACKAGE="${APPNAME}-${version}-${BUILDTYPE}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue