https://issues.apache.org/bugzilla/show_bug.cgi?id=47047

           Summary: Add buildroot to RPM
           Product: Ant
           Version: 1.8Alpha (nightly)
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P5
         Component: Optional Tasks
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Please add --buildroot support to the optional RPM task.

--- Rpm.java    2009-02-08 13:18:36.000000000 -0500
+++ Rpm_new.java        2009-04-17 21:12:24.000000000 -0400
@@ -107,6 +107,11 @@
     private boolean quiet = false;

     /**
+     * The root build directory as a base location for the files to package.
+     */
+    private File buildRoot;
+    
+    /**
      * Execute the task
      *
      * @throws BuildException is there is a problem in the task execution.
@@ -125,6 +130,11 @@

         toExecute.createArgument().setLine(command);

+        if (buildRoot != null) {
+            toExecute.createArgument().setValue("--buildroot");
+            toExecute.createArgument().setValue(buildRoot.toString());
+        }
+        
         if (cleanBuildDir) {
             toExecute.createArgument().setValue("--clean");
         }
@@ -308,6 +318,14 @@
     }

     /**
+     * Sets the build root as the base for files included in package.
+     *
+     */
+    public void setBuildRoot(File buildRoot) {
+        this.buildRoot = buildRoot;
+    }
+    
+    /**
      * Checks whether <code>rpmbuild</code> is on the PATH and returns
      * the absolute path to it - falls back to <code>rpm</code>
      * otherwise.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to