3 # https://code.google.com/p/chromium/wiki/LinuxFasterBuilds
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
19 install -d $outdir $rpmdir $logs
21 # init ccache with unlimited size (it's default is 1G)
22 if [ ! -d "$CCACHE_DIR" ]; then
26 # clear logfile if bigger than 2GiB
27 CCACHE_LOGSIZE=$((0x7FFFFFFF))
29 if [ -s "$CCACHE_LOGFILE" ] && [ $(stat -c %s "$CCACHE_LOGFILE") -gt $CCACHE_LOGSIZE ]; then
34 # print some stats on startup
37 log=$logs/$(date +%Y%m%d_%H%M%S)
39 mv $outdir/chromium-browser-*.*.*.*/src/REMOVED-*.txt $log
40 logfile=$log/rpmbuild.log
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" \