# Example of a satellite file, which is just a shell script with a cool name.
import "say_hello" # Import some functions. See functions/say_hello.sh for more info.
# Info (Please declare it, as it will be used outside of this script, too)
name=hello # Name of the software, not the package name.
# Same source files will be used for the same software, despite the package name being different.
version=2.10
update_url="https://ftp.gnu.org/gnu/$name/" # URL to a downloadable plain-text file which updates when a new version is available.
vcs_compile=true # Set this to true if it's a vcs package, and we've just downloaded an update for it. This is meant to be used in functions/header_end hooks, and has to be set before header_end is called (or by a header_end hook).
# Astronaut will generally prefix internal variables with "_". There are, however, a few exceptions.
# Some of those you can touch, some not.
# "You shouldn't even look, unless you're hacking really bad, but definitely don't touch"-variables:
# - dir_build (You cd into it automatically. Just use relative paths or $PWD.)
# - dir_source (This is handled by the commands detailed below. You should have no use for it.)
# "Look, but don't touch"-variables:
# - dir_install
# - dir_prefix
# - dir_sysroot
# "You'll only make your own life more difficult if you use them wrong, so I don't care what you do"-variables:
# (Only use these to change the behaviour of some commands over the whole script.)
# - cmd_download
# - cmd_extract
# - enable_check
# - vcs_compile
# Get them files.
# URL [REQUIRED], MD5sum, Custom command
download "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
"6cd0ffea3884a4e79330338dcc2987d6" \
"curl -L -o {dst} {src}"
# Abbreviation download and extract. Does not allow custom commands.
#dlextract "https://ftp.gnu.org/gnu/$name/$name-$version.tar.gz" \
# "6cd0ffea3884a4e79330338dcc2987d6"
# Abbreviation for downloading a file and copying it over.
#dlfile "http://example.com/Waffles.txt" \
# "MD5SUM"
# Copy local file to build directory. File should be stored in $(basedir <satellite file>)/extrafiles/$name/
#extrafile "Herpaderp.txt"
header_end # End of the header.
# The only commands that should be in the header are:
# - download
# - dlextract
# - dlfile
# - extrafile
# getfile and extract are technically allowed, but not encouraged.
# Name [REQUIRED], Destination, Custom command
extract "$name-$version.tar.gz" \
"." \
"tar xvfC {src} {dst}"
# Copy some file you downloaded over to the build directory.
#getfile "Waffles.txt"
# Compilation instructions
cd "$name-$version"
./configure --prefix="$dir_prefix"
make
# Know if the user wants the package to be checked
if do_check; then
make check
fi
# Abbreviation for the above, for single commands
#do_check make check
make DESTDIR="$dir_install" install
# Call the function we imported. For more info see the top of the file, and functions/say_hello.sh
say_hello
# vim:set tabstop=4 shiftwidth=4 syntax=sh et: