Hardware Reference
In-Depth Information
Listing 11-1. A Sample ebuild File (Copyright 1999-2012 Gentoo Foundation)
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4
DESCRIPTION="A useful Description of the package"
HOMEPAGE=" http://the home page of the package "
SRC_URI="mirror://the full path to the exact source archive"
LICENSE="What license the source is under"
SLOT="Which slot to install into"
KEYWORDS="Any keyboards if needed"
# Configure the source
src_configure() {
econf --Place your configure options hear
}
# Install the source
src_install() {
emake DESTDIR="${D}" install
# Create documentation for the source.
dodoc FAQ NEWS README
dohtml EXTENDING.html ctags.html
}
As you can see, this file just runs your standard ./configure , make , and make install tools. This means that
every application you want on your Gentoo system from the ping utility all the way up to your window manager must
be compiled from source code. Gentoo compiles everything from source and because of this the distribution was
responsible for a large number of bug fixes to the GCC tool chain that resulted in a lot of performance improvements
for the GCC. So everyone in the Linux community has benefited from Gentoo's slightly odd way of building an entire
operating system from source.
Aside from this benefit to the Linux community as a whole, the source distribution provides a very big advantage
for the end user as well. When you go to install a package in Gentoo you will be given the option to specify something
called use flags . Use flags interact with the configure stage of the build and set what parts of the application you
would like compiled in with the application binary. For example, you may want to install nmap but you don't like
using the GUI (after all, the command line is better). Under Gentoo's use flag system you simply instruct the emerge
tool not to build nmap with the GUI. This gives you a faster and cleaner lightweight system. It also may give you a lot
of headaches when you notice that some applications depend on some feature that you had removed and you now
require two hours of recompiling to enable a very small feature.
In the binary world of package management like in Fedora you do not get this choice: the package builder has
already selected what will be part of the package for you. This makes for better compatibility between packages and
stability between packages but it comes at the lack of choice for the end user. Gentoo is all about end-user choice.
If you wanted to, there would be nothing stopping you building a system with no X and just installing Minicom or
having an eye-candy display of KDE 4. You can also have a mix of both: the choice is yours and its Gentoo's strength
and its weakness.
 
Search WWH ::




Custom Search