| OLD | NEW |
| 1 #!/bin/bash -e | 1 #!/bin/bash -e |
| 2 | 2 |
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium 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 SCRIPTDIR="$(dirname "$(readlink -f "$0")")" | 7 SCRIPTDIR="$(dirname "$(readlink -f "$0")")" |
| 8 PACKAGE="chrome-remote-desktop" | 8 PACKAGE="chrome-remote-desktop" |
| 9 ARCHITECTURE=$(dpkg-architecture | awk -F '=' '/DEB_BUILD_ARCH=/{print $2}') | 9 ARCHITECTURE=$(dpkg-architecture | awk -F '=' '/DEB_BUILD_ARCH=/{print $2}') |
| 10 REPOCONFIG="deb http://dl.google.com/linux/chrome-remote-desktop/deb/ stable mai
n" | 10 REPOCONFIG="deb http://dl.google.com/linux/chrome-remote-desktop/deb/ stable mai
n" |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 -f $remoting_version_path -t "@PATCH@") | 33 -f $remoting_version_path -t "@PATCH@") |
| 34 version_full="$version_major.$version_minor.$version_build.$version_patch" | 34 version_full="$version_major.$version_minor.$version_build.$version_patch" |
| 35 echo $version_full | 35 echo $version_full |
| 36 } | 36 } |
| 37 | 37 |
| 38 usage() { | 38 usage() { |
| 39 echo "usage: $(basename $0) [-hp] [-o path] [-s path]" | 39 echo "usage: $(basename $0) [-hp] [-o path] [-s path]" |
| 40 echo "-h this help message" | 40 echo "-h this help message" |
| 41 echo "-p just print the expected DEB filename that this will build." | 41 echo "-p just print the expected DEB filename that this will build." |
| 42 echo "-s path to the top of the src tree." | 42 echo "-s path to the top of the src tree." |
| 43 echo "-o path to write the DEB file to." | 43 echo "-o output directory path." |
| 44 } | 44 } |
| 45 | 45 |
| 46 while getopts ":s:o:ph" OPTNAME | 46 while getopts ":s:o:ph" OPTNAME |
| 47 do | 47 do |
| 48 case $OPTNAME in | 48 case $OPTNAME in |
| 49 s ) | 49 s ) |
| 50 src_root="$(readlink -f "$OPTARG")" | 50 src_root="$(readlink -f "$OPTARG")" |
| 51 ;; | 51 ;; |
| 52 o ) | 52 o ) |
| 53 OUTPUT_PATH="$(readlink -f "$OPTARG")" | 53 OUTPUT_PATH="$(readlink -f "$OPTARG")" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 if [[ -n "$merge_head" ]]; then | 100 if [[ -n "$merge_head" ]]; then |
| 101 revision="$(git svn find-rev "$merge_head" 2>/dev/null || true)" | 101 revision="$(git svn find-rev "$merge_head" 2>/dev/null || true)" |
| 102 else | 102 else |
| 103 # Official builders still use svn-based builds. | 103 # Official builders still use svn-based builds. |
| 104 revision="$(svn info . | awk '/^Revision: /{print $2}')" | 104 revision="$(svn info . | awk '/^Revision: /{print $2}')" |
| 105 fi | 105 fi |
| 106 if [[ -n "$revision" ]]; then | 106 if [[ -n "$revision" ]]; then |
| 107 revision_text="(r$revision)" | 107 revision_text="(r$revision)" |
| 108 fi | 108 fi |
| 109 | 109 |
| 110 if [[ ! "$OUTPUT_PATH" ]]; then |
| 111 OUTPUT_PATH="${SCRIPTDIR}/../../../../out/Release" |
| 112 fi |
| 113 |
| 110 echo "Building version $version_full $revision_text" | 114 echo "Building version $version_full $revision_text" |
| 111 | 115 |
| 112 # Create a fresh debian/changelog. | 116 # Create a fresh debian/changelog. |
| 113 export DEBEMAIL="The Chromium Authors <chromium-dev@chromium.org>" | 117 export DEBEMAIL="The Chromium Authors <chromium-dev@chromium.org>" |
| 114 rm -f debian/changelog | 118 rm -f debian/changelog |
| 115 debchange --create \ | 119 debchange --create \ |
| 116 --package "$PACKAGE" \ | 120 --package "$PACKAGE" \ |
| 117 --newversion "$version_full" \ | 121 --newversion "$version_full" \ |
| 118 --force-distribution \ | 122 --force-distribution \ |
| 119 --distribution unstable \ | 123 --distribution unstable \ |
| 120 "New Debian package $revision_text" | 124 "New Debian package $revision_text" |
| 121 | 125 |
| 122 | 126 |
| 123 CRON_SCRIPT_DIR="${SCRIPTDIR}/../../../../out/Release/remoting/installer/cron" | 127 CRON_SCRIPT_DIR="${OUTPUT_PATH}/remoting/installer/cron" |
| 124 mkdir -p ${CRON_SCRIPT_DIR} | 128 mkdir -p ${CRON_SCRIPT_DIR} |
| 125 process_template \ | 129 process_template \ |
| 126 "${SCRIPTDIR}/../../../../chrome/installer/linux/common/repo.cron" \ | 130 "${SCRIPTDIR}/../../../../chrome/installer/linux/common/repo.cron" \ |
| 127 "${CRON_SCRIPT_DIR}/chrome-remote-desktop" | 131 "${CRON_SCRIPT_DIR}/chrome-remote-desktop" |
| 128 | 132 |
| 129 # TODO(mmoss): This is a workaround for a problem where dpkg-shlibdeps was | 133 # TODO(mmoss): This is a workaround for a problem where dpkg-shlibdeps was |
| 130 # resolving deps using some of our build output shlibs (i.e. | 134 # resolving deps using some of our build output shlibs (i.e. |
| 131 # out/Release/lib.target/libfreetype.so.6), and was then failing with: | 135 # out/Release/lib.target/libfreetype.so.6), and was then failing with: |
| 132 # dpkg-shlibdeps: error: no dependency information found for ... | 136 # dpkg-shlibdeps: error: no dependency information found for ... |
| 133 # It's not clear if we ever want to look in LD_LIBRARY_PATH to resolve deps, | 137 # It's not clear if we ever want to look in LD_LIBRARY_PATH to resolve deps, |
| 134 # but it seems that we don't currently, so this is the most expediant fix. | 138 # but it seems that we don't currently, so this is the most expediant fix. |
| 135 SAVE_LDLP=$LD_LIBRARY_PATH | 139 SAVE_LDLP=$LD_LIBRARY_PATH |
| 136 unset LD_LIBRARY_PATH | 140 unset LD_LIBRARY_PATH |
| 137 dpkg-buildpackage -b -us -uc | 141 BUILD_DIR=$OUTPUT_PATH dpkg-buildpackage -b -us -uc |
| 138 LD_LIBRARY_PATH=$SAVE_LDLP | 142 LD_LIBRARY_PATH=$SAVE_LDLP |
| 139 | 143 |
| 140 if [[ "$OUTPUT_PATH" ]]; then | 144 mv ../${PACKAGE}_*.deb "$OUTPUT_PATH"/ |
| 141 mv ../${PACKAGE}_*.deb "$OUTPUT_PATH"/ | 145 mv ../${PACKAGE}_*.changes "$OUTPUT_PATH"/ |
| 142 mv ../${PACKAGE}_*.changes "$OUTPUT_PATH"/ | |
| 143 fi | |
| OLD | NEW |