public void run ( XmlEditor editor , String name , String version , String release , Contents include , File destination ) throws NoSuchAlgorithmException , IOException { Builder builder = new Builder ( ) ; builder . setPackage ( name , version , release ) ; RpmType type = RpmType . valueOf ( editor . getValue ( "rpm:type" , BINARY . toString ( ) ) ) ; builder . setType ( type ) ; Architecture arch = Architecture . valueOf ( editor . getValue ( "rpm:architecture" , NOARCH . toString ( ) ) ) ; Os os = Os . valueOf ( editor . getValue ( "rpm:os" , LINUX . toString ( ) ) ) ; builder . setPlatform ( arch , os ) ; builder . setSummary ( editor . getValue ( "rpm:summary/text()" ) ) ; builder . setDescription ( editor . getValue ( "rpm:description/text()" ) ) ; builder . setBuildHost ( editor . getValue ( "rpm:host/text()" , InetAddress . getLocalHost ( ) . getHostName ( ) ) ) ; builder . setLicense ( editor . getValue ( "rpm:license/text()" ) ) ; builder . setGroup ( editor . getValue ( "rpm:group/text()" ) ) ; builder . setPackager ( editor . getValue ( "rpm:packager/text()" , System . getProperty ( "user.name" ) ) ) ; builder . setVendor ( editor . getValue ( "rpm:vendor/text()" , null ) ) ; builder . setUrl ( editor . getValue ( "rpm:url/text()" , null ) ) ; builder . setProvides ( editor . getValue ( "rpm:provides/text()" , name ) ) ; builder . setFiles ( include ) ; builder . build ( destination ) ; }
Runs the tool using the provided settings .