Documentation
¶
Index ¶
Constants ¶
const ( Communications = "Applications/Communications" Engineering = "Applications/Engineering" Internet = "Applications/Internet" Multimedia = "Applications/Multimedia" Tools = "Development/Tools" )
Variables ¶
var ( RPMArchs = map[string]string{ "x86_64": "x86_64", "i686": "i686", "aarch64": "aarch64", "armv7h": "armv7h", "armv6h": "armv6h", "arm": "arm", "any": "noarch", } RPMGroups = map[string]string{ "admin": "Applications/System", "any": "noarch", "comm": Communications, "database": "Applications/Databases", "debug": "Development/Debuggers", "devel": Tools, "doc": "Documentation", "editors": "Applications/Editors", "electronics": Engineering, "embedded": Engineering, "fonts": "Interface/Desktops", "games": "Amusements/Games", "graphics": Multimedia, "httpd": Internet, "interpreters": Tools, "kernel": "System Environment/Kernel", "libdevel": "Development/Libraries", "libs": "System Environment/Libraries", "localization": "Development/Languages", "mail": Communications, "math": "Applications/Productivity", "misc": "Applications/System", "net": Internet, "news": "Applications/Publishing", "science": Engineering, "shells": "System Environment/Shells", "sound": Multimedia, "text": "Applications/Text", "vcs": Tools, "video": Multimedia, "web": Internet, "x11": "User Interface/X", } RPMDistros = map[string]string{ "almalinux": ".el", "amzn": ".amzn", "fedora": ".fc", "ol": ".ol", "rhel": ".el", "rocky": ".el", } )
Functions ¶
This section is empty.
Types ¶
type RPM ¶
RPM represents a RPM package.
It contains the directory path of the package and the PKGBUILD struct, which contains the metadata and build instructions for the package.
func (*RPM) BuildPackage ¶
BuildPackage creates an RPM package based on the provided PKGBUILD information.
func (*RPM) Install ¶
Install installs the RPM package to the specified artifacts path.
It takes the following parameter: - artifactsPath: The path to the directory where the artifacts are stored.
It returns an error if there was an issue during the installation process.
func (*RPM) Prepare ¶
Prepare prepares the RPM instance by installing the required dependencies.
makeDepends is a slice of strings representing the dependencies to be installed. It returns an error if there is any issue during the installation process.
func (*RPM) PrepareEnvironment ¶
PrepareEnvironment prepares the environment for the RPM struct.
It takes a boolean parameter `golang` which indicates whether or not to set up the Go environment. It returns an error if there was an issue with the environment preparation.
func (*RPM) PrepareFakeroot ¶
PrepareFakeroot sets up the environment for building an RPM package in a fakeroot context. It retrieves architecture, group, and release information, sets the package destination, cleans up the RPM directory, creates necessary directories, and gathers files. It also processes package dependencies and creates the RPM spec file, returning an error if any step fails.