rpm-rebuilder is  a tool to  compile a set  of SRPMS. To feed  it, you
need  to provide  a configuration  file in  /etc/rpm-rebuilder.conf or
$HOME/.rpm-rebuilder. The location of this 2 files can be changed with
the RB_GLOBAL_CONFIG  and RB_USER_CONFIG environment  variables. These
files  are  shell  scripts  which  are sourced  by  the  rpm-rebuilder
script. The variable which can be configured are the following:

RPM_REBUILDER_LIB the location of the scripts used by rpm-rebuilder.
(default /usr/share/rpm-rebuilder).

RB_LABORATORY the directory where rpm-rebuilder will store the log
and the recompiled RPMS. (default $HOME/rpm-rebuilder).

LOCAL_ARCH the arch used by rpm (default i386).

SRPMS_DIRS list of directories where to find SRPMS to compile. (mandatory)

RPMS_DIRS list of directories where to find already compiled RPMS. (mandatory)

RPM_TOP_DIR root directory where rpm stores its files when it builds
RPMS. (default $RB_LABORATORY/RPM)

RPM_DEST_DIR directory where generated RPMS will be stored. (mandatory)

INSTALL_RPMS if set, a rpm --freshen is tried on the generated RPMS via
sudo (you need to setup sudo not to ask a pass).

INSTALLER if set and INSTALL_RPMS too, $INSTALLER is called to install
the compiled packages instead of /usr/bin/sudo rpm --freshen -vh. The
newly compiled are given as parameters.

REMOVE_MODE if set, generated RPMS are removed. This can be usefull if
you just want to test if the set of packages compiles.

ABORT_ON_FAILURE if set, abort the compilation phasis if a failure
happens

SRPM_DEST_DIR dir where to save source rpms if SAVE_SRPMS is set.

PKG_MODIFIER may point to an executable which can modify the spec (which
is given in arg) or anything before rebuilding the package.

ORDERER may point to a script which receive the unordered dir and ordered dir
as arguments to compute the order of compilation by making symlinks sorted
alphabetically.

NO_URPMI_DEP if not set, rpm-rebuilder will install and remove via
sudo urpmi and sudo urpme to install dependencies and remove
conflicts.

Here is my ~/.rpm-rebuilder file to compile on sparc:

# -*- shell-script -*-
RPM_REBUILDER_LIB=$HOME/work/rpm-rebuilder
SRPMS_DIRS=/cooker/SRPMS
RPM_TOP_DIR=$HOME/rpm-rebuilder/RPM
RPM_DEST_DIR=/sparc/Mandrake/RPMS
RPMS_DIRS=$RPM_DEST_DIR
FAKEARCH=sparc32
#FAKEROOT=sudo
LOCAL_ARCH=sparc
INSTALL_RPMS=1
SAVE_SRPM=1
SRPM_DEST_DIR=$HOME/pkg/SRPMS
