Part 4 Emerge Process

WARNING:
THESE ARE MY PERSONAL NOTES ON MY FIRST EBUILD.
THIS IS BY NO MEANS A USEFUL GUIDE OR ANYTHING SIMILAR TO ANYONE.
RTFM

I’ll try to write an ebuild from scratch and document the progress here.

Ebuild from scratch: Part 4 : Understanding basic installation process

Being far from understanding all, this is my short summary.

Basic ebuild processing

When an ebuild is processed, this seems to happen:

  1. First variables are defined
  2. Then functions are called. They react to the set variables.
    Defaults for these functions are automatically provided, they can be overridden in an ebuild.
  3. Including xzy means the eclass is run through. (git-2.eclass in my example of MultiMarkdown).
    Eclass work the same way (react to set variables, default functions which can be overridden in ebuild).

Not to hard to understand, or not?

More info

  • Gentoo Development Guide : Quickstart Ebuild Guide:
    Sample header of an ebuild file:

    # Copyright 1999-2010 Gentoo Foundation
    # Distributed under the terms of the GNU General Public License v2
    # $Header: $
    DESCRIPTION="Exuberant ctags generates tags files for quick source navigation"
    HOMEPAGE="http://ctags.sourceforge.net"
    SRC_URI="mirror://sourceforge/ctags/${P}.tar.gz"
    LICENSE="GPL-2"
    SLOT="0"
    KEYWORDS="~mips ~sparc ~x86"
    IUSE=""
  • Gentoo Development Guide : Ebuild Functions:

    When installing packages from source, the function call order is pkg_setup, src_unpack, src_prepare, src_compile, src_test (optional, FEATURES=”test”), src_install, pkg_preinst, pkg_postinst.

    So these are the interesting functions …


Home: Ebuild From Scratch
Previous chapter: Part 3 Links & Info
Next chapter: Part 5 Basic Ebuild

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: