files. Otherwise the replacement will not be complete.
+@section Directive: prereq <version>
+
+The 'prereq' may be used to enforce the Autodist version. If the Autodist
+version used to process the distribution is older than the version
+specified with 'prereq' the Autodist will fail.
+
+Example:
+@example
+prereq 1.3.2
+@end example
+
+Will require Autodist 1.3.2 or newer for this distribution.
+
+
@section Directive: inherit <distfile>
The Autodist provides inheritance of distributions. The 'inherit'
'pre-hook' hook will be run immediately after invoking Autodist to start
preparing the source tree for configuration and compilation (@pxref{Preparing source tree, , , , }).
-The scripts will get three (3) command line arguments when Autodist
-executes the script: distribution name, distribution version and package
-name of distribution. The script may use these arguments if it needs them.
+The scripts will get at least three (3) command line arguments when
+Autodist executes the script: distribution name, distribution version and
+package name of distribution. The script may use these arguments if it
+needs them. If user passed any extra parameters to autodist in the
+command line they will also be passed to the script as last arguments.
@section Directive: post-hook <filename> [...]
preparing the source three for configuration and compilation (@pxref{Preparing source tree, , , , }). The Autodist will exit after it has run the
'post-hook' scripts.
-The scripts will get three (3) command line arguments when Autodist
-executes the script: distribution name, distribution version and package
-name of distribution. The script may use these arguments if it needs them.
+The scripts will get at least three (3) command line arguments when
+Autodist executes the script: distribution name, distribution version and
+package name of distribution. The script may use these arguments if it
+needs them. If user passed any extra parameters to autodist in the
+command line they will also be passed to the script as last arguments.
@section Directive: pre-process-dist-hook <filename> [...]
will be run immediately after the Autodist has created the distribution
directory but has not yet started any distribution processing.
-The scripts will get four (4) command line arguments when Autodist
-executes the script: distribution name, distribution version, package
-name of distribution and destination distribution directory name. The
-script may use these arguments if it needs them.
+The scripts will get at least four (4) command line arguments when
+Autodist executes the script: distribution name, distribution version,
+package name of distribution and destination distribution directory name.
+The script may use these arguments if it needs them. If user passed any
+extra parameters to autodist in the command line they will also be passed
+to the script as last arguments.
@section Directive: post-process-dist-hook <filename> [...]
has finished processing the destination distribution directory but has not
yet created the distribution package.
-The scripts will get four (4) command line arguments when Autodist
-executes the script: distribution name, distribution version, package
-name of distribution and destination distribution directory name. The
-script may use these arguments if it needs them.
+The scripts will get at least four (4) command line arguments when
+Autodist executes the script: distribution name, distribution version,
+package name of distribution and destination distribution directory name.
+The script may use these arguments if it needs them. If user passed any
+extra parameters to autodist in the command line they will also be passed
+to the script as last arguments.
@section Directive: pre-dist-hook <filename> [...]
the Autodist has started distribution creation, but has not yet created
the distribution directory. This hook is run before 'pre-process-dist-hook'.
-The scripts will get four (4) command line arguments when Autodist
-executes the script: distribution name, distribution version, package
-name of distribution and destination distribution directory name. The
-script may use these arguments if it needs them.
+The scripts will get at least four (4) command line arguments when
+Autodist executes the script: distribution name, distribution version,
+package name of distribution and destination distribution directory name.
+The script may use these arguments if it needs them. If user passed any
+extra parameters to autodist in the command line they will also be passed
+to the script as last arguments.
@section Directive: post-dist-hook <filename> [...]
immediately after the Autodist has finished creating the distribution
package. This is the last hook Autodist runs.
-The scripts will get four (4) command line arguments when Autodist
-executes the script: distribution name, distribution version, package
-name of distribution and destination distribution directory name. The
-script may use these arguments if it needs them.
+The scripts will get at least four (4) command line arguments when
+Autodist executes the script: distribution name, distribution version,
+package name of distribution and destination distribution directory name.
+The script may use these arguments if it needs them. If user passed any
+extra parameters to autodist in the command line they will also be passed
+to the script as last arguments.
@section Running hooks
define _DIST_NOMAD
define _DIST_NOMAD_LIB
undef _DIST_CRYPTO
+pre-dist-hook nomad-pre-dist-hook
@end example
@example
autodist libfoozbar 1.0.5
makedist
-autodist nomad 2.0
+Nomad has also an RPM .spec file that you have written and a pre-dist-hook
+that will replace the RPM release version with sed tool with the one you
+give as extra parameter to autodist:
+
+autodist nomad 2.0 0.fc7
makedist
@end example
-The end results are: 'libfoozbar-1.0.5.tar.gz' and 'nomad-2.0.tar.gz'.
+The end results are: 'libfoozbar-1.0.5.tar.gz' and 'nomad-2.0.tar.gz', and
+the RPM will have a release version '0.fc7' when you compile the RPM. Any
+extra parameter that you pass to autodist will be delivered to your hook
+scripts.
@page
@contents