mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 06:44:57 +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
|
||||
fi
|
||||
|
||||
release_version=`grep -m 1 '[^A-Za-z_]LINUX_VERSION = ' ../../wscript | awk '{ print $3 }' | sed "s/'//g"`
|
||||
revision=`grep -m 1 'revision =' ../../libs/ardour/revision.cc | cut -d'"' -f 2 | sed -e "s/$release_version-//"`
|
||||
echo "Version is $release_version / $revision"
|
||||
info_string="$release_version/$revision built on `hostname` by `whoami` on `date`"
|
||||
. ./define_versions.sh
|
||||
|
||||
echo "Version is $version / $commit"
|
||||
info_string="$version ($commit) built on `hostname` by `whoami` on `date`"
|
||||
echo "Info string is $info_string"
|
||||
|
||||
# Figure out our CPU type
|
||||
|
|
@ -113,13 +113,6 @@ case `uname -m` in
|
|||
;;
|
||||
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
|
||||
BUILDTYPE="dbg"
|
||||
if [ x$STRIP = xall ] ; then
|
||||
|
|
@ -131,11 +124,11 @@ fi
|
|||
# setup directory structure
|
||||
|
||||
if [ -z "${BUILDTYPE}" ]; then
|
||||
APPDIR=${APPNAME}_${ARCH}-${release_version}-${revision}
|
||||
APP_VER_NAME=${APPNAME}-${release_version}-${revision}
|
||||
APPDIR=${APPNAME}_${ARCH}-${version}
|
||||
APP_VER_NAME=${APPNAME}-${version}
|
||||
else
|
||||
APPDIR=${APPNAME}_${ARCH}-${release_version}-${revision}-${BUILDTYPE}
|
||||
APP_VER_NAME=${APPNAME}-${release_version}-${revision}-${BUILDTYPE}
|
||||
APPDIR=${APPNAME}_${ARCH}-${version}-${BUILDTYPE}
|
||||
APP_VER_NAME=${APPNAME}-${version}-${BUILDTYPE}
|
||||
fi
|
||||
|
||||
APPBIN=$APPDIR/bin
|
||||
|
|
@ -535,7 +528,7 @@ done
|
|||
#
|
||||
# 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
|
||||
|
||||
#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
|
||||
done
|
||||
|
||||
|
||||
# Figure out the Build Type
|
||||
if grep -q "DEBUG = True" ../../build/c4che/_cache.py; then
|
||||
DEBUG="T"
|
||||
else
|
||||
DEBUG="F"
|
||||
fi
|
||||
. ./define_versions.sh
|
||||
|
||||
if [ x$DEBUG = xT ]; then
|
||||
BUILDTYPE="dbg"
|
||||
fi
|
||||
|
||||
release_version=`grep -m 1 '[^A-Za-z_]LINUX_VERSION = ' ../../wscript | awk '{print $3}' | sed "s/'//g"`
|
||||
revision=`grep -m 1 'revision =' ../../libs/ardour/revision.cc | cut -d'"' -f 2 | sed -e "s/$release_version-//"`
|
||||
|
||||
X86_BUNDLE="${APPNAME}_x86-${release_version}-${revision}"
|
||||
X86_64_BUNDLE="${APPNAME}_x86_64-${release_version}-${revision}"
|
||||
X86_BUNDLE="${APPNAME}_x86-${version}"
|
||||
X86_64_BUNDLE="${APPNAME}_x86_64-${version}"
|
||||
|
||||
if [ ! -z ${BUILDTYPE} ]; then
|
||||
X86_BUNDLE="${X86_BUNDLE}-${BUILDTYPE}"
|
||||
X86_64_BUNDLE="${X86_64_BUNDLE}-${BUILDTYPE}"
|
||||
fi
|
||||
|
||||
|
||||
if [ ! -e ${X86_BUNDLE}.tar.bz2 ] ; then
|
||||
echo ""
|
||||
echo "Can't locate x86 bundle file ${X86_BUNDLE}.tar.bz2"
|
||||
|
|
@ -122,22 +112,22 @@ fi
|
|||
if [ -z ${BUILDTYPE} ]; then
|
||||
if [ "${SINGLE_ARCH}" = "T" ]; then
|
||||
if [ "${X86_BUNDLE_OK}" = "T" ]; then
|
||||
PACKAGE="${APPNAME}_32bit-${release_version}-${revision}"
|
||||
PACKAGE="${APPNAME}_32bit-${version}"
|
||||
else
|
||||
PACKAGE="${APPNAME}_64bit-${release_version}-${revision}"
|
||||
PACKAGE="${APPNAME}_64bit-${version}"
|
||||
fi
|
||||
else
|
||||
PACKAGE="${APPNAME}-${release_version}-${revision}"
|
||||
PACKAGE="${APPNAME}-${version}"
|
||||
fi
|
||||
else
|
||||
if [ "${SINGLE_ARCH}" = "T" ]; then
|
||||
if [ "${X86_BUNDLE_OK}" = "T" ]; then
|
||||
PACKAGE="${APPNAME}_32bit-${release_version}-${revision}-${BUILDTYPE}"
|
||||
PACKAGE="${APPNAME}_32bit-${version}-${BUILDTYPE}"
|
||||
else
|
||||
PACKAGE="${APPNAME}_64bit-${release_version}-${revision}-${BUILDTYPE}"
|
||||
PACKAGE="${APPNAME}_64bit-${version}-${BUILDTYPE}"
|
||||
fi
|
||||
else
|
||||
PACKAGE="${APPNAME}-${release_version}-${revision}-${BUILDTYPE}"
|
||||
PACKAGE="${APPNAME}-${version}-${BUILDTYPE}"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue