]> git.pld-linux.org Git - packages/chromium-browser.git/blame - builderx.sh
- pl
[packages/chromium-browser.git] / builderx.sh
CommitLineData
c3ae1530 1#!/bin/sh
3c1d34ba
ER
2# Some notes:
3# https://code.google.com/p/chromium/wiki/LinuxFasterBuilds
c3ae1530
ER
4set -x
5
6dir=$(dirname "$0")
7dir=$(cd "$dir"; pwd)
8outdir=$dir/BUILD
9rpmdir=$dir/RPMS
10logs=$outdir/logs
11
12export CCACHE_DIR=$outdir/ccache
13export CCACHE_LOGFILE=$CCACHE_DIR/log
14export CCACHE_NLEVELS=1
15export CCACHE_HARDLINK=1
3c1d34ba
ER
16#export CCACHE_BASEDIR
17#export CCACHE_SLOPPINESS=include_file_mtime
c3ae1530
ER
18
19install -d $outdir $rpmdir $logs
20
21# init ccache with unlimited size (it's default is 1G)
22if [ ! -d "$CCACHE_DIR" ]; then
23 ccache -M 0 -F 0
24fi
25
26# clear logfile if bigger than 2GiB
27CCACHE_LOGSIZE=$((0x7FFFFFFF))
28
29if [ -s "$CCACHE_LOGFILE" ] && [ $(stat -c %s "$CCACHE_LOGFILE") -gt $CCACHE_LOGSIZE ]; then
30 > "$CCACHE_LOGFILE"
31 ccache -z
32fi
33
34# print some stats on startup
35ccache -s
36
37log=$logs/$(date +%Y%m%d_%H%M%S)
38install -d $log
39mv $outdir/chromium-browser-*.*.*.*/src/REMOVED-*.txt $log
e0583589
ER
40logfile=$log/rpmbuild.log
41touch $logfile
c3ae1530
ER
42rmdir $log
43
44_smp_mflags=$(rpm -E %{?_smp_mflags})
e0583589 45time $dir/teeboth "$logfile" rpmbuild \
c3ae1530
ER
46 ${_smp_mflags:+--define "_smp_mflags ${_smp_mflags}"} \
47 --define "_unpackaged_files_terminate_build 1" \
48 --define '_enable_debug_packages 0' \
49 --define "_topdir $dir" \
50 --define "_specdir $dir" \
51 --define "_sourcedir $dir" \
52 --define "_builddir $outdir" \
53 --define "_rpmdir $rpmdir" \
3c1d34ba 54 --without debuginfo \
c3ae1530 55 --with verbose \
44c11196 56 --with ninja \
c3ae1530 57 "$@"
This page took 0.07917 seconds and 4 git commands to generate.