Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 # | 4 # |
| 5 # This script should not be run directly but sourced by the other | 5 # This script should not be run directly but sourced by the other |
| 6 # scripts (e.g. sysroot-creator-trusty.sh). Its up to the parent scripts | 6 # scripts (e.g. sysroot-creator-trusty.sh). Its up to the parent scripts |
| 7 # to define certain environment variables: e.g. | 7 # to define certain environment variables: e.g. |
| 8 # DISTRO=ubuntu | 8 # DISTRO=ubuntu |
| 9 # DIST=trusty | 9 # DIST=trusty |
| 10 # APT_REPO=http://archive.ubuntu.com/ubuntu | 10 # APT_REPO=http://archive.ubuntu.com/ubuntu |
| (...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 368 mkdir -p ${INSTALL_ROOT}/usr/lib/pkgconfig | 368 mkdir -p ${INSTALL_ROOT}/usr/lib/pkgconfig |
| 369 mv ${INSTALL_ROOT}/usr/lib/mipsel-linux-gnu/pkgconfig/* \ | 369 mv ${INSTALL_ROOT}/usr/lib/mipsel-linux-gnu/pkgconfig/* \ |
| 370 ${INSTALL_ROOT}/usr/lib/pkgconfig | 370 ${INSTALL_ROOT}/usr/lib/pkgconfig |
| 371 } | 371 } |
| 372 | 372 |
| 373 | 373 |
| 374 InstallIntoSysroot() { | 374 InstallIntoSysroot() { |
| 375 Banner "Install Libs And Headers Into Jail" | 375 Banner "Install Libs And Headers Into Jail" |
| 376 | 376 |
| 377 mkdir -p ${BUILD_DIR}/debian-packages | 377 mkdir -p ${BUILD_DIR}/debian-packages |
| 378 mkdir -p ${INSTALL_ROOT} | 378 mkdir -p ${INSTALL_ROOT}/debian |
| 379 touch ${INSTALL_ROOT}/debian/control | |
|
Sam Clegg
2016/10/11 03:06:46
Why make an empty control file here?
Tom (Use chromium acct)
2016/10/11 05:33:55
you need it to run dpkg-shlibdeps
Lei Zhang
2016/10/12 01:15:47
Maybe just add a brief comment to explain why it e
Tom (Use chromium acct)
2016/10/12 01:23:48
Done.
| |
| 379 while (( "$#" )); do | 380 while (( "$#" )); do |
| 380 local file="$1" | 381 local file="$1" |
| 381 local package="${BUILD_DIR}/debian-packages/${file##*/}" | 382 local package="${BUILD_DIR}/debian-packages/${file##*/}" |
| 382 shift | 383 shift |
| 383 local sha256sum="$1" | 384 local sha256sum="$1" |
| 384 shift | 385 shift |
| 385 if [ "${#sha256sum}" -ne "64" ]; then | 386 if [ "${#sha256sum}" -ne "64" ]; then |
| 386 echo "Bad sha256sum from package list" | 387 echo "Bad sha256sum from package list" |
| 387 exit 1 | 388 exit 1 |
| 388 fi | 389 fi |
| 389 | 390 |
| 390 Banner "Installing ${file}" | 391 Banner "Installing ${file}" |
| 391 DownloadOrCopy ${APT_REPO}/pool/${file} ${package} | 392 DownloadOrCopy ${APT_REPO}/pool/${file} ${package} |
| 392 if [ ! -s "${package}" ] ; then | 393 if [ ! -s "${package}" ] ; then |
| 393 echo | 394 echo |
| 394 echo "ERROR: bad package ${package}" | 395 echo "ERROR: bad package ${package}" |
| 395 exit 1 | 396 exit 1 |
| 396 fi | 397 fi |
| 397 echo "${sha256sum} ${package}" | sha256sum --quiet -c | 398 echo "${sha256sum} ${package}" | sha256sum --quiet -c |
| 398 | 399 |
| 399 SubBanner "Extracting to ${INSTALL_ROOT}" | 400 SubBanner "Extracting to ${INSTALL_ROOT}" |
| 400 dpkg --fsys-tarfile ${package}\ | 401 dpkg-deb -x ${package} ${INSTALL_ROOT} |
| 401 | tar -xf - -C ${INSTALL_ROOT} | |
| 402 | 402 |
| 403 base_package=$(dpkg-deb --field ${package} Package) | |
| 404 mkdir -p ${INSTALL_ROOT}/debian/${base_package}/DEBIAN | |
|
Sam Clegg
2016/10/11 03:06:46
How are these "/debian" directories then passed to
Tom (Use chromium acct)
2016/10/11 05:33:55
you cd to the dir containing debian/ and then run
| |
| 405 dpkg-deb -e ${package} ${INSTALL_ROOT}/debian/${base_package}/DEBIAN | |
| 403 done | 406 done |
| 404 | 407 |
| 405 # Prune /usr/share, leaving only pkgconfig | 408 # Prune /usr/share, leaving only pkgconfig |
| 406 for name in ${INSTALL_ROOT}/usr/share/*; do | 409 for name in ${INSTALL_ROOT}/usr/share/*; do |
| 407 if [ "${name}" != "${INSTALL_ROOT}/usr/share/pkgconfig" ]; then | 410 if [ "${name}" != "${INSTALL_ROOT}/usr/share/pkgconfig" ]; then |
| 408 rm -r ${name} | 411 rm -r ${name} |
| 409 fi | 412 fi |
| 410 done | 413 done |
| 411 } | 414 } |
| 412 | 415 |
| (...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 824 echo " $0 help" | 827 echo " $0 help" |
| 825 exit 1 | 828 exit 1 |
| 826 else | 829 else |
| 827 ChangeDirectory | 830 ChangeDirectory |
| 828 if echo $1 | grep -qs "All$"; then | 831 if echo $1 | grep -qs "All$"; then |
| 829 "$@" | 832 "$@" |
| 830 else | 833 else |
| 831 RunCommand "$@" | 834 RunCommand "$@" |
| 832 fi | 835 fi |
| 833 fi | 836 fi |
| OLD | NEW |