Project:Games/Ebuild howto

Introduction
General introduction on writing ebuilds is documented in the Gentoo Development Guide and the Gentoo Package Manager Specification.

The old games eclass is deprecated (see ), it must not be used for new ebuilds.

Here we describe the old games eclass and additional game specific procedures.

The deprecated games.eclass
The deprecated is used by several ebuilds on Gentoo. There are separate eclasses for some of the more commonly modified titles.

If you use a function from an eclass, you must inherit it. Also, always list the games eclass last, unless using another games eclass to override the default games functionality. More on this will be explained later. The games eclass, which will be explained below, is full of functions common to all games ebuilds, and also sets up new defaults for certain ebuild functions, such as pkg_preinst, pkg_postinst, src_compile, and pkg_setup. It also contains some variables that we will use across all games ebuilds, to maintain consistency.

Variables
The games.eclass provides many variables that control all aspects of a games ebuild. Below is a listing of the variables provided by the eclass, their defaults, and a description of each.

One thing you need to be aware of when creating a games ebuild is that we do not allow games to write to /usr, so any game that does so will need to be patched to write to ${GAMES_STATEDIR} or ${HOME} instead.

Functions
There are many functions within the games.eclass for you to use. Some of them are convenience functions, and some of them are an absolute requirement.

This covers all of the games.eclass functions.