diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cpt-lib.in | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/cpt-lib.in b/src/cpt-lib.in index 2af31fb..1f9ca83 100644 --- a/src/cpt-lib.in +++ b/src/cpt-lib.in @@ -385,6 +385,7 @@ as_root() { CPT_PID="$CPT_PID" \ CPT_PROMPT="$CPT_PROMPT" \ CPT_ROOT="$CPT_ROOT" \ + CPT_CROSS_TRIPLET="$CPT_CROSS_TRIPLET" \ CPT_TMPDIR="$CPT_TMPDIR" \ "$@" @@ -1835,7 +1836,7 @@ create_cache() { mkdir -p "${cac_dir:=${CPT_CACHE:=${XDG_CACHE_HOME:-$HOME/.cache}/cpt}}" \ "${src_dir:=$cac_dir/sources}" \ "${log_dir:=$cac_dir/logs}" \ - "${bin_dir:=$cac_dir/bin}" + "${bin_dir:=$cac_dir/$CPT_CROSS_TRIPLET${CPT_CROSS_TRIPLET:+-}bin}" # Set the location to the repository and package database. pkg_db=var/db/cpt/installed @@ -1917,6 +1918,18 @@ create_cache() { colory="\033[1;33m" colorb="\033[1;36m" colre="\033[m" fi + # Set default package directories so that they can be parsed from package + # helpers + # TODO Document + : "${CPT_PKG_PREFIX:=/usr}" \ + "${CPT_PKG_ETCDIR:=/etc}" \ + "${CPT_PKG_LIBDIR:=$CPT_PKG_PREFIX/lib}" \ + "${CPT_PKG_BINDIR:=$CPT_PKG_PREFIX/bin}" \ + "${CPT_PKG_SBINDIR:=$CPT_PKG_PREFIX/bin}" \ + "${CPT_PKG_MANDIR:=/usr/share/man}" \ + "${CPT_PKG_INFODIR:=/usr/share/info}" \ + "${CPT_PKG_LOCALSTATEDIR:=/var}" + } # If the library is being called with its own name, run arguments. |