public String build ( final File directory ) throws NoSuchAlgorithmException , IOException { final String rpm = format . getLead ( ) . getName ( ) + "." + format . getLead ( ) . getArch ( ) . toString ( ) . toLowerCase ( ) + ".rpm" ; final File file = new File ( directory , rpm ) ; if ( file . exists ( ) ) file . delete ( ) ; RandomAccessFile raFile = new RandomAccessFile ( file , "rw" ) ; build ( raFile . getChannel ( ) ) ; raFile . close ( ) ; return rpm ; }
Generates an RPM with a standard name consisting of the RPM package name version release and type in the given directory .