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