Build: Extract debian control files to sysroots
Adapted from sbc@'s CL https://codereview.chromium.org/2391183002/ R=thestig@chromium.org,sbc@chromium.org BUG=564904 Review-Url: https://codereview.chromium.org/2405073002 Cr-Original-Commit-Position: refs/heads/master@{#424641} Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src Cr-Mirrored-Commit: 58974f62d368d3d6dc2f58fe80741804d2147675
This commit is contained in:
Родитель
87a16ead26
Коммит
87ea4e1ce7
|
@ -375,7 +375,11 @@ InstallIntoSysroot() {
|
|||
Banner "Install Libs And Headers Into Jail"
|
||||
|
||||
mkdir -p ${BUILD_DIR}/debian-packages
|
||||
mkdir -p ${INSTALL_ROOT}
|
||||
# The /debian directory is an implementation detail that's used to cd into
|
||||
# when running dpkg-shlibdeps.
|
||||
mkdir -p ${INSTALL_ROOT}/debian
|
||||
# An empty control file is necessary to run dpkg-shlibdeps.
|
||||
touch ${INSTALL_ROOT}/debian/control
|
||||
while (( "$#" )); do
|
||||
local file="$1"
|
||||
local package="${BUILD_DIR}/debian-packages/${file##*/}"
|
||||
|
@ -397,9 +401,11 @@ InstallIntoSysroot() {
|
|||
echo "${sha256sum} ${package}" | sha256sum --quiet -c
|
||||
|
||||
SubBanner "Extracting to ${INSTALL_ROOT}"
|
||||
dpkg --fsys-tarfile ${package}\
|
||||
| tar -xf - -C ${INSTALL_ROOT}
|
||||
dpkg-deb -x ${package} ${INSTALL_ROOT}
|
||||
|
||||
base_package=$(dpkg-deb --field ${package} Package)
|
||||
mkdir -p ${INSTALL_ROOT}/debian/${base_package}/DEBIAN
|
||||
dpkg-deb -e ${package} ${INSTALL_ROOT}/debian/${base_package}/DEBIAN
|
||||
done
|
||||
|
||||
# Prune /usr/share, leaving only pkgconfig
|
||||
|
|
Загрузка…
Ссылка в новой задаче