Browse Source
Removed dir_sysroot, changed all dirs to fall directly below dir_prefix (thus removing the need for dir_sysroot, which is only needed in some exotic circumstances anyway), added the ability to build multiple satellites with one command and restructured the way the wrappers work, added configuration file handling in astronautpkg. Updated all satellites accordingly.master
mid-kid
8 years ago
21 changed files with 219 additions and 147 deletions
@ -1,20 +1,31 @@ |
|||
#!/bin/sh -e |
|||
# A hacky script to generate .xbps files using satellites. |
|||
# It's a fairly simple wrapper to astronaut, that generates a xbps package at the end. |
|||
# It's a fairly simple wrapper to astronaut, that generates xbps packages. |
|||
|
|||
# This may also serve as an example on how you can wrap astronaut to package in any format. |
|||
# Sure, no dependency resolution, and the packages won't make it in any official repositories, |
|||
# but it isn't meant for that anyway. |
|||
|
|||
_topdir=$PWD |
|||
# Find astronaut |
|||
_astronaut="$(dirname "$0")/astronaut" |
|||
[ ! -f "$_astronaut" ] && _astronaut="astronaut" |
|||
|
|||
_astronaut_nuke_dir_install=true |
|||
# Configuration |
|||
dir_wrapper_xbps="$PWD" |
|||
|
|||
. "$_astronaut" |
|||
# Wrapper functions |
|||
_astronaut_wrapper_pre() { |
|||
# Make sure to remove the contents of the install directory before building |
|||
_nuke_dir_install=true |
|||
} |
|||
|
|||
_astronaut_wrapper_post() { |
|||
mkdir -p "$dir_wrapper_xbps" |
|||
cd "$dir_wrapper_xbps" |
|||
|
|||
# _dir_xbps should be set from a configuration file (e.g. ~/.astronaut.conf), and points to wherever you want your packages to be placed. |
|||
[ "$dir_wrapper_xbps" ] && mkdir -p "$dir_wrapper_xbps" && cd "$dir_wrapper_xbps" || cd "$_topdir" |
|||
xbps-create --compression none -A "$(uname -m)" -n "$_satname-${version}_astro" -s "Generated with xbps-astronaut" -H "$update_url" "$dir_install" |
|||
xbps-rindex -f -a "$_satname-${version}_astro.$(uname -m).xbps" |
|||
# Create the package |
|||
xbps-create --compression none -A "$(uname -m)" -n "$_satname-${version}_astro" -s "Generated with xbps-astronaut" -H "$update_url" "$dir_install" |
|||
xbps-rindex -f -a "$_satname-${version}_astro.$(uname -m).xbps" |
|||
} |
|||
|
|||
. "$_astronaut" |
|||
|
@ -1,2 +0,0 @@ |
|||
Remove the need for dir_sysroot, using it as an option only in the strictly required packages. |
|||
Update the vcs and compile functions to support better options. |
Loading…
Reference in new issue