Package org.freecompany.redline

Examples of org.freecompany.redline.Builder


  }

  public static File createDummyRpm(String name, String version, File outputDirectory)
      throws NoSuchAlgorithmException, IOException
  {
    Builder rpmBuilder = new Builder();
    rpmBuilder.setVendor("IS24");
    rpmBuilder.setGroup("is24");
    rpmBuilder.setPackager("maven - " + System.getProperty("user.name"));
    try {
      rpmBuilder.setBuildHost(InetAddress.getLocalHost().getHostName());
    }
    catch (UnknownHostException e) {
      throw new RuntimeException("Could not determine hostname.", e);
    }
    rpmBuilder.setPackage(name, version, "1");
    rpmBuilder.setPlatform(NOARCH, LINUX);
    rpmBuilder.setType(BINARY);
    rpmBuilder.setSourceRpm("dummy-source-rpm-because-yum-needs-this");

    outputDirectory.mkdirs();

    String filename = rpmBuilder.build(outputDirectory);
    return new File(outputDirectory, filename);
  }
View Full Code Here

TOP

Related Classes of org.freecompany.redline.Builder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.