Browse Source

Let's make the rpm documentation more complete, shall we?

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@540954 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 18 years ago
parent
commit
f2e7f834fa
2 changed files with 26 additions and 12 deletions
  1. +25
    -11
      docs/manual/OptionalTasks/rpm.html
  2. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java

+ 25
- 11
docs/manual/OptionalTasks/rpm.html View File

@@ -27,9 +27,8 @@
<h2><a name="rpm">Rpm</a></h2>
<h3>Description</h3>
<p>
A basic task for invoking the rpm executable to build a Linux installation
file. The task currently only works on Linux or other Unix platforms
with rpm support.
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.
</p>

<h3>Parameters</h3>
@@ -41,7 +40,8 @@
</tr>
<tr>
<td valign="top">specFile</td>
<td valign="top">The name of the spec file to be used.</td>
<td valign="top">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.</td>
<td valign="top" align="center">Yes</td>
</tr>
<tr>
@@ -49,26 +49,33 @@
<td valign="top">
This is the directory which will have the expected
subdirectories, SPECS, SOURCES, BUILD, SRPMS. If this isn't specified,
the baseDir value is used
the default RPM directory of the system (or user, if ~/.rpmmacros defines it) is used (often
/usr/src/rpm.<br>
Defining a topdir will set <tt>%_topdir</tt> to the specified directory -there is no need
to edit your .rpmmacros file.
</td>
<td valign="top" align="center">No</td>
<td valign="top" align="center">No, but your build file is very brittle if it is not set.</td>
</tr>
<tr>
<td valign="top">cleanBuildDir</td>
<td valign="top">This will remove the generated files in the BUILD
directory.</td>
directory.
See the the <tt>--clean</tt> option of rpmbuild.
</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">removeSpec</td>
<td valign="top">This will remove the spec file from SPECS</td>
<td valign="top">This will remove the spec file from SPECS.
See the the <tt>--rmspec</tt> option of rpmbuild.
</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
<td valign="top">removeSource</td>
<td valign="top">Flag (optional, default=false)
to remove the sources after the build.
See the the <tt>--rmsource</tt> option of rpmbuild.</td>
See the the <tt>--rmsource</tt> option of rpmbuild.</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
@@ -82,7 +89,7 @@ directory.</td>
</tr>
<tr>
<td valign="top">command</td>
<td valign="top">Very similar idea to the cvs task. the default is "-bb"</td>
<td valign="top">The command to pass to the rpmbuild program. The default is "-bb"</td>
<td align="center" valign="top">No</td>
</tr>
<tr>
@@ -103,7 +110,14 @@ directory.</td>
</tr>
</table>


<h3>Examples</h3>
<pre>
&lt;rpm
specFile="example.spec"
topDir="build/rpm"
cleanBuildDir="true"
failOnError="true"/&gt;
</pre>
</body>
</html>


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java View File

@@ -225,7 +225,7 @@ public class Rpm extends Task {
* @param sf the spec file name to use.
*/
public void setSpecFile(String sf) {
if ((sf == null) || (sf.trim().equals(""))) {
if ((sf == null) || (sf.trim().length()==0)) {
throw new BuildException("You must specify a spec file", getLocation());
}
this.specFile = sf;


Loading…
Cancel
Save