diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/define_versions.sh (renamed from tools/linux_packaging/define_versions.sh) | 4 | ||||
-rwxr-xr-x | tools/linux_packaging/build | 2 | ||||
-rwxr-xr-x | tools/linux_packaging/package | 2 | ||||
-rwxr-xr-x | tools/osx_packaging/osx_build | 19 |
4 files changed, 15 insertions, 12 deletions
diff --git a/tools/linux_packaging/define_versions.sh b/tools/define_versions.sh index def50ec079..860414e0a6 100644 --- a/tools/linux_packaging/define_versions.sh +++ b/tools/define_versions.sh @@ -1,8 +1,8 @@ # -# this is sourced by build and package, and executed from within build/linux_packaging +# this is sourced by build and package, and executed from within build/{osx,linux}_packaging # -release_version=`grep -m 1 '[^A-Za-z_]LINUX_VERSION = ' ../../wscript | awk '{print $3}' | sed "s/'//g"` +release_version=`grep -m 1 '^VERSION = ' ../../wscript | awk '{print $3}' | sed "s/'//g"` r=`cut -d'"' -f2 < ../../libs/ardour/revision.cc | sed -e 1d -e "s/$release_version-//"` if echo $r | grep -q -e - ; then revcount=`echo $r | cut -d- -f1` diff --git a/tools/linux_packaging/build b/tools/linux_packaging/build index 9f70f95eb2..26c509a1dc 100755 --- a/tools/linux_packaging/build +++ b/tools/linux_packaging/build @@ -89,7 +89,7 @@ if test x$STRIP != xall -a x$STRIP != xnone -a x$STRIP != xsome ; then exit 1 fi -. ./define_versions.sh +. ../define_versions.sh echo "Version is $version / $commit" info_string="$version ($commit) built on `hostname` by `whoami` on `date`" diff --git a/tools/linux_packaging/package b/tools/linux_packaging/package index ea50ce4b98..259a2a22da 100755 --- a/tools/linux_packaging/package +++ b/tools/linux_packaging/package @@ -50,7 +50,7 @@ while [ $# -gt 0 ] ; do esac done -. ./define_versions.sh +. ../define_versions.sh if [ x$DEBUG = xT ]; then BUILDTYPE="dbg" diff --git a/tools/osx_packaging/osx_build b/tools/osx_packaging/osx_build index af582ff3bf..5b3248e1c1 100755 --- a/tools/osx_packaging/osx_build +++ b/tools/osx_packaging/osx_build @@ -67,10 +67,9 @@ if test -z "$PRODUCT_PKG_DIR" -o -z "$APPNAME"; then exit 1 fi -release_version=`grep -m 1 '[^A-Za-z_]OSX_VERSION = ' ../../wscript | cut -d"'" -f2` -revision=`grep -m 1 'revision =' ../../libs/ardour/revision.cc | cut -d'"' -f 2 | sed 's/^.*-//g'` +. ../define_versions.sh echo "Version is $release_version / $revision" -info_string="$release_version/$revision built on `hostname` by `whoami` on `date`" +info_string="$version built on `hostname` by `whoami` on `date`" echo "Info string is $info_string" # setup directory structure @@ -502,14 +501,18 @@ echo "Building DMG ..." # UC_DMG=$APPNAME-${release_version}-${revision}-UC.dmg # FINAL_DMG=$APPNAME-${release_version}-${revision}.dmg -UC_DMG=$APPNAME-${release_version}-${revision}.dmg -VOLNAME=$APPNAME-$release_version +UC_DMG=$APPNAME-$version.dmg +VOLNAME=$APPNAME-$version # TODO use mktemp -MNTPATH=`mktemp -d -t ardourimg` +export TMPDIR=`pwd` +MNTPATH=`mktemp -d -t /ardourimg` TMPDMG=`mktemp -t ardour` ICNSTMP=`mktemp -t ardouricon` -DMGSIZE=$[ `du -sm "$PRODUCT_PKG_DIR" | cut -f 1` * 1049 / 1000 + 3 ] +EXTRA_SPACE_MB=30 +DMGMEGABYTES=$[ `du -sk "$PRODUCT_PKG_DIR" | cut -f 1` * 1024 / 1048576 + $EXTRA_SPACE_MB ] + +echo "DMG MB = " $DMGMEGABYTES rm -f $UC_DMG "$TMPDMG" "${TMPDMG}.dmg" "$ICNSTMP" rm -rf "$MNTPATH" @@ -517,7 +520,7 @@ mkdir -p "$MNTPATH" TMPDMG="${TMPDMG}.dmg" -hdiutil create -megabytes $DMGSIZE "$TMPDMG" +hdiutil create -megabytes $DMGMEGABYTES "$TMPDMG" DiskDevice=$(hdid -nomount "$TMPDMG" | grep Apple_HFS | cut -f 1 -d ' ') newfs_hfs -v "${VOLNAME}" "${DiskDevice}" mount -t hfs "${DiskDevice}" "${MNTPATH}" |