summaryrefslogtreecommitdiffstats
path: root/taskcluster/scripts/misc/build-xz.sh
blob: 50bbc9ed0bbb4954a79252c6e05213ceb7a1e1d6 (plain)
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
#!/bin/sh
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#

set -e
set -x

# Required fetch artifact
xz_src=${MOZ_FETCHES_DIR}/xz-source

# Actual build
work_dir=`pwd`
dest_dir=${work_dir}/tmp-install
tardir=xz

cd `mktemp -d`
${xz_src}/configure --prefix=/${tardir} CFLAGS=-O2 ${configure_flags_extra} || { exit_status=$? && cat config.log && exit $exit_status ; }
export MAKEFLAGS=-j`nproc`
make
make DESTDIR=${dest_dir} install
cd ${dest_dir}

$(dirname $0)/pack.sh ${tardir}