| Index: src/third_party/ibus-chewing/make_pkg.sh
|
| diff --git a/src/third_party/ibus-chewing/make_pkg.sh b/src/third_party/ibus-chewing/make_pkg.sh
|
| new file mode 100755
|
| index 0000000000000000000000000000000000000000..4657f02e7e4ff371cde1ceaca634d89e80f62d25
|
| --- /dev/null
|
| +++ b/src/third_party/ibus-chewing/make_pkg.sh
|
| @@ -0,0 +1,44 @@
|
| +#!/bin/bash
|
| +
|
| +# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
| +
|
| +# Builds the .deb package.
|
| +
|
| +# Load common constants. This should be the first executable line.
|
| +# The path to common.sh should be relative to your script's location.
|
| +COMMON_SH="$(dirname "$0")/../../scripts/common.sh"
|
| +. "$COMMON_SH"
|
| +
|
| +# Command line options
|
| +DEFINE_string build_root "$DEFAULT_BUILD_ROOT" "Root of build output"
|
| +
|
| +# Parse command line and update positional args
|
| +FLAGS "$@" || exit 1
|
| +eval set -- "${FLAGS_ARGV}"
|
| +
|
| +# Die on any errors
|
| +set -e
|
| +
|
| +# Remove previous package from output dir
|
| +PKG_BASE="ibus-chewing"
|
| +# TODO(yusukes): support ARM.
|
| +OUT_DIR="$FLAGS_build_root/x86/local_packages"
|
| +rm -f "${OUT_DIR}/${PKG_BASE}_"*.deb
|
| +
|
| +# Set up the debian build directory.
|
| +PKG_BUILD_DIR="${FLAGS_build_root}/${PKG_BASE}"
|
| +mkdir -p "$PKG_BUILD_DIR"
|
| +rm -rf "${PKG_BUILD_DIR}/build"
|
| +cp -rp "${TOP_SCRIPT_DIR}/files" "${PKG_BUILD_DIR}/build"
|
| +pushd "${PKG_BUILD_DIR}/build"
|
| +# Apply patches
|
| +gunzip -c "${TOP_SCRIPT_DIR}/ibus-chewing_1.2.0.20090818-2.diff.gz" | patch -p1
|
| +chmod u+x ./debian/rules
|
| +
|
| +# Build the package
|
| +dpkg-buildpackage -b -tc -us -uc
|
| +mv ../"${PKG_BASE}"_*.deb "${OUT_DIR}"
|
| +rm -f ../"${PKG_BASE}"_*.changes
|
| +popd
|
|
|