debootstrap: do not rely on PREFIX environment variable

This commit is contained in:
Leonid Pliushch 2021-10-13 12:50:40 +03:00
parent a292529fae
commit 62e56db70a
No known key found for this signature in database
GPG Key ID: 45F2964132545795
2 changed files with 4 additions and 3 deletions

View File

@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Bootstrap a basic Debian system"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=1.0.124
TERMUX_PKG_REVISION=1
TERMUX_PKG_SRCURL=http://http.debian.net/debian/pool/main/d/debootstrap/debootstrap_${TERMUX_PKG_VERSION}.tar.gz
TERMUX_PKG_SHA256=7700e9864b29f166b26c54153ed8c275b46f4b9a60468bb607e019a64c16cd8f
TERMUX_PKG_DEPENDS="perl, proot, wget"

View File

@ -15,7 +15,7 @@ diff -u -r ../debootstrap-1.0.108/debootstrap ./debootstrap
DEBOOTSTRAP_DIR=/debootstrap
else
- DEBOOTSTRAP_DIR=/usr/share/debootstrap
+ DEBOOTSTRAP_DIR=$PREFIX/share/debootstrap
+ DEBOOTSTRAP_DIR=@TERMUX_PREFIX@/share/debootstrap
fi
fi
@ -24,11 +24,11 @@ diff -u -r ../debootstrap-1.0.108/debootstrap ./debootstrap
if in_path dpkg && \
dpkg --print-architecture >/dev/null 2>&1; then
- HOST_ARCH=$(/usr/bin/dpkg --print-architecture)
+ HOST_ARCH=$($PREFIX/bin/dpkg --print-architecture)
+ HOST_ARCH=$(@TERMUX_PREFIX@/bin/dpkg --print-architecture)
elif in_path udpkg && \
udpkg --print-architecture >/dev/null 2>&1; then
- HOST_ARCH=$(/usr/bin/udpkg --print-architecture)
+ HOST_ARCH=$($PREFIX/bin/udpkg --print-architecture)
+ HOST_ARCH=$(@TERMUX_PREFIX@/bin/udpkg --print-architecture)
elif [ -e "$DEBOOTSTRAP_DIR/arch" ]; then
HOST_ARCH=$(cat "$DEBOOTSTRAP_DIR/arch")
fi