| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 # Load common constants. This should be the first executable line. | 7 # Load common constants. This should be the first executable line. |
| 8 # The path to common.sh should be relative to your script's location. | 8 # The path to common.sh should be relative to your script's location. |
| 9 . "$(dirname "$0")/common.sh" | 9 . "$(dirname "$0")/common.sh" |
| 10 | 10 |
| 11 assert_inside_chroot | 11 assert_inside_chroot |
| 12 assert_not_root_user | 12 assert_not_root_user |
| 13 | 13 |
| 14 # Flags | 14 # Flags |
| 15 DEFINE_boolean stable $FLAGS_FALSE "Build with stable version of browser." | 15 DEFINE_boolean stable $FLAGS_FALSE "Build with stable version of browser." |
| 16 | 16 |
| 17 # Parse command line | 17 # Parse command line |
| 18 FLAGS "$@" || exit 1 | 18 FLAGS "$@" || exit 1 |
| 19 eval set -- "${FLAGS_ARGV}" | 19 eval set -- "${FLAGS_ARGV}" |
| 20 | 20 |
| 21 # Die on error | 21 # Die on error |
| 22 set -e | 22 set -e |
| 23 | 23 |
| 24 # Number of jobs for scons calls. | 24 # Number of jobs for scons calls. |
| 25 NUM_JOBS=`grep -c "^processor" /proc/cpuinfo` | 25 NUM_JOBS=`grep -c "^processor" /proc/cpuinfo` |
| 26 | 26 |
| 27 PLATFORM_DIR="$SRC_ROOT/platform" | 27 PLATFORM_DIR="$SRC_ROOT/platform" |
| 28 | 28 |
| 29 PLATFORM_DIRS="acpi assets dh-chromeos fake_hal init installer login_manager \ | 29 PLATFORM_DIRS="acpi assets fake_hal init installer login_manager \ |
| 30 memento_softwareupdate pam_google window_manager \ | 30 memento_softwareupdate pam_google window_manager \ |
| 31 cros chrome screenlocker cryptohome \ | 31 cros chrome screenlocker cryptohome \ |
| 32 monitor_reconfig microbenchmark minijail metrics_collection \ | 32 monitor_reconfig microbenchmark minijail metrics_collection \ |
| 33 theme metrics_daemon" | 33 theme metrics_daemon" |
| 34 | 34 |
| 35 THIRD_PARTY_DIR="$SRC_ROOT/third_party" | 35 THIRD_PARTY_DIR="$SRC_ROOT/third_party" |
| 36 THIRD_PARTY_PACKAGES="e2fsprogs/files flimflam \ | 36 THIRD_PARTY_PACKAGES="e2fsprogs/files flimflam \ |
| 37 gflags google-breakpad gpt gtest \ | 37 gflags google-breakpad gpt gtest \ |
| 38 ibus ibus-chewing ibus-anthy ibus-hangul ibus-m17n \ | 38 ibus ibus-chewing ibus-anthy ibus-hangul ibus-m17n \ |
| 39 ply-image slim/src synaptics \ | 39 ply-image slim/src synaptics \ |
| 40 wpa_supplicant xscreensaver/xscreensaver-5.08 \ | 40 wpa_supplicant xscreensaver/xscreensaver-5.08 \ |
| 41 xserver-xorg-core xserver-xorg-video-intel" | 41 xserver-xorg-core xserver-xorg-video-intel" |
| 42 | 42 |
| 43 if [ $FLAGS_stable -eq $FLAGS_TRUE ] | 43 if [ $FLAGS_stable -eq $FLAGS_TRUE ] |
| 44 then | 44 then |
| 45 # Passed to copy_chrome_zip.sh to get stable version of the browser | 45 # Passed to copy_chrome_zip.sh to get stable version of the browser |
| 46 export GET_STABLE_CHROME=1 | 46 export GET_STABLE_CHROME=1 |
| 47 fi | 47 fi |
| 48 | 48 |
| 49 # Build dh-chromeos really first. Some of third_party needs it. |
| 50 echo "Building package dh-chromeos..." |
| 51 cd "$PLATFORM_DIR/dh-chromeos" |
| 52 ./make_pkg.sh |
| 53 cd - |
| 54 |
| 49 # Build third_party packages first, since packages and libs depend on them. | 55 # Build third_party packages first, since packages and libs depend on them. |
| 50 for i in $THIRD_PARTY_PACKAGES | 56 for i in $THIRD_PARTY_PACKAGES |
| 51 do | 57 do |
| 52 echo "Building package ${i}..." | 58 echo "Building package ${i}..." |
| 53 cd "$THIRD_PARTY_DIR/$i" | 59 cd "$THIRD_PARTY_DIR/$i" |
| 54 ./make_pkg.sh | 60 ./make_pkg.sh |
| 55 cd - | 61 cd - |
| 56 done | 62 done |
| 57 | 63 |
| 58 # Build base lib next, since packages depend on it. | 64 # Build base lib next, since packages depend on it. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 70 # Build platform packages | 76 # Build platform packages |
| 71 for i in $PLATFORM_DIRS | 77 for i in $PLATFORM_DIRS |
| 72 do | 78 do |
| 73 echo "Building package ${i}..." | 79 echo "Building package ${i}..." |
| 74 cd "$PLATFORM_DIR/$i" | 80 cd "$PLATFORM_DIR/$i" |
| 75 ./make_pkg.sh | 81 ./make_pkg.sh |
| 76 cd - | 82 cd - |
| 77 done | 83 done |
| 78 | 84 |
| 79 echo "All packages built." | 85 echo "All packages built." |
| OLD | NEW |