rpm

package
v0.0.0-...-fc2143d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Communications = "Applications/Communications"
	Engineering    = "Applications/Engineering"
	Internet       = "Applications/Internet"
	Multimedia     = "Applications/Multimedia"
	Tools          = "Development/Tools"
)

Variables

View Source
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

type RPM struct {
	PKGBUILD *pkgbuild.PKGBUILD
}

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

func (r *RPM) BuildPackage(artifactsPath string) error

BuildPackage creates an RPM package based on the provided PKGBUILD information.

func (*RPM) Install

func (r *RPM) Install(artifactsPath string) error

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

func (r *RPM) Prepare(makeDepends []string) error

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

func (r *RPM) PrepareEnvironment(golang bool) error

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

func (r *RPM) PrepareFakeroot(_ string) error

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.

func (*RPM) Update

func (r *RPM) Update() error

Update updates the RPM object.

It takes no parameters. It returns an error.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL