diff --git a/astronaut/astronautpkg b/astronaut/astronautpkg index acc10da..66d10cb 100755 --- a/astronaut/astronautpkg +++ b/astronaut/astronautpkg @@ -20,7 +20,9 @@ _astronaut="$(dirname "$0")/astronaut" [ ! -f "$_astronaut" ] && _astronaut='astronaut' # Configuration -dir_wrapper_pkgtools="$PWD" # Where the packages should be stored +wrapper_pkgtools_dir="$PWD" # Where the packages should be stored +wrapper_pkgtools_compression='txz' # What to compress the package with +wrapper_pkgtools_build='astro' # What to use as "generic" build number # Wrapper functions _astronaut_wrapper_pre() { @@ -166,8 +168,8 @@ EOF # Create the package cd "$dir_install" - mkdir -p "$dir_wrapper_pkgtools" - PATH="$PATH:/sbin" $_astronaut_wrapper_fakeroot makepkg -l y -c n "$dir_wrapper_pkgtools/$name_sat-$(echo "$version" | tr - _)-$(uname -m)-astro.txz" + mkdir -p "$wrapper_pkgtools_dir" + PATH="$PATH:/sbin" $_astronaut_wrapper_fakeroot makepkg -l y -c n "$wrapper_pkgtools_dir/$name_sat-$(echo "$version" | tr - _)-$(uname -m)-$wrapper_pkgtools_build.$wrapper_pkgtools_compression" } . "$_astronaut" diff --git a/astronaut/examples/hello.sat b/astronaut/examples/hello.sat index 6cc5e20..537f95a 100644 --- a/astronaut/examples/hello.sat +++ b/astronaut/examples/hello.sat @@ -32,6 +32,7 @@ # Misc variables # - options -- The options this package is built with. # - download_only -- Whether we're in 'download only' mode or not. If we are, you may only create files in $dir_source/$name. +# - wrapper_* -- Reserved for wrapper configuration import 'say_hello' # Import some functions. See functions/say_hello.sh for more info. diff --git a/astronaut/pacman-astronaut b/astronaut/pacman-astronaut index 0c48fab..c054dc4 100755 --- a/astronaut/pacman-astronaut +++ b/astronaut/pacman-astronaut @@ -13,7 +13,7 @@ _astronaut="$(dirname "$0")/astronaut" [ ! -f "$_astronaut" ] && _astronaut="astronaut" # Configuration -dir_wrapper_pacman="$PWD" # Where the packages should be stored +wrapper_pacman_dir="$PWD" # Where the packages should be stored # Wrapper functions _astronaut_wrapper_pre() { @@ -33,8 +33,8 @@ size = $(du -sb --apparent-size "$dir_install" | awk '{print $1}') arch = $(uname -m) EOF - mkdir -p "$dir_wrapper_pacman" - cd "$dir_wrapper_pacman" + mkdir -p "$wrapper_pacman_dir" + cd "$wrapper_pacman_dir" # Create the package bsdtar --strip-components 1 -C "$dir_install" -czf .MTREE --format=mtree --options='!all,use-set,type,uid,gid,mode,time,size,md5,sha256,link' . diff --git a/astronaut/xbps-astronaut b/astronaut/xbps-astronaut index 4011d59..cf6a85d 100755 --- a/astronaut/xbps-astronaut +++ b/astronaut/xbps-astronaut @@ -13,7 +13,7 @@ _astronaut="$(dirname "$0")/astronaut" [ ! -f "$_astronaut" ] && _astronaut="astronaut" # Configuration -dir_wrapper_xbps="$PWD" +wrapper_xbps_dir="$PWD" # Wrapper functions _astronaut_wrapper_pre() { @@ -22,8 +22,8 @@ _astronaut_wrapper_pre() { } _astronaut_wrapper_post() { - mkdir -p "$dir_wrapper_xbps" - cd "$dir_wrapper_xbps" + mkdir -p "$wrapper_xbps_dir" + cd "$wrapper_xbps_dir" # Create the package xbps-create --compression none -A "$(uname -m)" -n "$name_sat-${version}_astro" -s "Generated with xbps-astronaut" -H "$update_url" "$dir_install"