function unpack_source
Main purpose
Decompress the requested tarball inside the SRC_DIR.
Notes
Archive decompression is complicated since src2pkg supports several
very different types of archives as 'source' input -including binary
content which is structured within Linux File System Hierarchy and rpm
archives which sometimes contain one or more compressed archives which
must be decompressed. src2pkg 'recognizes' these formats as it works
and decides what to do.
Once the archive is decompressed src2pkg has its' first chance to see
what the content might be. unpack_source calls an internal function
which looks at the content to see if it is binary content or some sort
of source code. Basically it looks for a linux-type directory structure
with directories like etc, usr, opt, bin or other. It also looks for
rpm .spec files, debian control files or install directories. If it
finds this type of content it will be treated as binary content and
later copied into the PKG_DIR and corrected instead of configuring and
compiling it(these steps will be skipped).
If the archive appears to contain source it will be further analyzed by
later functions.