## Rpm

### Description

A basic task for invoking the rpm executable to build a RedHat Package Manager Linux installation file. The task currently only works on Linux or other Unix platforms with rpm support.

### Parameters

Attribute | Description | Required
specFile | The name of the spec file to be used. This must be relative to the SPECS directory under the root of the RPM set in the topDir attribute. | Yes
topDir | This is the directory which will have the expected subdirectories, SPECS, SOURCES, BUILD, SRPMS. If this isn't specified, the default RPM directory of the system (or user, if ~/.rpmmacros defines it) is used (often /usr/src/rpm. Defining a topdir will set `%_topdir` to the specified directory -there is no need to edit your .rpmmacros file. | No, but your build file is very brittle if it is not set.
cleanBuildDir | This will remove the generated files in the BUILD directory. See the the `--clean` option of rpmbuild. | No
removeSpec | This will remove the spec file from SPECS. See the the `--rmspec` option of rpmbuild. | No
removeSource | Flag (optional, default=false) to remove the sources after the build. See the the `--rmsource` option of rpmbuild. | No
rpmBuildCommand | The executable to use for building the RPM. Defaults to `rpmbuild` if it can be found or `rpm` otherwise. Set this if you don't have either on your PATH or want to use a different executable. Since Ant 1.6. | No
command | The command to pass to the rpmbuild program. The default is "-bb" | No
quiet | Suppress output. Defaults to false. | No
output/error | Where standard output and error go | No
failOnError | Stop the buildprocess if the RPM build command exits with a non-zero retuncode. Defaults to false | No

### Examples

        <rpm
            specFile="example.spec"
            topDir="build/rpm"
            cleanBuildDir="true"
            failOnError="true"/>