org.freecompany.redline
public class Builder extends Object
Field Summary | |
---|---|
protected Contents | contents |
protected Map<String,CharSequence> | dependencies |
protected Map<String,Integer> | flags |
protected Format | format |
protected Set<PrivateKey> | signatures |
Constructor Summary | |
---|---|
Builder()
Initializes the builder and sets some required fields to known values. |
Method Summary | |
---|---|
protected void | addDependency(CharSequence name, CharSequence version, int flag)
Adds a dependency to the RPM package. |
void | addDependencyLess(CharSequence name, CharSequence version)
Adds a dependency to the RPM package. |
void | addDependencyMore(CharSequence name, CharSequence version)
Adds a dependency to the RPM package. |
void | addDirectory(String path)
Adds the directory to the repository with the default mode of 644 .
|
void | addDirectory(String path, int permissions, Directive directive, String uname, String gname)
Adds the directory to the repository.
|
void | addDirectory(String path, int permissions, Directive directive, String uname, String gname, boolean addParents)
Adds the directory to the repository.
|
void | addDirectory(String path, Directive directive)
Adds the directory to the repository with the default mode of 644 .
|
void | addFile(String path, File source, int mode)
Add the specified file to the repository payload in order.
|
void | addFile(String path, File source, int mode, Directive directive, String uname, String gname)
Add the specified file to the repository payload in order.
|
void | addFile(String path, File source, int mode, Directive directive)
Add the specified file to the repository payload in order.
|
void | addFile(String path, File source)
Adds the file to the repository with the default mode of 644 .
|
void | addLink(String path, String target)
Adds a symbolic link to the repository.
|
void | addLink(String path, String target, int permissions)
Adds a symbolic link to the repository.
|
void | addSignature(PrivateKey key)
Add a key to generate a new signature for the header and payload portions of the
rpm file. |
String | build(File directory)
Generates an RPM with a standard name consisting of the RPM package name, version, release,
and type in teh given directory.
|
protected int[] | convert(Integer[] ints) |
protected byte[] | getImmutable(int count) |
protected byte[] | getSignature(int count) |
protected byte[] | getSpecial(int tag, int count) |
void | setBuildHost(CharSequence host)
Required Field. |
void | setDescription(CharSequence description)
Required Field. |
void | setDistribution(CharSequence distribution)
Required Field. |
void | setFiles(Contents contents)
Sets the group of contents to include in this RPM. |
void | setGroup(CharSequence group)
Required Field. |
void | setLicense(CharSequence license)
Required Field. |
void | setPackage(CharSequence name, CharSequence version, CharSequence release)
Required Field. |
void | setPackager(CharSequence packager)
Required Field. |
void | setPlatform(Architecture arch, Os os)
Required Field. |
void | setPostInstallProgram(String program)
Declares the interpretter to be used when invoking the RPM
post-installation script that can be set with the
setPreInstallScript method.
|
void | setPostInstallScript(String script)
Declares a script to be run as part of the RPM post-installation. |
void | setPostUninstallProgram(String program)
Declares the interpretter to be used when invoking the RPM
post-uninstallation script that can be set with the
setPostUninstallScript method.
|
void | setPostUninstallScript(String script)
Declares a script to be run as part of the RPM post-uninstallation. |
void | setPrefixes(String... prefixes)
Sets the package prefix directories to allow any files installed under
them to be relocatable.
|
void | setPreInstallProgram(String program)
Declares the interpretter to be used when invoking the RPM
pre-installation script that can be set with the
setPreInstallScript method.
|
void | setPreInstallScript(String script)
Declares a script to be run as part of the RPM pre-installation. |
void | setPreUninstallProgram(String program)
Declares the interpretter to be used when invoking the RPM
pre-uninstallation script that can be set with the
setPreUninstallScript method.
|
void | setPreUninstallScript(String script)
Declares a script to be run as part of the RPM pre-uninstallation. |
void | setProvides(CharSequence provides)
Declares a dependency that this package exports, and that other packages can use to
provide library functions.
|
void | setSourceRpm(String rpm)
Adds a source rpm.
|
void | setSummary(CharSequence summary)
Required Field. |
void | setType(RpmType type)
Required Field. |
void | setUrl(CharSequence url)
Required Field. |
void | setVendor(CharSequence vendor)
Required Field. |
Parameters: name the name of the dependency. version the version identifier.
Parameters: name the name of the dependency. version the version identifier.
Parameters: name the name of the dependency. version the version identifier.
644
.
Parameters: path the absolute path at which this file will be installed. file the file content to include in this rpm.
Parameters: path the absolute path to add as a directory. permissions the mode of the directory in standard three octet notation. directive directive indicating special handling for this file. uname user owner of the directory gname group owner of the directory
Parameters: path the absolute path to add as a directory. permissions the mode of the directory in standard three octet notation. directive directive indicating special handling for this file. uname user owner of the directory gname group owner of the directory addParents whether to add parent directories to the rpm
644
.
Parameters: path the absolute path to add as a directory. directive directive indicating special handling for this file.
Parameters: target the absolute path at which this file will be installed. file the file content to include in this rpm. mode the mode of the target file in standard three octet notation
Parameters: path the absolute path at which this file will be installed. source the file content to include in this rpm. mode the mode of the target file in standard three octet notation directive directive indicating special handling for this file. uname user owner for the given file gname group owner for the given file
Parameters: path the absolute path at which this file will be installed. source the file content to include in this rpm. mode the mode of the target file in standard three octet notation directive directive indicating special handling for this file.
644
.
Parameters: path the absolute path at which this file will be installed. file the file content to include in this rpm.
Parameters: path the absolute path at which this link will be installed. target the path of the file this link will point to.
Parameters: path the absolute path at which this link will be installed. target the path of the file this link will point to.
Parameters: key private key to use in generating a signature.
Parameters: directory the destination directory for the new RPM file.
Parameters: host hostname of the build machine.
Parameters: description description text.
Parameters: distribution the distribution.
Parameters: contents the set of contents to use in constructing this RPM.
Parameters: group target group.
Parameters: license the chosen distribution license.
Parameters: name the name of the RPM package. version the version of the new package. release the release number, specified after the version, of the new RPM.
Parameters: packager packager name.
Parameters: arch the target architectur. os the target operating system.
Parameters: program Path to the interpretter
Parameters: script Script contents to run (i.e. shell commands)
Parameters: program Path to the interpretter
Parameters: script Script contents to run (i.e. shell commands)
Parameters: prefixes Path prefixes which may be relocated
Parameters: program Path to the interpretter
Parameters: script Script contents to run (i.e. shell commands)
Parameters: program Path to the interpretter
Parameters: script Script contents to run (i.e. shell commands)
Parameters: dependency provided by this package.
Parameters: rpm name of rpm source file
Parameters: summary summary text.
Parameters: type the type of RPM to generate.
Parameters: url
Parameters: vendor software vendor.