unpack extracts a tarball in the current working directory or in a specified directory.
unpack recognises the following file extensions: tar, tar.gz, tgz, tar.bz2, tbz2, tar.Z.
unpack is called automatically from fetch(3) (and thus sub(3)) if the fetched package is a tarball. So you seldomly need to call it explicitly from within your configuration script.