You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by st...@apache.org on 2007/05/23 15:42:51 UTC
svn commit: r540954 - in /ant/core/trunk: docs/manual/OptionalTasks/rpm.html
src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java
Author: stevel
Date: Wed May 23 06:42:50 2007
New Revision: 540954
URL: http://svn.apache.org/viewvc?view=rev&rev=540954
Log:
Let's make the rpm documentation more complete, shall we?
Modified:
ant/core/trunk/docs/manual/OptionalTasks/rpm.html
ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java
Modified: ant/core/trunk/docs/manual/OptionalTasks/rpm.html
URL: http://svn.apache.org/viewvc/ant/core/trunk/docs/manual/OptionalTasks/rpm.html?view=diff&rev=540954&r1=540953&r2=540954
==============================================================================
--- ant/core/trunk/docs/manual/OptionalTasks/rpm.html (original)
+++ ant/core/trunk/docs/manual/OptionalTasks/rpm.html Wed May 23 06:42:50 2007
@@ -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 @@
</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 @@
</tr>
</table>
-
+<h3>Examples</h3>
+<pre>
+ <rpm
+ specFile="example.spec"
+ topDir="build/rpm"
+ cleanBuildDir="true"
+ failOnError="true"/>
+</pre>
</body>
</html>
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java?view=diff&rev=540954&r1=540953&r2=540954
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java Wed May 23 06:42:50 2007
@@ -225,7 +225,7 @@
* @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;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org