|
|
@ -3,35 +3,35 @@ |
|
|
|
# Configuration |
|
|
|
|
|
|
|
# Build/install-time directories |
|
|
|
dir_build="/tmp/astronaut/build" # Temporary directory to build packages |
|
|
|
dir_source="/tmp/astronaut/source" # Directory where the package sources will be placed |
|
|
|
dir_install="/tmp/astronaut/install" # Directory where the package will be installed |
|
|
|
dir_build='/tmp/astronaut/build' # Temporary directory to build packages |
|
|
|
dir_source='/tmp/astronaut/source' # Directory where the package sources will be placed |
|
|
|
dir_install='/tmp/astronaut/install' # Directory where the package will be installed |
|
|
|
# The source directory will have subdirs for each different $name, |
|
|
|
# specified inside the satellite file. |
|
|
|
# The $dir_install variable will have '{pkg}' replaced with $_satname, |
|
|
|
# which is the filename of the satellite, without the .sat suffix. |
|
|
|
|
|
|
|
# Runtime directories |
|
|
|
dir_sysroot="/" # The root directory of the system |
|
|
|
dir_prefix="/usr" # Prefix directory (for /bin, /lib, /share and such) |
|
|
|
dir_sysroot='/' # The root directory of the system |
|
|
|
dir_prefix='/usr' # Prefix directory (for /bin, /lib, /share and such) |
|
|
|
|
|
|
|
# Default commands |
|
|
|
cmd_download="curl -# -L -o {dst} {src}" # Command to execute to download files |
|
|
|
cmd_extract="tar -x -C {dst} -f {src}" # Command to execute to extract files |
|
|
|
cmd_download='curl -# -L -o {dst} {src}' # Command to execute to download files |
|
|
|
cmd_extract='tar -x -C {dst} -f {src}' # Command to execute to extract files |
|
|
|
|
|
|
|
# If we can't find the satellite file, we'll look in this directory for it. |
|
|
|
unset dir_satellites |
|
|
|
|
|
|
|
# Options are comma-separated and parsed from front to back. |
|
|
|
# This means that in "!opt,someotheropt,opt", opt is disabled. |
|
|
|
# This means that in '!opt,someotheropt,opt', opt is disabled. |
|
|
|
|
|
|
|
unset options # The least-priority global options |
|
|
|
package_options() { :; } # Per-package options function. |
|
|
|
# Example for package_options: |
|
|
|
# package_options() { |
|
|
|
# case "$1" in |
|
|
|
# package1) echo "opt1,opt2,opt3" ;; |
|
|
|
# package2) echo "someotheropts" ;; |
|
|
|
# package1) echo 'opt1,opt2,opt3' ;; |
|
|
|
# package2) echo 'someotheropts' ;; |
|
|
|
# esac |
|
|
|
# } |
|
|
|
|
|
|
@ -156,14 +156,14 @@ download() { |
|
|
|
checksum="$(_mksum "$path")" |
|
|
|
if [ "$2" -a "$checksum" != "$2" ]; then |
|
|
|
_msg "Checksum: $checksum" |
|
|
|
_exiterr "Checksum failed" |
|
|
|
_exiterr 'Checksum failed' |
|
|
|
fi |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
extract() { |
|
|
|
_msg "Extracting $1" |
|
|
|
[ "$2" ] && local dest="$2" || local dest="." |
|
|
|
[ "$2" ] && local dest="$2" || local dest='.' |
|
|
|
[ "$3" ] && local cmd="$3" || local cmd="$cmd_extract" |
|
|
|
eval $(echo "$cmd" | sed -e "s@{src}@'$dir_source/$name/$1'@g" -e "s@{dst}@'$dest'@g") |
|
|
|
} |
|
|
|