File: build-dmg-hfsplus.sh

package info (click to toggle)
firefox 147.0.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,683,532 kB
  • sloc: cpp: 7,607,356; javascript: 6,533,348; ansic: 3,775,236; python: 1,415,508; xml: 634,561; asm: 438,949; java: 186,241; sh: 62,760; makefile: 18,079; objc: 13,092; perl: 12,808; yacc: 4,583; cs: 3,846; pascal: 3,448; lex: 1,720; ruby: 1,003; php: 436; lisp: 258; awk: 247; sql: 66; sed: 54; csh: 10; exp: 6
file content (40 lines) | stat: -rwxr-xr-x 1,265 bytes parent folder | download | duplicates (14)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/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

# The openssl libraries in the sysroot cannot be linked in a PIE executable so we use -no-pie
cmake \
  -DCMAKE_C_COMPILER=$MOZ_FETCHES_DIR/clang/bin/clang \
  -DCMAKE_CXX_COMPILER=$MOZ_FETCHES_DIR/clang/bin/clang++ \
  -DCMAKE_SYSROOT=$MOZ_FETCHES_DIR/sysroot \
  -DOPENSSL_USE_STATIC_LIBS=1 \
  -DCMAKE_EXE_LINKER_FLAGS=-no-pie \
  -DCMAKE_BUILD_TYPE=Release \
  .

make VERBOSE=1 -j$(nproc)

# Assert that lzma compression was built
./dmg/dmg | grep -q lzma

# 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/$(python3 -c 'import json, os; print("{task}/artifacts/{artifact}".format(**next(f for f in json.loads(os.environ["MOZ_FETCHES"]) if "dmg-hfsplus" in f["artifact"])))')
EOF
tar caf $UPLOAD_DIR/dmg.tar.zst -C $WORKSPACE `basename $STAGE`