mirror of
https://github.com/flatcar/scripts.git
synced 2026-05-05 04:06:33 +02:00
Add optional chromiumos-build support to build_platform_packages
This makes it possible to attempt a build using chromiumos-build by running './build_platform_packages.sh --new-build', with an -a option to select the architecture (e.g. -a armel). Right now, this uses --apt-source to build all build-dependencies as well, since that usually ends up being what you want when cross-compiling. I'd appreciate feedback from buildbot-oriented folks on whether this is an acceptable load in general. For the meantime, this is mainly for the convenience of people working on the cross-build project. Review URL: http://codereview.chromium.org/546042
This commit is contained in:
parent
c922fc09a5
commit
555b147cc3
@ -13,9 +13,13 @@ assert_not_root_user
|
||||
|
||||
# Flags
|
||||
DEFINE_boolean stable $FLAGS_FALSE "Build with stable version of browser."
|
||||
DEFINE_boolean new_build $FLAGS_FALSE "Use chromiumos-build."
|
||||
DEFINE_string architecture i386 "The architecture to build for (--new_build only)." a
|
||||
|
||||
# Parse command line
|
||||
FLAGS "$@" || exit 1
|
||||
# Fix up the command line and parse with shflags.
|
||||
FIXED_FLAGS="$@"
|
||||
FIXED_FLAGS=${FIXED_FLAGS/new-build/new_build}
|
||||
FLAGS $FIXED_FLAGS || exit 1
|
||||
eval set -- "${FLAGS_ARGV}"
|
||||
|
||||
# Die on error
|
||||
@ -47,40 +51,50 @@ then
|
||||
export GET_STABLE_CHROME=1
|
||||
fi
|
||||
|
||||
# Build dh-chromeos really first. Some of third_party needs it.
|
||||
echo "Building package dh-chromeos..."
|
||||
cd "$PLATFORM_DIR/dh-chromeos"
|
||||
./make_pkg.sh
|
||||
cd -
|
||||
|
||||
# Build third_party packages first, since packages and libs depend on them.
|
||||
for i in $THIRD_PARTY_PACKAGES
|
||||
do
|
||||
echo "Building package ${i}..."
|
||||
cd "$THIRD_PARTY_DIR/$i"
|
||||
if [ $FLAGS_new_build -eq $FLAGS_TRUE ]; then
|
||||
# chromiumos-build works out the build order for itself.
|
||||
PACKAGES='dh-chromeos libchrome libchromeos'
|
||||
for PKG in $PLATFORM_DIRS $THIRD_PARTY_PACKAGES; do
|
||||
PACKAGES="$PACKAGES ${PKG%/*}"
|
||||
done
|
||||
echo chromiumos-build -a "$FLAGS_architecture" --apt-source $PACKAGES
|
||||
chromiumos-build -a "$FLAGS_architecture" --apt-source $PACKAGES
|
||||
else
|
||||
# Build dh-chromeos really first. Some of third_party needs it.
|
||||
echo "Building package dh-chromeos..."
|
||||
cd "$PLATFORM_DIR/dh-chromeos"
|
||||
./make_pkg.sh
|
||||
cd -
|
||||
done
|
||||
|
||||
# Build base lib next, since packages depend on it.
|
||||
echo "Building base library..."
|
||||
cd "$THIRD_PARTY_DIR/chrome"
|
||||
./make_pkg.sh
|
||||
cd -
|
||||
# Build third_party packages first, since packages and libs depend on them.
|
||||
for i in $THIRD_PARTY_PACKAGES
|
||||
do
|
||||
echo "Building package ${i}..."
|
||||
cd "$THIRD_PARTY_DIR/$i"
|
||||
./make_pkg.sh
|
||||
cd -
|
||||
done
|
||||
|
||||
#Build common lib next.
|
||||
echo "Building common library..."
|
||||
cd "$SRC_ROOT/common"
|
||||
./make_pkg.sh
|
||||
cd -
|
||||
|
||||
# Build platform packages
|
||||
for i in $PLATFORM_DIRS
|
||||
do
|
||||
echo "Building package ${i}..."
|
||||
cd "$PLATFORM_DIR/$i"
|
||||
# Build base lib next, since packages depend on it.
|
||||
echo "Building base library..."
|
||||
cd "$THIRD_PARTY_DIR/chrome"
|
||||
./make_pkg.sh
|
||||
cd -
|
||||
done
|
||||
|
||||
#Build common lib next.
|
||||
echo "Building common library..."
|
||||
cd "$SRC_ROOT/common"
|
||||
./make_pkg.sh
|
||||
cd -
|
||||
|
||||
# Build platform packages
|
||||
for i in $PLATFORM_DIRS
|
||||
do
|
||||
echo "Building package ${i}..."
|
||||
cd "$PLATFORM_DIR/$i"
|
||||
./make_pkg.sh
|
||||
cd -
|
||||
done
|
||||
fi
|
||||
|
||||
echo "All packages built."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user