| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 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 # TODO(mmoss) This currently only works with official builds, since non-official | 7 # TODO(mmoss) This currently only works with official builds, since non-official |
| 8 # builds don't add the "${BUILDDIR}/installer/" files needed for packaging. | 8 # builds don't add the "${BUILDDIR}/installer/" files needed for packaging. |
| 9 | 9 |
| 10 set -e | 10 set -e |
| 11 set -o pipefail |
| 11 if [ "$VERBOSE" ]; then | 12 if [ "$VERBOSE" ]; then |
| 12 set -x | 13 set -x |
| 13 fi | 14 fi |
| 14 set -u | 15 set -u |
| 15 | 16 |
| 16 # Create the Debian changelog file needed by dpkg-gencontrol. This just adds a | 17 # Create the Debian changelog file needed by dpkg-gencontrol. This just adds a |
| 17 # placeholder change, indicating it is the result of an automatic build. | 18 # placeholder change, indicating it is the result of an automatic build. |
| 18 # TODO(mmoss) Release packages should create something meaningful for a | 19 # TODO(mmoss) Release packages should create something meaningful for a |
| 19 # changelog, but simply grabbing the actual 'svn log' is way too verbose. Do we | 20 # changelog, but simply grabbing the actual 'svn log' is way too verbose. Do we |
| 20 # have any type of "significant/visible changes" log that we could use for this? | 21 # have any type of "significant/visible changes" log that we could use for this? |
| (...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 | 254 |
| 254 # Generate the dependencies, | 255 # Generate the dependencies, |
| 255 # TODO(mmoss): This is a workaround for a problem where dpkg-shlibdeps was | 256 # TODO(mmoss): This is a workaround for a problem where dpkg-shlibdeps was |
| 256 # resolving deps using some of our build output shlibs (i.e. | 257 # resolving deps using some of our build output shlibs (i.e. |
| 257 # out/Release/lib.target/libfreetype.so.6), and was then failing with: | 258 # out/Release/lib.target/libfreetype.so.6), and was then failing with: |
| 258 # dpkg-shlibdeps: error: no dependency information found for ... | 259 # dpkg-shlibdeps: error: no dependency information found for ... |
| 259 # It's not clear if we ever want to look in LD_LIBRARY_PATH to resolve deps, | 260 # It's not clear if we ever want to look in LD_LIBRARY_PATH to resolve deps, |
| 260 # but it seems that we don't currently, so this is the most expediant fix. | 261 # but it seems that we don't currently, so this is the most expediant fix. |
| 261 SAVE_LDLP=${LD_LIBRARY_PATH:-} | 262 SAVE_LDLP=${LD_LIBRARY_PATH:-} |
| 262 unset LD_LIBRARY_PATH | 263 unset LD_LIBRARY_PATH |
| 263 DPKG_SHLIB_DEPS=$(dpkg-shlibdeps -O "$BUILDDIR/chrome" 2> /dev/null | \ | 264 DPKG_SHLIB_DEPS=$(dpkg-shlibdeps -O "$BUILDDIR/chrome" | \ |
| 264 sed 's/^shlibs:Depends=//') | 265 sed 's/^shlibs:Depends=//') |
| 265 if [ -n "$SAVE_LDLP" ]; then | 266 if [ -n "$SAVE_LDLP" ]; then |
| 266 LD_LIBRARY_PATH=$SAVE_LDLP | 267 LD_LIBRARY_PATH=$SAVE_LDLP |
| 267 fi | 268 fi |
| 268 | 269 |
| 269 # Format it nicely and save it for comparison. | 270 # Format it nicely and save it for comparison. |
| 270 # The grep -v is for a duplicate libc6 dep caused by Lucid glibc silliness. | 271 # The grep -v is for a duplicate libc6 dep caused by Lucid glibc silliness. |
| 271 echo "$DPKG_SHLIB_DEPS" | sed 's/, /\n/g' | \ | 272 echo "$DPKG_SHLIB_DEPS" | sed 's/, /\n/g' | \ |
| 272 grep -v '^libc6 (>= 2.3.6-6~)$' > actual | 273 grep -v '^libc6 (>= 2.3.6-6~)$' > actual |
| 273 | 274 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 ;; | 322 ;; |
| 322 * ) | 323 * ) |
| 323 echo | 324 echo |
| 324 echo "ERROR: Don't know how to build DEBs for '$TARGETARCH'." | 325 echo "ERROR: Don't know how to build DEBs for '$TARGETARCH'." |
| 325 echo | 326 echo |
| 326 exit 1 | 327 exit 1 |
| 327 ;; | 328 ;; |
| 328 esac | 329 esac |
| 329 | 330 |
| 330 do_package | 331 do_package |
| OLD | NEW |