diff options
Diffstat (limited to 'taskcluster/scripts/misc/build-libdmg-hfsplus.sh')
-rwxr-xr-x | taskcluster/scripts/misc/build-libdmg-hfsplus.sh | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/taskcluster/scripts/misc/build-libdmg-hfsplus.sh b/taskcluster/scripts/misc/build-libdmg-hfsplus.sh new file mode 100755 index 0000000000..c76b722d8d --- /dev/null +++ b/taskcluster/scripts/misc/build-libdmg-hfsplus.sh @@ -0,0 +1,28 @@ +#!/bin/bash +set -x -e -v + +# This script is for building libdmg-hfsplus to get the `dmg` and `hfsplus` +# tools for producing DMG archives on Linux. + +WORKSPACE=$HOME/workspace +STAGE=$WORKSPACE/dmg + +mkdir -p $UPLOAD_DIR $STAGE + +cd $MOZ_FETCHES_DIR/libdmg-hfsplus + +cmake -DOPENSSL_USE_STATIC_LIBS=1 . +make -j$(nproc) + +# We only need the dmg and hfsplus tools. +strip dmg/dmg hfs/hfsplus +cp dmg/dmg hfs/hfsplus $STAGE + +# duplicate the functionality of taskcluster-lib-urls, but in bash.. +queue_base="$TASKCLUSTER_ROOT_URL/api/queue/v1" + +cat >$STAGE/README<<EOF +Source is available as a taskcluster artifact: +$queue_base/task/$(python -c 'import json, os; print "{task}/artifacts/{artifact}".format(**next(f for f in json.loads(os.environ["MOZ_FETCHES"]) if "libdmg-hfsplus" in f["artifact"]))') +EOF +tar cf - -C $WORKSPACE `basename $STAGE` | xz > $UPLOAD_DIR/dmg.tar.xz |