Every tarball wraps up a directory tree, so how it is organised depends on how the tree was organised. There are no rules for tarballs in general.
When it comes to tarballs for specific purposes, they are usually more uniform in their structure. A source code tree will typically be quite shallow and contain only a few subdirectories. There is often one called src for the actual source code, and there may be others for documentation files or an internal library. And there are some standard files that you expect to find in a top-level source directory. For example there will usually be a README file and there may be a separate INSTALL file.
If the package was built with autotools (the old-fashioned way of building source packages), there will be a configure script to run and some Makefiles. Packages built with more modern tools like meson will look different.
The INSTALL and README files will tell you what commands to run to compile and install the package, which makes it pretty easy even for a newbie. What you get at the end of the build is a lot of compiled binary files, and the final stage is to install these in their proper places. For a traditional autotools package, you would do this with "sudo make install". Note that you need root privileges (usually grabbed with sudo) to carry out this stage, but you don't need them for the actual compilation.
As to how it "looks", source code is highly-specialised text, whereas compiled files are binary code, so of course they will look quite different.
|