]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.support.simple/src/main/java/org/argeo/slc/lib/linux/rpmfactory/RpmBuildEnvironment.java
JCR repository backup
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.simple / src / main / java / org / argeo / slc / lib / linux / rpmfactory / RpmBuildEnvironment.java
index 123e055a36b3d68f04c4c84a48ca112a1bdc8da2..56e93d4ba6335001e15148512899825971306e4a 100644 (file)
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.argeo.slc.lib.linux.rpmfactory;
 
 import java.io.File;
@@ -15,9 +30,14 @@ import org.argeo.slc.SlcException;
  * components performing the various actions related to RPM build.
  */
 public class RpmBuildEnvironment {
-       private String defaultMacroFiles = "/usr/lib/rpm/macros:/usr/lib/rpm/ia32e-linux/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/ia32e-linux/macros:~/.rpmmacros";
+       static String defaultMacroFiles = "/usr/lib/rpm/macros:/usr/lib/rpm/ia32e-linux/macros:/usr/lib/rpm/redhat/macros:/etc/rpm/macros.*:/etc/rpm/macros:/etc/rpm/ia32e-linux/macros:~/.rpmmacros";
+
        private Map<String, String> rpmmacros = new HashMap<String, String>();
 
+       private List<String> archs = new ArrayList<String>();
+
+       private String stagingBase = "/srv/rpmfactory";
+
        /** Write (topdir)/rpmmacros and (topdir)/rpmrc */
        public void writeRpmbuildConfigFiles(File topdir) {
                writeRpmbuildConfigFiles(topdir, new File(topdir, "rpmmacros"),
@@ -61,4 +81,19 @@ public class RpmBuildEnvironment {
                this.defaultMacroFiles = defaultMacroFiles;
        }
 
+       public void setArchs(List<String> archs) {
+               this.archs = archs;
+       }
+
+       public List<String> getArchs() {
+               return archs;
+       }
+
+       public String getStagingBase() {
+               return stagingBase;
+       }
+
+       public void setStagingBase(String stagingBase) {
+               this.stagingBase = stagingBase;
+       }
 }